10000 Inject token into bump-go workflow by williammartin · Pull Request #11233 · cli/cli · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Inject token into bump-go workflow #11233

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 5, 2025
Merged

Conversation

williammartin
Copy link
Member

@Copilot Copilot AI review requested due to automatic review settings July 5, 2025 10:08
@williammartin williammartin requested a review from a team as a code owner July 5, 2025 10:08
@williammartin williammartin requested a review from BagToad July 5, 2025 10:08
Copy link
Contributor
@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR injects the GitHub token into the bump-go workflow to enable authenticated operations when bumping Go module files.

  • Adds the GH_TOKEN environment variable sourced from secrets.GITHUB_TOKEN
  • Ensures the bump-go.sh script can push changes back to the repository

@@ -18,5 +18,6 @@ jobs:
GIT_AUTHOR_NAME: cli automation
GIT_COMMITTER_EMAIL: noreply@github.com
GIT_AUTHOR_EMAIL: noreply@github.com
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Copy link
Preview
Copilot AI Jul 5, 2025

Choose a reason for hiding this comment

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

Consider adding an explicit permissions block at the top of the workflow (e.g., permissions: contents: write) to limit the scope of GITHUB_TOKEN and follow the principle of least privilege.

Copilot uses AI. Check for mistakes.

Copy link
Member Author

Choose a reason for hiding this comment

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

Is already there.

This is because go mod tidy seems to add minor version to the go mod
directive when it is missing.
@williammartin
Copy link
Member Author

I'm merging this without review because I perceive it as low risk and I'd really like to see it run on the daily schedule with these changes.

@williammartin williammartin merged commit 1cbfbf8 into trunk Jul 5, 2025
15 checks passed
@williammartin williammartin deleted the wm/bump-go-has-token branch July 5, 2025 11:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0