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

dev-cmd/bump: Don't fall over when retrieving PRs 404s #16508

Merged
merged 2 commits into from Jan 21, 2024

Conversation

issyl0
Copy link
Member

@issyl0 issyl0 commented Jan 19, 2024

  • 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?

@issyl0
Copy link
Member Author

issyl0 commented Jan 19, 2024

Wait, it's not an auth error in the original issue, I'm being an idiot. That's the 404 message instead.

@issyl0 issyl0 changed the title dev-cmd/bump: Don't fall over when GitHub API authentication fails dev-cmd/bump: Don't fall over when retrieving PRs 404s Jan 19, 2024
@issyl0 issyl0 marked this pull request as ready for review January 19, 2024 20:27
@Bo98
Copy link
Member

Bo98 commented Jan 20, 2024

Bug report looks to be a ValidationFailedError rather than a HTTPNotFoundError.

I get a 422 in when I go to https://api.github.com/search/issues?q=repo:wix/homebrew-brew

- Instead, let the `pull_requests&.any?` check do its job and not show
  PRs that we couldn't find or fetch.
- In the `--debug` output, show the error message that we got from GitHub.
@issyl0
Copy link
Member Author

issyl0 commented Jan 20, 2024

And this is why we have code review. 😅 Thanks, Bo, you were correct!

Copy link
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

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

Looks good! One optional suggestion and then can self-merge.

Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
@issyl0 issyl0 enabled auto-merge January 21, 2024 19:42
@issyl0 issyl0 merged commit c5b35b8 into Homebrew:master Jan 21, 2024
24 checks passed
@issyl0 issyl0 deleted the handle-auth-errors branch January 21, 2024 21:33
@github-actions github-actions bot added the outdated PR was locked due to age label Feb 21, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 21, 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.

brew bump --installed fails when missing pr listing rights
3 participants