Skip to content

Commit 8a2feab

Browse files
committed
Merge branch 'trunk' into tommy/skill-install-all-flag
2 parents 97d1cbd + 8bd5696 commit 8a2feab

12 files changed

Lines changed: 37 additions & 118 deletions

.github/dependabot.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ updates:
44
directory: "/"
55
schedule:
66
interval: "daily"
7+
cooldown:
8+
default-days: 3
79
ignore:
810
- dependency-name: "*"
911
update-types:
@@ -12,3 +14,5 @@ updates:
1214
directory: "/"
1315
schedule:
1416
interval: "daily"
17+
cooldown:
18+
default-days: 3

.github/workflows/codeql.yml

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,29 +34,20 @@ jobs:
3434
go-version-file: "go.mod"
3535

3636
- name: Initialize CodeQL
37-
uses: github/codeql-action/init@v4
37+
uses: github/codeql-action/init@v4.35.5
3838
with:
3939
languages: ${{ matrix.language }}
4040
queries: security-and-quality
4141

4242
- name: Perform CodeQL Analysis
43-
uses: github/codeql-action/analyze@v4
43+
uses: github/codeql-action/analyze@v4.35.5
4444
with:
4545
category: "/language:${{ matrix.language }}"
4646
upload: false
4747
output: sarif-results
4848

