Skip to content

Commit a0026f3

Browse files
committed
Rename gh-actions-pin to gh-actions-lock
Renames the extension, binary, module path, CLI command, env vars, and all user-facing strings from actions-pin to actions-lock. The cmd/ directory moves from cmd/gh-actions-pin to cmd/gh-actions-lock. 90 files touched, zero functional changes — pure mechanical rename.
1 parent bb543bd commit a0026f3

90 files changed

Lines changed: 295 additions & 295 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/actions.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# This file is machine-generated by `gh actions-pin`.
2-
# Do not edit by hand; run `gh actions-pin` to update.
1+
# This file is machine-generated by `gh actions-lock`.
2+
# Do not edit by hand; run `gh actions-lock` to update.
33
# Docs: https://gh.io/actions-lockfile
44
version: 'v0.0.1'
55
workflows:

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
with:
2020
generate_attestations: true
2121
go_version_file: go.mod
22-
go_build_options: ./cmd/gh-actions-pin
22+
go_build_options: ./cmd/gh-actions-lock
2323

2424
sync-early-access-release:
2525
needs: release

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
/gh-actions-pin
2-
/gh-actions-pin.exe
1+
/gh-actions-lock
2+
/gh-actions-lock.exe
33

44
# VHS demo recordings
55
/demo/vhs/out/

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
BIN := gh-actions-pin
2-
EXT_NAME := gh-actions-pin
1+
BIN := gh-actions-lock
2+
EXT_NAME := gh-actions-lock
33
# Honor XDG_DATA_HOME so this matches where gh actually resolves its data
44
# dir; fall back to the documented default when it's unset.
55
XDG_DATA_HOME ?= $(HOME)/.local/share
@@ -10,7 +10,7 @@ RUBY := $(shell command -v /opt/homebrew/opt/ruby/bin/ruby 2>/dev/null || echo r
1010
.PHONY: build test test-integration test-shell test-live test-matrix test-smoke test-stub test-real install reinstall uninstall
1111

1212
build:
13-
go build -o $(BIN) ./cmd/gh-actions-pin
13+
go build -o $(BIN) ./cmd/gh-actions-lock
1414

1515
test:
1616
go test ./...

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# gh-actions-pin
1+
# gh-actions-lock
22

33
Manage your workflow dependencies.
44

55
## Install
66

77
```bash
8-
gh extension install github/gh-actions-pin
8+
gh extension install github/gh-actions-lock
99
```
1010

1111
## Usage
@@ -14,27 +14,27 @@ Scan every workflow under `.github/workflows/` and pin what it can -- pinning
1414
each resolvable action to an immutable SHA and updating the lockfile:
1515

1616
```bash
17-
gh actions-pin
17+
gh actions-lock
1818
```
1919

2020
Scope the scan to a single workflow (same default behavior, one file):
2121

2222
```bash
23-
gh actions-pin .github/workflows/ci.yml
23+
gh actions-lock .github/workflows/ci.yml
2424
```
2525

2626
By default, already-pinned workflows are trusted from the lockfile -- their
2727
reachability isn't re-checked against upstream. To force a full re-verification
2828
of every recorded pin (bypassing that fast path):
2929

3030
```bash
31-
gh actions-pin --rescan
31+
gh actions-lock --rescan
3232
```
3333

3434
Read-only check for CI (reports findings, writes nothing):
3535

3636
```bash
37-
gh actions-pin --no-fix --json=valid,findings
37+
gh actions-lock --no-fix --json=valid,findings
3838
```
3939

4040
`--no-fix` controls whether fixes are applied; `--json` only selects the output
@@ -45,12 +45,12 @@ format. Structured results go to stdout, progress to stderr.
4545
GitHub Actions is a package manager that forgot to ship a lockfile. Your
4646
workflows are the manifest -- every `uses:` line is a dependency, resolved by
4747
mutable tag or branch *at runtime*, on GitHub's servers, with no record of what
48-
actually ran. `gh-actions-pin` supplies the missing half: `.github/workflows/actions.lock`,
48+
actually ran. `gh-actions-lock` supplies the missing half: `.github/workflows/actions.lock`,
4949
the Actions analogue of `go.sum` or `package-lock.json`. Each run resolves every
5050
direct and transitive dependency to an immutable commit SHA, locks it, and
5151
verifies the lock hasn't been tampered with before any of it runs.
5252

53-
A single `gh actions-pin` invocation walks two paths. The **verify** path is
53+
A single `gh actions-lock` invocation walks two paths. The **verify** path is
5454
read-only and always runs: it scans every workflow, resolves each dependency to
5555
a commit SHA, and checks the result against the lockfile. The **fix** path
5656
applies pins — rewriting `uses:` lines and updating the lockfile — for the
@@ -59,7 +59,7 @@ past in the spinner.
5959

6060
```mermaid
6161
flowchart TD
62-
Start([gh actions-pin]) --> Scan
62+
Start([gh actions-lock]) --> Scan
6363
6464
subgraph verify["VERIFY · read-only diagnosis"]
6565
direction TB
@@ -88,7 +88,7 @@ flowchart TD
8888
The security guarantee lives in **Verifying reachability**: a SHA pin is only
8989
trustworthy if that commit is reachable from the tag/branch it claims to come
9090
from. A SHA that resolves but isn't in the ref's history is an *impostor commit*
91-
-- the fork-network attack `gh-actions-pin` exists to catch -- and it's flagged
91+
-- the fork-network attack `gh-actions-lock` exists to catch -- and it's flagged
9292
rather than silently trusted.
9393

9494
## Development
@@ -114,6 +114,6 @@ sides pick them up.
114114
| Variable | Purpose |
115115
|---|---|
116116
| `GH_TOKEN` / `GITHUB_TOKEN` | Auth token for live tests (falls back to `gh auth token`) |
117-
| `GH_ACTIONS_PIN_WORKFLOWS_DIR` | Override the workflows directory to scan (lab/testing use) |
117+
| `GH_ACTIONS_LOCK_WORKFLOWS_DIR` | Override the workflows directory to scan (lab/testing use) |
118118
| `KEEP_FIXTURES` | Keep temp dirs after test runs for debugging |
119119

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Command gh-actions-pin scans workflows and pins GitHub Actions to
1+
// Command gh-actions-lock scans workflows and pins GitHub Actions to
22
// immutable commit SHAs.
33
package main
44

@@ -14,16 +14,16 @@ import (
1414
"github.com/MakeNowJust/heredoc"
1515
"github.com/cli/go-gh/v2/pkg/repository"
1616
parserlock "github.com/github/actions-lockfile/go/pkg/lockfile"
17-
"github.com/github/gh-actions-pin/cmd/gh-actions-pin/format"
18-
"github.com/github/gh-actions-pin/internal/config"
19-
"github.com/github/gh-actions-pin/internal/pin"
20-
"github.com/github/gh-actions-pin/internal/pinpool"
21-
"github.com/github/gh-actions-pin/internal/pipeline"
22-
"github.com/github/gh-actions-pin/internal/pipeline/checks"
23-
"github.com/github/gh-actions-pin/internal/profile"
24-
"github.com/github/gh-actions-pin/internal/resolve"
25-
"github.com/github/gh-actions-pin/internal/tag"
26-
"github.com/github/gh-actions-pin/internal/ui"
17+
"github.com/github/gh-actions-lock/cmd/gh-actions-lock/format"
18+
"github.com/github/gh-actions-lock/internal/config"
19+
"github.com/github/gh-actions-lock/internal/pin"
20+
"github.com/github/gh-actions-lock/internal/pinpool"
21+
"github.com/github/gh-actions-lock/internal/pipeline"
22+
"github.com/github/gh-actions-lock/internal/pipeline/checks"
23+
"github.com/github/gh-actions-lock/internal/profile"
24+
"github.com/github/gh-actions-lock/internal/resolve"
25+
"github.com/github/gh-actions-lock/internal/tag"
26+
"github.com/github/gh-actions-lock/internal/ui"
2727
"github.com/spf13/cobra"
2828
)
2929

@@ -70,7 +70,7 @@ func newCheckCmd(newResolver resolverFunc) *cobra.Command {
7070
--json selects the output format only — structured results on
7171
stdout, progress on stderr — and is independent of --no-fix:
7272
73-
gh actions-pin check --no-fix --json 2>/dev/null | jq .valid
73+
gh actions-lock check --no-fix --json 2>/dev/null | jq .valid
7474
7575
Issue types:
7676
ref-moved - locked SHA no longer matches upstream (expected for mutable tags like v4)
@@ -95,16 +95,16 @@ func newCheckCmd(newResolver resolverFunc) *cobra.Command {
9595
`),
9696
Example: heredoc.Doc(`
9797
# Verify all workflows and fix what's fixable
98-
$ gh actions-pin check
98+
$ gh actions-lock check
9999
100100
# Verify a specific workflow
101-
$ gh actions-pin check .github/workflows/ci.yml
101+
$ gh actions-lock check .github/workflows/ci.yml
102102
103103
# Read-only check for CI (writes nothing, exits 1 if invalid)
104-
$ gh actions-pin check --no-fix --json=valid,findings
104+
$ gh actions-lock check --no-fix --json=valid,findings
105105
106106
# All fields as JSON
107-
$ gh actions-pin check --json
107+
$ gh actions-lock check --json
108108
`),
109109
PreRunE: func(cmd *cobra.Command, args []string) error {
110110
if len(args) > 0 {
@@ -469,7 +469,7 @@ func injectVersionRefFindings(report *checks.Report, record *pin.Record) {
469469
}
470470
}
471471

472-
// cliVersion returns the gh-actions-pin extension version embedded by the Go
472+
// cliVersion returns the gh-actions-lock extension version embedded by the Go
473473
// build system. Returns "(devel)" for local `go build` and a real version
474474
// like "v0.1.2" when installed via `gh extension install`.
475475
func cliVersion() string {

cmd/gh-actions-pin/check_json_golden_test.go renamed to cmd/gh-actions-lock/check_json_golden_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
package main
22

3-
// Golden-file snapshot test for the `gh actions-pin check --json` contract.
3+
// Golden-file snapshot test for the `gh actions-lock check --json` contract.
44
//
55
// We promised Dependabot the JSON shape is additive-only: no field renames,
66
// no removals, no type shifts. New optional fields are allowed. This test
77
// enforces that promise structurally.
88
//
99
// To regenerate the golden after an intentional additive change:
1010
//
11-
// UPDATE_GOLDEN=1 go test ./cmd/gh-actions-pin/ -run TestCheckCommand_JSONGolden
11+
// UPDATE_GOLDEN=1 go test ./cmd/gh-actions-lock/ -run TestCheckCommand_JSONGolden
1212
//
1313
// CI runs without the env var, so any change to the JSON shape must be
1414
// intentional and committed alongside the code change.
@@ -23,7 +23,7 @@ import (
2323
"strings"
2424
"testing"
2525

26-
"github.com/github/gh-actions-pin/internal/ghapi/httpmock"
26+
"github.com/github/gh-actions-lock/internal/ghapi/httpmock"
2727
"github.com/stretchr/testify/require"
2828
)
2929

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ import (
1010
"strings"
1111
"testing"
1212

13-
"github.com/github/gh-actions-pin/cmd/gh-actions-pin/format"
14-
"github.com/github/gh-actions-pin/internal/ghapi/httpmock"
15-
"github.com/github/gh-actions-pin/internal/pinpool"
16-
"github.com/github/gh-actions-pin/internal/resolve"
13+
"github.com/github/gh-actions-lock/cmd/gh-actions-lock/format"
14+
"github.com/github/gh-actions-lock/internal/ghapi/httpmock"
15+
"github.com/github/gh-actions-lock/internal/pinpool"
16+
"github.com/github/gh-actions-lock/internal/resolve"
1717
"github.com/stretchr/testify/assert"
1818
"github.com/stretchr/testify/require"
1919
)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"io"
88
"strings"
99

10-
"github.com/github/gh-actions-pin/internal/pipeline/checks"
10+
"github.com/github/gh-actions-lock/internal/pipeline/checks"
1111
)
1212

1313
// validJSONField reports whether name is a recognized --json output field.

0 commit comments

Comments
 (0)