Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/bump-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
Copy link

Copilot AI Feb 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Disabling setup-go caching fixes the extraction issue, but it’s non-obvious in the workflow file itself. Add a short inline comment explaining the specific cache restore failure this avoids (and ideally a link to the relevant issue/run log) so future maintainers don’t re-enable it and reintroduce the problem.

Suggested change
go-version-file: 'go.mod'
go-version-file: 'go.mod'
# Intentionally disable setup-go caching: restoring a cached Go toolchain caused CodeQL Go extraction to fail in this workflow.

Copilot uses AI. Check for mistakes.
cache: false

- name: Bump Go version
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scripts/bump-go.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ COMMIT_HASH=$(git rev-parse --short HEAD)
PR_TITLE="$COMMIT_MSG"

# ---- Check for existing PR --------------------------------------------------
existing_pr=$(gh search prs --repo cli/cli --match title "$PR_TITLE" --json title --jq "map(select(.title == \"$PR_TITLE\") | .title) | length > 0")
existing_pr=$(gh search prs --repo "$GITHUB_REPOSITORY" --match title "$PR_TITLE" --json title --jq "map(select(.title == \"$PR_TITLE\") | .title) | length > 0")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Provide fallback when GITHUB_REPOSITORY is unset

Because the script runs with set -u, expanding "$GITHUB_REPOSITORY" here causes an immediate unbound variable failure when the script is executed outside GitHub Actions (for example, local dry-runs described in the script header). This commit makes local/manual execution regress from “works with a fixed repo” to “hard fail before PR lookup,” so the repo argument should use a safe default or derived fallback when GITHUB_REPOSITORY is missing.

Useful? React with 👍 / 👎.

Copy link

Copilot AI Feb 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bump-go.sh is documented as runnable locally, but with set -u this change will cause an immediate error when GITHUB_REPOSITORY isn’t set (common outside GitHub Actions). Consider deriving the repo from gh repo view / git remote as a fallback, or explicitly validate GITHUB_REPOSITORY and update usage() to require it when not running in Actions.

Copilot uses AI. Check for mistakes.

if [[ "$existing_pr" == "true" ]]; then
echo "Found an existing open PR titled '$PR_TITLE'. Skipping push/PR creation."
Expand Down
Loading