49-
- name: Filter SARIF for third-party code
50-
if: matrix.language == 'go'
51-
uses: advanced-security/filter-sarif@2da736ff05ef065cb2894ac6892e47b5eac2c3c0 # v1.1.0.1.1
52-
with:
53-
patterns: |
54-
-third-party/**
55-
input: sarif-results/${{ matrix.language }}.sarif
56-
output: sarif-results/${{ matrix.language }}.sarif
57-
5849
- name: Upload filtered SARIF
59-
uses: github/codeql-action/upload-sarif@v4
50+
uses: github/codeql-action/upload-sarif@v4.35.5
6051
with:
6152
sarif_file: sarif-results/${{ matrix.language }}.sarif
6253
category: "/language:${{ matrix.language }}"

.github/workflows/deployment.yml

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
with:
5353
go-version-file: 'go.mod'
5454
- name: Install GoReleaser
55-
uses: goreleaser/goreleaser-action@1a80836c5c9d9e5755a25cb59ec6f45a3b5f41a8 # v7.2.1
55+
uses: goreleaser/goreleaser-action@5daf1e915a5f0af01ddbcd89a43b8061ff4f1a89 # v7.2.2
5656
with:
5757
# The version is pinned not only for security purposes, but also to avoid breaking
5858
# our scripts, which rely on the specific file names generated by GoReleaser.
@@ -113,7 +113,7 @@ jobs:
113113
security set-key-partition-list -S "apple-tool:,apple:,codesign:" -s -k "$keychain_password" "$keychain"
114114
rm "$RUNNER_TEMP/cert.p12"
115115
- name: Install GoReleaser
116-
uses: goreleaser/goreleaser-action@1a80836c5c9d9e5755a25cb59ec6f45a3b5f41a8 # v7.2.1
116+
uses: goreleaser/goreleaser-action@5daf1e915a5f0af01ddbcd89a43b8061ff4f1a89 # v7.2.2
117117
with:
118118
# The version is pinned not only for security purposes, but also to avoid breaking
119119
# our scripts, which rely on the specific file names generated by GoReleaser.
@@ -175,7 +175,7 @@ jobs:
175175
with:
176176
go-version-file: 'go.mod'
177177
- name: Install GoReleaser
178-
uses: goreleaser/goreleaser-action@1a80836c5c9d9e5755a25cb59ec6f45a3b5f41a8 # v7.2.1
178+
uses: goreleaser/goreleaser-action@5daf1e915a5f0af01ddbcd89a43b8061ff4f1a89 # v7.2.2
179179
with:
180180
# The version is pinned not only for security purposes, but also to avoid breaking
181181
# our scripts, which rely on the specific file names generated by GoReleaser.
@@ -414,14 +414,4 @@ jobs:
414414
else
415415
git log --oneline @{upstream}..
416416
git diff --name-status @{upstream}..
417-
fi
418-
- name: Bump homebrew-core formula
419-
uses: mislav/bump-homebrew-formula-action@ccf2332299a883f6af50a1d2d41e5df7904dd769
420-
if: inputs.environment == 'production' && !contains(inputs.tag_name, '-')
421-
with:
422-
formula-name: gh
423-
formula-path: Formula/g/gh.rb
424-
tag-name: ${{ inputs.tag_name }}
425-
push-to: williammartin/homebrew-core
426-
env:
427-
COMMITTER_TOKEN: ${{ secrets.HOMEBREW_PR_PAT }}
417+
fi

.github/workflows/detect-spam.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,19 @@ on:
44
types: [opened]
55

66
permissions:
7-
contents: none
8-
issues: write
9-
models: read
7+
contents: read # check out the repo to run the spam-detection scripts.
8+
issues: write # read issue contents (gh issue view), comment, label, and close issues detected as spam.
9+
models: read # run inference via `gh models run` for spam classification.
1010

1111
jobs:
1212
issue-spam:
1313
runs-on: ubuntu-latest
14-
environment: cli-automation
1514
steps:
1615
- name: Checkout repository
1716
uses: actions/checkout@v6
1817
- name: Run spam detection
1918
env:
20-
GH_TOKEN: ${{ secrets.AUTOMATION_TOKEN }}
19+
GH_TOKEN: ${{ github.token }}
2120
ISSUE_URL: ${{ github.event.issue.html_url }}
2221
run: |
2322
./.github/workflows/scripts/spam-detection/process-issue.sh "$ISSUE_URL"

.github/workflows/govulncheck.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Go Vulnerability Check
22
on:
33
schedule:
4-
- cron: "0 0 * * 1" # Every Monday at midnight UTC
4+
- cron: "0 0 * * *" # Every day at midnight UTC
55
workflow_dispatch:
66

77
jobs:
@@ -26,6 +26,6 @@ jobs:
2626
go run golang.org/x/vuln/cmd/govulncheck@d1f380186385b4f64e00313f31743df8e4b89a77 -format sarif ./... > gh.sarif
2727
2828
- name: Upload SARIF report
29-
uses: github/codeql-action/upload-sarif@v4
29+
uses: github/codeql-action/upload-sarif@v4.35.5
3030
with:
3131
sarif_file: gh.sarif

.github/workflows/homebrew-bump.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

.github/workflows/triage-discussion-label.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

.golangci.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ linters:
2929
# - staticcheck
3030
# - errcheck
3131
exclusions:
32-
paths:
33-
- third-party
3432
rules:
3533
- path: _test\.go$
3634
linters:
@@ -62,9 +60,6 @@ linters:
6260
formatters:
6361
enable:
6462
- gofmt
65-
exclusions:
66-
paths:
67-
- third-party
6863

6964
issues:
7065
max-issues-per-linter: 0

docs/release-process-deep-dive.md

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ From a high level, the [release workflow](https://github.com/cli/cli/blob/537a22
1111
* Builds and updates the [manual](https://cli.github.com/manual) and repository packages
1212
* Creates GitHub Attestations for the artifacts
1313
* Creates a GitHub Release and attaches the artifacts
14-
* Bumps the `gh` [homebrew-core formula](https://github.com/Homebrew/homebrew-core/blob/2df031cbd8f7bc9b9a380e941ccefcf3c8f3d02b/Formula/g/gh.rb)
1514

1615
# Jobs Deep Dive
1716

@@ -569,16 +568,6 @@ release:
569568
git log --oneline @{upstream}..
570569
git diff --name-status @{upstream}..
571570
fi
572-
- name: Bump homebrew-core formula
573-
uses: mislav/bump-homebrew-formula-action@v3
574-
if: inputs.environment == 'production' && !contains(inputs.tag_name, '-')
575-
with:
576-
formula-name: gh
577-
formula-path: Formula/g/gh.rb
578-
tag-name: ${{ inputs.tag_name }}
579-
push-to: williammartin/homebrew-core
580-
env:
581-
COMMITTER_TOKEN: ${{ secrets.HOMEBREW_PR_PAT }}
582571
```
583572
</details>
584573

@@ -647,11 +636,11 @@ In previous steps, a git commit was made for the manual, and files had moved int
647636

648637
Occasionally, the repository can become unwieldy due to hosting so many large binary artifacts. Instructions can be found in the README for that repository.
649638

650-
#### Homebrew Formula
639+
#### Homebrew
651640

652-
Using [`mislav/bump-homebrew-formula-action`](https://github.com/mislav/bump-homebrew-formula-action), a PR for the `gh` [`homebrew-core` formula](https://github.com/Homebrew/homebrew-core/blob/master/Formula/g/gh.rb) is created. The fork repository is currently owned by `williammartin` as PRs are [not accepted from organizations.](https://github.com/cli/cli/pull/7953)
641+
Historically, we used [`mislav/bump-homebrew-formula-action`](https://github.com/mislav/bump-homebrew-formula-action). It created a PR for the `gh` [`homebrew-core` formula](https://github.com/Homebrew/homebrew-core/blob/master/Formula/g/gh.rb). The fork repository was owned by `williammartin` because PRs are [not accepted from organizations.](https://github.com/cli/cli/pull/7953)
653642

654-
`Homebrew/formulae.brew.sh` makes new formula versions available every 15 minutes through scheduled CI workflow. For more information, see https://docs.brew.sh/Formula-Cookbook#an-introduction
643+
However, since this required a legacy PAT token to open a PR between these repositories, it was deemed too much risk for our security. As such, we now rely on [Homebrew's autobump](https://docs.brew.sh/Autobump).
655644

656645
## <a id="deepest-dive">Deepest Dive</a>
657646

docs/releasing.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,14 @@ What this does is:
2121
- Uploads all release artifacts to a new GitHub Release;
2222
- A new git tag `vX.Y.Z` is created in the remote repository;
2323
- The changelog is [generated from the list of merged pull requests](https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes);
24-
- Updates [GitHub CLI marketing site](https://cli.github.com) with the contents of the new release;
25-
- Updates the [`gh` Homebrew formula](https://github.com/williammartin/homebrew-core/blob/master/Formula/g/gh.rb) in the [`homebrew/homebrew-core` repo](https://github.com/search?q=repo%3AHomebrew%2Fhomebrew-core+%22gh%22+in%3Atitle&type=pullrequests).
24+
- Updates [GitHub CLI marketing site](https://cli.github.com) with the contents of the new release.
2625

27-
> [!NOTE]
28-
> `Homebrew/formulae.brew.sh` makes new formula versions available every 15 minutes through scheduled [CI workflow](https://github.com/Homebrew/formulae.brew.sh/actions/workflows/tests.yml).
29-
>
30-
> For more information, see https://docs.brew.sh/Formula-Cookbook#an-introduction
26+
## Bumping Homebrew
27+
28+
Homebrew bumps are handled by [autobump](https://docs.brew.sh/Autobump), which runs periodically every 3 hours. In cases where a quicker rollout is required, a pull request can be opened manually with the following steps:
29+
1. Replace the version number in the url to point ot the updated version.
30+
2. Calculate and replace the sha256 value.
31+
3. Open the PR.
3132

3233
To test out the build system while avoiding creating an actual release:
3334

@@ -60,6 +61,5 @@ Occasionally, it might be necessary to clean up a bad release and re-release.
6061

6162
1. Delete the release and associated tag
6263
2. Re-release and monitor the workflow run logs
63-
3. Open pull request updating [`gh` Homebrew formula](https://github.com/williammartin/homebrew-core/blob/master/Formula/g/gh.rb)
64-
with new SHA versions, linking the previous PR
64+
3. Open pull request updating [`gh` Homebrew formula](https://github.com/Homebrew/homebrew-core/blob/master/Formula/g/gh.rb) with new SHA versions, linking the previous PR
6565
4. Verify resulting Debian and RPM packages, Homebrew formula

0 commit comments

Comments
 (0)