Skip to content

Commit

Permalink
Merge pull request #16983 from bartekpacia/fix/github_pat_finegrained
Browse files Browse the repository at this point in the history
make fine-grained PATs work as $HOMEBREW_GITHUB_API_TOKEN
  • Loading branch information
MikeMcQuaid authored Mar 31, 2024
2 parents 221fde4 + 1aa2565 commit 3e8dc3c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Library/Homebrew/utils/github/api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def self.pat_blurb(scopes = ALL_SCOPES)
CREATE_ISSUE_FORK_OR_PR_SCOPES = ["repo"].freeze
CREATE_WORKFLOW_SCOPES = ["workflow"].freeze
ALL_SCOPES = (CREATE_GIST_SCOPES + CREATE_ISSUE_FORK_OR_PR_SCOPES + CREATE_WORKFLOW_SCOPES).freeze
GITHUB_PERSONAL_ACCESS_TOKEN_REGEX = /^(?:[a-f0-9]{40}|gh[po]_\w{36,251})$/
GITHUB_PERSONAL_ACCESS_TOKEN_REGEX = /^(?:[a-f0-9]{40}|(?:gh[po]|github_pat)_\w{36,251})$/

# Helper functions to access the GitHub API.
#
Expand Down

0 comments on commit 3e8dc3c

Please sign in to comment.