Skip to content

Commit 25d4856

Browse files
authored
Merge branch 'cli:trunk' into trunk
2 parents d8a71a7 + c8152ed commit 25d4856

1,668 files changed

Lines changed: 222946 additions & 6706 deletions

File tree

Some content is hidden

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

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"image": "mcr.microsoft.com/devcontainers/go:1.22",
2+
"image": "mcr.microsoft.com/devcontainers/go:1.24",
33
"features": {
44
"ghcr.io/devcontainers/features/sshd:1": {}
55
},

.github/CODEOWNERS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ internal/codespaces/ @cli/codespaces
55

66
# Limit Package Security team ownership to the attestation command package and related integration tests
77
pkg/cmd/attestation/ @cli/package-security
8+
pkg/cmd/release/attestation/ @cli/package-security
9+
pkg/cmd/release/verify/ @cli/package-security
10+
pkg/cmd/release/verify-asset/ @cli/package-security
11+
pkg/cmd/release/shared/ @cli/package-security
12+
813
test/integration/attestation-cmd @cli/package-security
914

1015
pkg/cmd/attestation/verification/embed/tuf-repo.github.com/ @cli/tuf-root-reviewers

.github/CONTRIBUTING.md

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,27 @@ Hi! Thanks for your interest in contributing to the GitHub CLI!
44

55
We accept pull requests for bug fixes and features where we've discussed the approach in an issue and given the go-ahead for a community member to work on it. We'd also love to hear about ideas for new features as issues.
66

7-
Please do:
7+
### Please do:
88

