• 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

100.0
/src/python/pants/bsp/spec/resources.py
1
# Copyright 2022 Pants project contributors (see CONTRIBUTORS.md).
2
# Licensed under the Apache License, Version 2.0 (see LICENSE).
3
from __future__ import annotations
2✔
4

5
from dataclasses import dataclass
2✔
6
from typing import Any
2✔
7

8
from pants.bsp.spec.base import BuildTargetIdentifier, Uri
2✔
9

10
# -----------------------------------------------------------------------------------------------
11
# Resources Request
12
# See https://build-server-protocol.github.io/docs/specification.html#resources-request
13
# -----------------------------------------------------------------------------------------------
14

15

16
@dataclass(frozen=True)
2✔
17
class ResourcesParams:
2✔
18
    targets: tuple[BuildTargetIdentifier, ...]
2✔
19

20
    @classmethod
2✔
21
    def from_json_dict(cls, d: dict[str, Any]) -> Any:
2✔
22
        return cls(
1✔
23
            targets=tuple(BuildTargetIdentifier.from_json_dict(x) for x in d["targets"]),
24
        )
25

26
    def to_json_dict(self) -> dict[str, Any]:
2✔
27
        return {"targets": [tgt.to_json_dict() for tgt in self.targets]}
1✔
28

29

30
@dataclass(frozen=True)
2✔
31
class ResourcesItem:
2✔
32
    target: BuildTargetIdentifier
2✔
33
    # List of resource files.
34
    resources: tuple[Uri, ...]
2✔
35

36
    def to_json_dict(self):
2✔
37
        result = {
1✔
38
            "target": self.target.to_json_dict(),
39
            "resources": self.resources,
40
        }
41
        return result
1✔
42

43

44
@dataclass(frozen=True)
2✔
45
class ResourcesResult:
2✔
46
    items: tuple[ResourcesItem, ...]
2✔
47

48
    def to_json_dict(self) -> dict[str, Any]:
2✔
49
        return {
1✔
50
            "items": [ri.to_json_dict() for ri in self.items],
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