• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pantsbuild / pants / 25441711719

06 May 2026 02:31PM UTC coverage: 92.915%. Remained the same
25441711719

push

github

web-flow
use sha pin (with comment) format for generated actions (#23312)

Per the GitHub Action best practices we recently enabled at #23249, we
should pin each action to a SHA so that the reference is actually
immutable.

This will -- I hope -- knock out a large chunk of the 421 alerts we
currently get from zizmor. The next followup would then be upgrades and
harmonizing the generated and none-generated pins.

Notice: This idea was suggested by Claude while going over pinact output
and I was surprised to see that post processing the yaml wasn't too
gross.

92206 of 99237 relevant lines covered (92.91%)

4.04 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

94.12
/src/python/pants/backend/scala/resolve/artifact.py
1
# Copyright 2023 Pants project contributors (see CONTRIBUTORS.md).
2
# Licensed under the Apache License, Version 2.0 (see LICENSE).
3

4
from __future__ import annotations
8✔
5

6
from pants.backend.scala.target_types import ScalaArtifactFieldSet
8✔
7
from pants.engine.fs import EMPTY_DIGEST
8✔
8
from pants.engine.rules import collect_rules, implicitly, rule
8✔
9
from pants.engine.unions import UnionRule
8✔
10
from pants.jvm.compile import (
8✔
11
    ClasspathDependenciesRequest,
12
    ClasspathEntry,
13
    ClasspathEntryRequest,
14
    CompileResult,
15
    FallibleClasspathEntry,
16
    compile_classpath_entries,
17
)
18

19

20
class ScalaArtifactClasspathEntryRequest(ClasspathEntryRequest):
8✔
21
    field_sets = (ScalaArtifactFieldSet,)
8✔
22

23

24
@rule
8✔
25
async def scala_artifact_classpath(
8✔
26
    request: ScalaArtifactClasspathEntryRequest,
27
) -> FallibleClasspathEntry:
28
    fallible_entries = await compile_classpath_entries(
1✔
29
        **implicitly(ClasspathDependenciesRequest(request))
30
    )
31
    classpath_entries = fallible_entries.if_all_succeeded()
1✔
32
    if classpath_entries is None:
1✔
33
        return FallibleClasspathEntry(
×
34
            description=str(request.component),
35
            result=CompileResult.DEPENDENCY_FAILED,
36
            output=None,
37
            exit_code=1,
38
        )
39
    return FallibleClasspathEntry(
1✔
40
        description=str(request.component),
41
        result=CompileResult.SUCCEEDED,
42
        output=ClasspathEntry(EMPTY_DIGEST, dependencies=classpath_entries),
43
        exit_code=0,
44
    )
45

46

47
def rules():
8✔
48
    return [
8✔
49
        *collect_rules(),
50
        UnionRule(ClasspathEntryRequest, ScalaArtifactClasspathEntryRequest),
51
    ]
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc