Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8541d6e

Browse files
authored
Merge branch 'trunk' into install_solus
2 parents 6740f6d + 51fd8ed commit 8541d6e

182 files changed

Lines changed: 9492 additions & 2118 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.23",
2+
"image": "mcr.microsoft.com/devcontainers/go:1.24",
33
"features": {
44
"ghcr.io/devcontainers/features/sshd:1": {}
55
},

.github/CODEOWNERS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ 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+
812
test/integration/attestation-cmd @cli/package-security
913

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

.github/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ We accept pull requests for bug fixes and features where we've discussed the app
2424
## Building the project
2525

2626
Prerequisites:
27-
- Go 1.23+
27+
- Go 1.24+
2828

2929
Build with:
3030
* Unix-like systems: `make`

.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/codeql.yml

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,32 @@ 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
2428
uses: actions/checkout@v4
2529

30+
- name: Setup Go
31+
if: matrix.language == 'go'
32+
uses: actions/setup-go@v5
33+
with:
34+
go-version-file: "go.mod"
35+
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
31-
32-
- name: Setup Go
33-
uses: actions/setup-go@v5
34-
with:
35-
go-version-file: 'go.mod'
41+
config: |
42+
paths-ignore:
43+
- 'third-party/**'
44+
- 'third-party-licenses.*.md'
3645
3746
- name: Perform CodeQL Analysis
3847
uses: github/codeql-action/analyze@v3
48+
with:
49+
category: "/language:${{ matrix.language }}"

.github/workflows/deployment.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ jobs:
309309
rpmsign --addsign dist/*.rpm
310310
- name: Attest release artifacts
311311
if: inputs.environment == 'production'
312-
uses: actions/attest-build-provenance@bd77c077858b8d561b7a36cbe48ef4cc642ca39d # v2.2.2
312+
uses: actions/attest-build-provenance@e8998f949152b193b063cb0ec769d69d929409be # v2.4.0
313313
with:
314314
subject-path: "dist/gh_*"
315315
- name: Run createrepo
@@ -384,7 +384,7 @@ jobs:
384384
git diff --name-status @{upstream}..
385385
fi
386386
- name: Bump homebrew-core formula
387-
uses: mislav/bump-homebrew-formula-action@942e550c6344cfdb9e1ab29b9bb9bf0c43efa19b
387+
uses: mislav/bump-homebrew-formula-action@8e2baa47daaa8db10fcdeb04105dfa6850eb0d68
388388
if: inputs.environment == 'production' && !contains(inputs.tag_name, '-')
389389
with:
390390
formula-name: gh

.github/workflows/homebrew-bump.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
runs-on: ubuntu-latest
1818
steps:
1919
- name: Bump homebrew-core formula
20-
uses: mislav/bump-homebrew-formula-action@942e550c6344cfdb9e1ab29b9bb9bf0c43efa19b
20+
uses: mislav/bump-homebrew-formula-action@8e2baa47daaa8db10fcdeb04105dfa6850eb0d68
2121
if: inputs.environment == 'production' && !contains(inputs.tag_name, '-')
2222
with:
2323
formula-name: gh

.github/workflows/lint.yml

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,7 @@ jobs:
2727
with:
2828
go-version-file: 'go.mod'
2929

30-
- name: Verify dependencies
31-
run: |
32-
go mod verify
33-
go mod download
34-
35-
LINT_VERSION=1.63.4
36-
curl -fsSL https://github.com/golangci/golangci-lint/releases/download/v${LINT_VERSION}/golangci-lint-${LINT_VERSION}-linux-amd64.tar.gz | \
37-
tar xz --strip-components 1 --wildcards \*/golangci-lint
38-
mkdir -p bin && mv golangci-lint bin/
39-
40-
- name: Run checks
30+
- name: Ensure go.mod and go.sum are up to date
4131
run: |
4232
STATUS=0
4333
assert-nothing-changed() {
@@ -49,10 +39,10 @@ jobs:
4939
STATUS=1
5040
fi
5141
}
52-
53-
assert-nothing-changed go fmt ./...
5442
assert-nothing-changed go mod tidy
55-
56-
bin/golangci-lint run --out-format=colored-line-number --timeout=3m || STATUS=$?
57-
5843
exit $STATUS
44+
45+
- name: golangci-lint
46+
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
47+
with:
48+
version: v2.1.6
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: PR Help Wanted Check
2+
on:
3+
pull_request_target:
4+
types: [opened]
5+
6+
permissions:
7+
contents: none
8+
issues: read
9+
pull-requests: write
10+
11+
jobs:
12+
check-help-wanted:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
17+
18+
- name: Check for issues without help-wanted label
19+
env:
20+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21+
PR_AUTHOR: ${{ github.event.pull_request.user.login }}
22+
PR_AUTHOR_TYPE: ${{ github.event.pull_request.user.type }}
23+
PR_AUTHOR_ASSOCIATION: ${{ github.event.pull_request.author_association }}
24+
if: "!github.event.pull_request.draft"
25+
run: |
26+
# Run the script to check for issues without help-wanted label
27+
bash .github/workflows/scripts/check-help-wanted.sh ${{ github.event.pull_request.html_url }}
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
PR_URL="$1"
6+
7+
if [ -z "$PR_URL" ]; then
8+
echo "Usage: $0 <PR_URL>"
9+
echo ""
10+
echo "Check if the PR references any non-help-wanted issues and, if so, comment"
11+
echo "on it explaining why the team might close/dismiss it."
12+
exit 1
13+
fi
14+
15+
# Skip if PR is from a bot or org member
16+
if [ "$PR_AUTHOR_TYPE" = "Bot" ] || [ "$PR_AUTHOR_ASSOCIATION" = "MEMBER" ] || [ "$PR_AUTHOR_ASSOCIATION" = "OWNER" ]; then
17+
echo "Skipping check for PR #$PR_URL as it is from a bot ($PR_AUTHOR_TYPE) or an org member ($PR_AUTHOR_ASSOCIATION: MEMBER/OWNER)"
18+
exit 0
19+
fi
20+
21+
# Extract PR number from URL for logging
22+
PR_NUM="$(basename "$PR_URL")"
23+
24+
# Extract cli/cli closing issues references from PR
25+
CLOSING_ISSUES="$(gh pr view "$PR_URL" --json closingIssuesReferences --jq '.closingIssuesReferences[] | select(.repository.name == "cli" and .repository.owner.login == "cli") | .number')"
26+
27+
if [ -z "$CLOSING_ISSUES" ]; then
28+
echo "No closing issues found for PR #$PR_NUM"
29+
exit 0
30+
fi
31+
32+
# Check each closing issue for 'help-wanted' label
33+
ISSUES_WITHOUT_HELP_WANTED=()
34+
35+
for issue_num in $CLOSING_ISSUES; do
36+
echo "Checking issue #$issue_num for 'help wanted' label..."
37+
38+
# Get issue labels
39+
LABELS=$(gh issue view "$issue_num" --json labels --jq '.labels[].name')
40+
41+
# Skip if the issue has the gh-attestion or gh-codespace label
42+
# This is because the codeowners for these commands may not be public
43+
# cli org members, and so unless we authenticate with a PAT, we can't
44+
# know who is an external contributor or not.
45+
# So we skip these issues to avoid falsely writing a comment
46+
# on each PR opened by these codeowners.
47+
if echo "$LABELS" | grep -q -e "gh-attestation" -e "gh-codespace"; then
48+
echo "Issue #$issue_num is skipped due to labels"
49+
continue
50+
fi
51+
52+
# Check if 'help wanted' label exists
53+
if ! echo "$LABELS" | grep -q "help wanted"; then
54+
ISSUES_WITHOUT_HELP_WANTED+=("$issue_num")
55+
echo "Issue #$issue_num does not have 'help wanted' label"
56+
else
57+
echo "Issue #$issue_num has 'help wanted' label"
58+
fi
59+
done
60+
61+
# If we found issues without 'help wanted' label, post a comment
62+
if [ ${#ISSUES_WITHOUT_HELP_WANTED[@]} -gt 0 ]; then
63+
echo "Found ${#ISSUES_WITHOUT_HELP_WANTED[@]} issues without 'help wanted' label"
64+
65+
# Build issue list for comment
66+
ISSUE_LIST=""
67+
for issue_num in "${ISSUES_WITHOUT_HELP_WANTED[@]}"; do
68+
ISSUE_LIST="$ISSUE_LIST- #$issue_num"$'\n'
69+
done
70+
71+
# Create comment message
72+
gh pr comment "$PR_URL" --body-file - <<EOF
73+
Thank you for your pull request! 🎉
74+
75+
This PR appears to fix the following issues that are not labeled with \`help wanted\`:
76+
77+
$ISSUE_LIST
78+
As outlined in our [Contributing Guidelines](https://github.com/cli/cli/blob/trunk/.github/CONTRIBUTING.md), we expect that PRs are only created for issues that have been labeled \`help wanted\`.
79+
80+
While we appreciate your initiative, please note that:
81+
82+
- **PRs for non-\`help wanted\` issues may not be reviewed immediately** as they might not align with our current priorities
83+
- **The issue might already be assigned** to a team member or planned for a specific release
84+
- **We may need to close this PR**. For example, if it conflicts with ongoing work or architectural decisions
85+
86+
**What happens next:**
87+
- Our team will review this PR and the associated issues
88+
- We may add the \`help wanted\` label to the issues, if appropriate, and review this pull request
89+
- In some cases, we may need to close the PR. For example, if it doesn't fit our current roadmap
90+
91+
Thank you for your understanding and contribution to the project! 🙏
92+
93+
*This comment was automatically generated by cliAutomation.*
94+
EOF
95+
96+
echo "Posted comment on PR #$PR_NUM"
97+
else
98+
echo "All closing issues have 'help wanted' label - no action needed"
99+
fi

0 commit comments

Comments
 (0)