9-
* Check issues to verify that a [bug][bug issues] or [feature request][feature request issues] issue does not already exist for the same problem or feature.
10-
* Open an issue if things aren't working as expected.
11-
* Open an issue to propose a significant change.
12-
* Open an issue to propose a design for an issue labelled [`needs-design` and `help wanted`][needs design and help wanted], following the [proposing a design guidelines](#proposing-a-design) instructions below.
13-
* Open a pull request to fix a bug.
14-
* Open a pull request to fix documentation about a command.
15-
* Open a pull request for any issue labelled [`help wanted`][hw] or [`good first issue`][gfi].
9+
* Check issues to verify that a [bug][bug issues] or [feature request][feature request issues] issue does not already exist for the same problem or feature
10+
* Open an issue if things aren't working as expected
11+
* Open an issue to propose a significant change
12+
* Open an issue to propose a design for an issue labelled [`needs-design` and `help wanted`][needs design and help wanted], following the [proposing a design guidelines](#proposing-a-design) instructions below
13+
* Open an issue to propose a new community supported `gh` package with details about support and redistribution
14+
* Mention `@cli/code-reviewers` when an issue you want to work on does not have clear Acceptance Criteria
15+
* Open a pull request for any issue labelled [`help wanted`][hw] and [`good first issue`][gfi]
1616

17-
Please avoid:
17+
### Please _do not_:
1818

19-
* Opening pull requests for issues marked `needs-design`, `needs-investigation`, or `blocked`.
20-
* Opening pull requests that haven't been approved for work in an issue
21-
* Adding installation instructions specifically for your OS/package manager.
22-
* Opening pull requests for any issue marked `core`. These issues require additional context from
23-
the core CLI team at GitHub and any external pull requests will not be accepted.
19+
* Open a pull request for issues without the `help wanted` label or explicit Acceptance Criteria
20+
* Expand pull request scope to include changes that are not described in the issue's Acceptance Criteria
21+
* Open pull requests for any issue marked `core`. These issues require additional context from
22+
the core CLI team at GitHub and any external pull requests will not be accepted
2423

2524
## Building the project
2625

2726
Prerequisites:
28-
- Go 1.22+
27+
- Go 1.24+
2928

3029
Build with:
3130
* Unix-like systems: `make`
@@ -63,9 +62,9 @@ To propose a design:
6362
- Include a link to the issue that the design is for.
6463
- Describe the design you are proposing to resolve the issue, leveraging the [CLI Design System][].
6564
- Mock up the design you are proposing using our [Google Docs Template][] or code blocks.
66-
- Mock ups should cleary illustrate the command(s) being run and the expected output(s).
65+
- Mock ups should clearly illustrate the command(s) being run and the expected output(s).
6766

68-
### (core team only) Revewing a design
67+
### (core team only) Reviewing a design
6968

7069
A member of the core team will [triage](../docs/triage.md) the design proposal. Once a member of the core team has reviewed the design, they may add the [`help wanted`][hw] label to the issue, so a PR can be opened to provide the implementation.
7170

@@ -87,5 +86,5 @@ A member of the core team will [triage](../docs/triage.md) the design proposal.
8786
[How to Contribute to Open Source]: https://opensource.guide/how-to-contribute/
8887
[Using Pull Requests]: https://docs.github.com/en/free-pro-team@latest/github/collaborating-with-issues-and-pull-requests/about-pull-requests
8988
[GitHub Help]: https://docs.github.com/
90-
[CLI Design System]: https://primer.style/cli/
89+
[CLI Design System]: /docs/primer/
9190
[Google Docs Template]: https://docs.google.com/document/d/1JIRErIUuJ6fTgabiFYfCH3x91pyHuytbfa0QLnTfXKM/edit#heading=h.or54sa47ylpg

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ assignees: ''
99

1010
### Describe the bug
1111

12-
A clear and concise description of what the bug is. Include version by typing `gh --version`.
12+
A clear and concise description of what the bug is.
13+
14+
### Affected version
15+
16+
Please run `gh version` and paste the output below.
1317

1418
### Steps to reproduce the behavior
1519

.github/dependabot.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ updates:
77
ignore:
88
- dependency-name: "*"
99
update-types:
10-
- version-update:semver-minor
1110
- version-update:semver-major
1211
- package-ecosystem: "github-actions"
1312
directory: "/"

.github/licenses.tmpl

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# GitHub CLI dependencies
2+
3+
The following open source dependencies are used to build the [cli/cli][] GitHub CLI.
4+
5+
## Go Packages
6+
7+
Some packages may only be included on certain architectures or operating systems.
8+
9+
{{ range . }}
10+
- [{{.Name}}](https://pkg.go.dev/{{.Name}}) ([{{.LicenseName}}]({{.LicenseURL}}))
11+
{{- end }}
12+
13+
[cli/cli]: https://github.com/cli/cli

.github/secret_scanning.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
paths-ignore:
2+
- 'third-party/**'
3+
- 'third-party-licenses.*.md'

.github/workflows/bump-go.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Bump Go
2+
on:
3+
schedule:
4+
- cron: "0 3 * * *" # 3 AM UTC
5+
permissions:
6+
contents: write
7+
pull-requests: write
8+
jobs:
9+
bump-go:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v5
14+
15+
- name: Set up Go
16+
uses: actions/setup-go@v6
17+
with:
18+
go-version-file: 'go.mod'
19+
20+
- name: Bump Go version
21+
env:
22+
GIT_COMMITTER_NAME: cli automation
23+
GIT_AUTHOR_NAME: cli automation
24+
GIT_COMMITTER_EMAIL: noreply@github.com
25+
GIT_AUTHOR_EMAIL: noreply@github.com
26+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27+
run: |
28+
bash .github/workflows/scripts/bump-go.sh --apply go.mod

.github/workflows/codeql.yml

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,45 @@ permissions:
1818
jobs:
1919
CodeQL-Build:
2020
runs-on: ubuntu-latest
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
language: ['go', 'actions']
2125

2226
steps:
2327
- name: Check out code
24-
uses: actions/checkout@v4
28+
uses: actions/checkout@v5
29+
30+
- name: Setup Go
31+
if: matrix.language == 'go'
32+
uses: actions/setup-go@v6
33+
with:
34+
go-version-file: "go.mod"
2535

2636
- name: Initialize CodeQL
2737
uses: github/codeql-action/init@v3
2838
with:
29-
languages: go
39+
languages: ${{ matrix.language }}
3040
queries: security-and-quality
3141

32-
- name: Setup Go
33-
uses: actions/setup-go@v5
34-
with:
35-
go-version-file: 'go.mod'
36-
3742
- name: Perform CodeQL Analysis
3843
uses: github/codeql-action/analyze@v3
44+
with:
45+
category: "/language:${{ matrix.language }}"
46+
upload: false
47+
output: sarif-results
48+
49+
- name: Filter SARIF for third-party code
50+
if: matrix.language == 'go'
51+
uses: advanced-security/filter-sarif@f3b8118a9349d88f7b1c0c488476411145b6270d # v1.0.1
52+
with:
53+
patterns: |
54+
-third-party/**
55+
input: sarif-results/${{ matrix.language }}.sarif
56+
output: sarif-results/${{ matrix.language }}.sarif
57+
58+
- name: Upload filtered SARIF
59+
uses: github/codeql-action/upload-sarif@v3
60+
with:
61+
sarif_file: sarif-results/${{ matrix.language }}.sarif
62+
category: "/language:${{ matrix.language }}"

.github/workflows/deployment.yml

Lines changed: 31 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,29 @@ on:
2828
default: true
2929

3030
jobs:
31+
validate-tag-name:
32+
runs-on: ubuntu-latest
33+
steps:
34+
- name: Validate tag name format
35+
run: |
36+
if [[ ! "${{ inputs.tag_name }}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
37+
echo "Invalid tag name format. Must be in the form v1.2.3"
38+
exit 1
39+
fi
3140
linux:
41+
needs: validate-tag-name
3242
runs-on: ubuntu-latest
3343
environment: ${{ inputs.environment }}
3444
if: contains(inputs.platforms, 'linux')
3545
steps:
3646
- name: Checkout
37-
uses: actions/checkout@v4
47+
uses: actions/checkout@v5
3848
- name: Set up Go
39-
uses: actions/setup-go@v5
49+
uses: actions/setup-go@v6
4050
with:
4151
go-version-file: 'go.mod'
4252
- name: Install GoReleaser
43-
uses: goreleaser/goreleaser-action@v6
53+
uses: goreleaser/goreleaser-action@9c156ee8a17a598857849441385a2041ef570552
4454
with:
4555
version: "~1.17.1"
4656
install-only: true
@@ -63,14 +73,15 @@ jobs:
6373
dist/*.deb
6474
6575
macos:
76+
needs: validate-tag-name
6677
runs-on: macos-latest
6778
environment: ${{ inputs.environment }}
6879
if: contains(inputs.platforms, 'macos')
6980
steps:
7081
- name: Checkout
71-
uses: actions/checkout@v4
82+
uses: actions/checkout@v5
7283
- name: Set up Go
73-
uses: actions/setup-go@v5
84+
uses: actions/setup-go@v6
7485
with:
7586
go-version-file: 'go.mod'
7687
- name: Configure macOS signing
@@ -92,7 +103,7 @@ jobs:
92103
security set-key-partition-list -S "apple-tool:,apple:,codesign:" -s -k "$keychain_password" "$keychain"
93104
rm "$RUNNER_TEMP/cert.p12"
94105
- name: Install GoReleaser
95-
uses: goreleaser/goreleaser-action@v6
106+
uses: goreleaser/goreleaser-action@9c156ee8a17a598857849441385a2041ef570552
96107
with:
97108
version: "~1.17.1"
98109
install-only: true
@@ -134,18 +145,19 @@ jobs:
134145
dist/*.pkg
135146
136147
windows:
137-
runs-on: windows-latest
148+
needs: validate-tag-name
149+
runs-on: windows-2022
138150
environment: ${{ inputs.environment }}
139151
if: contains(inputs.platforms, 'windows')
140152
steps:
141153
- name: Checkout
142-
uses: actions/checkout@v4
154+
uses: actions/checkout@v5
143155
- name: Set up Go
144-
uses: actions/setup-go@v5
156+
uses: actions/setup-go@v6
145157
with:
146158
go-version-file: 'go.mod'
147159
- name: Install GoReleaser
148-
uses: goreleaser/goreleaser-action@v6
160+
uses: goreleaser/goreleaser-action@9c156ee8a17a598857849441385a2041ef570552
149161
with:
150162
version: "~1.17.1"
151163
install-only: true
@@ -184,7 +196,7 @@ jobs:
184196
run: script/release --local "$TAG_NAME" --platform windows
185197
- name: Set up MSBuild
186198
id: setupmsbuild
187-
uses: microsoft/setup-msbuild@v2.0.0
199+
uses: microsoft/setup-msbuild@6fb02220983dee41ce7ae257b6f4d8f9bf5ed4ce
188200
- name: Build MSI
189201
shell: bash
190202
env:
@@ -203,10 +215,8 @@ jobs:
203215
platform="x64"
204216
;;
205217
*_arm64 )
206-
echo "skipping building MSI for arm64 because WiX 3.11 doesn't support it: https://github.com/wixtoolset/issues/issues/6141" >&2
207-
continue
208-
#source_dir="$PWD/dist/windows_windows_arm64"
209-
#platform="arm64"
218+
source_dir="$PWD/dist/windows_windows_arm64"
219+
platform="arm64"
210220
;;
211221
* )
212222
printf "unsupported architecture: %s\n" "$MSI_NAME" >&2
@@ -244,11 +254,11 @@ jobs:
244254
if: inputs.release
245255
steps:
246256
- name: Checkout cli/cli
247-
uses: actions/checkout@v4
257+
uses: actions/checkout@v5
248258
- name: Merge built artifacts
249-
uses: actions/download-artifact@v4
259+
uses: actions/download-artifact@v5
250260
- name: Checkout documentation site
251-
uses: actions/checkout@v4
261+
uses: actions/checkout@v5
252262
with:
253263
repository: github/cli.github.com
254264
path: site
@@ -291,15 +301,15 @@ jobs:
291301
base64 -d <<<"$GPG_KEY" | gpg --import --no-tty --batch --yes
292302
echo "allow-preset-passphrase" > ~/.gnupg/gpg-agent.conf
293303
gpg-connect-agent RELOADAGENT /bye
294-
/usr/lib/gnupg2/gpg-preset-passphrase --preset "$GPG_KEYGRIP" <<<"$GPG_PASSPHRASE"
304+
base64 -d <<<"$GPG_PASSPHRASE" | /usr/lib/gnupg2/gpg-preset-passphrase --preset "$GPG_KEYGRIP"
295305
- name: Sign RPMs
296306
if: inputs.environment == 'production'
297307
run: |
298308
cp script/rpmmacros ~/.rpmmacros
299309
rpmsign --addsign dist/*.rpm
300310
- name: Attest release artifacts
301311
if: inputs.environment == 'production'
302-
uses: actions/attest-build-provenance@7668571508540a607bdfd90a87a560489fe372eb # v2.1.0
312+
uses: actions/attest-build-provenance@e8998f949152b193b063cb0ec769d69d929409be # v2.4.0
303313
with:
304314
subject-path: "dist/gh_*"
305315
- name: Run createrepo
@@ -351,8 +361,6 @@ jobs:
351361
)
352362
if [[ $TAG_NAME == *-* ]]; then
353363
release_args+=( --prerelease )
354-
else
355-
release_args+=( --discussion-category "General" )
356364
fi
357365
guard="echo"
358366
[ "$DO_PUBLISH" = "false" ] || guard=""
@@ -376,7 +384,7 @@ jobs:
376384
git diff --name-status @{upstream}..
377385
fi
378386
- name: Bump homebrew-core formula
379-
uses: mislav/bump-homebrew-formula-action@v3
387+
uses: mislav/bump-homebrew-formula-action@8e2baa47daaa8db10fcdeb04105dfa6850eb0d68
380388
if: inputs.environment == 'production' && !contains(inputs.tag_name, '-')
381389
with:
382390
formula-name: gh

0 commit comments

Comments
 (0)