Skip to content
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

make fine-grained PATs work as $HOMEBREW_GITHUB_API_TOKEN #16983

Merged
merged 1 commit into from
Mar 31, 2024

Conversation

bartekpacia
Copy link
Contributor

@bartekpacia bartekpacia commented Mar 30, 2024

fix #16978

regex suggested by @Bo98

I confirmed that this fix works by running brew bump-formula-pr locally with $HOMEBREW_GITHUB_API_TOKEN set to my fine-grained PAT, and it worked:

logs
brew bump-formula-pr \
 --no-audit \
 --no-browse \
 --no-fork \
 --message "scripts 0.5.1" \
 --tag "v0.5.1" \
 --revision "$(git rev-parse HEAD)" \
 --force \
 bartekpacia/homebrew-tools/scripts
==> replace /tag:(\s+")v0.5.0(?=")/ with "tag:\\1v0.5.1\\2"
==> replace "a8de90aae81ac40a479ab65b2298412478acb297" with "6b5ff905e880bcc4002a992c0034dfe6bc525419"
==> Skipping `brew audit`
M	Formula/scripts.rb
Switched to a new branch 'bump-scripts-0.5.1'
[bump-scripts-0.5.1 ed068eb] scripts 0.5.1
 1 file changed, 1 insertion(+), 1 deletion(-)
remote:
remote: Create a pull request for 'bump-scripts-0.5.1' on GitHub by visiting:
remote:      https://github.com/bartekpacia/homebrew-tools/pull/new/bump-scripts-0.5.1
remote:
To https://github.com/bartekpacia/homebrew-tools
 * [new branch]      bump-scripts-0.5.1 -> bump-scripts-0.5.1
branch 'bump-scripts-0.5.1' set up to track 'https://******@github.com/bartekpacia/homebrew-tools/bump-scripts-0.5.1'.
https://github.com/bartekpacia/homebrew-tools/pull/24

I tried to find tests for the file I modified but failed at it.

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew typecheck with your changes locally?
  • Have you successfully run brew tests with your changes locally?

@bartekpacia bartekpacia marked this pull request as ready for review March 30, 2024 22:13
@MikeMcQuaid
Copy link
Member

Thanks so much for your first contribution! Without people like you submitting PRs we couldn't run this project. You rock, @bartekpacia!

@MikeMcQuaid MikeMcQuaid merged commit 3e8dc3c into Homebrew:master Mar 31, 2024
25 checks passed
@bartekpacia bartekpacia deleted the fix/github_pat_finegrained branch March 31, 2024 19:20
@github-actions github-actions bot added the outdated PR was locked due to age label May 1, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fine-grained PATs do not work when used as $HOMEBREW_GITHUB_API_TOKEN
2 participants