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

bump-*-pr: handle HOMEBREW_NO_GITHUB_API=1 being set #16925

Merged
merged 1 commit into from
Mar 25, 2024

Commits on Mar 25, 2024

  1. bump-*-pr: handle HOMEBREW_NO_GITHUB_API=1 being set

    We early return here
    https://github.com/homebrew/brew/blob/92a4311868322188478d7a90511ec0e8e6b0d7df/Library/Homebrew/utils/github/api.rb#L220
    , but don't then handle that through the stack.
    
    Repro:
    
    ```console
    ❯ HOMEBREW_NO_AUTO_UPDATE=1 HOMEBREW_NO_GITHUB_API=1 brew bump-formula-pr --write-only --version 1.2.3 --no-audit jq
    Error: undefined method `[]' for nil:NilClass
    Do not report this issue until you've run `brew update` and tried again.
    Warning: Removed Sorbet lines from backtrace!
    /opt/homebrew/Library/Homebrew/utils/github.rb:565:in `block in fetch_pull_requests'
    /opt/homebrew/Library/Homebrew/utils/github/api.rb:334:in `paginate_graphql'
    /opt/homebrew/Library/Homebrew/utils/github.rb:564:in `fetch_pull_requests'
    /opt/homebrew/Library/Homebrew/utils/github.rb:628:in `check_for_duplicate_pull_requests'
    /opt/homebrew/Library/Homebrew/dev-cmd/bump-formula-pr.rb:456:in `check_open_pull_requests'
    /opt/homebrew/Library/Homebrew/dev-cmd/bump-formula-pr.rb:135:in `run'
    /opt/homebrew/Library/Homebrew/brew.rb:89:in `<main>'
    Rerun with `--verbose` to see the original backtrace
    ```
    gibfahn committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    e11f797 View commit details
    Browse the repository at this point in the history