Handle github repos with disabled pull requests#3783
Open
Conversation
Signed-off-by: Adrian Edwards <[email protected]>
for better handling of future query param encoding needs and sharing responsibility for url creation (GhDA owns the domain/base url, the caller owns the path and query params they want to use) Signed-off-by: Adrian Edwards <[email protected]>
Signed-off-by: Adrian Edwards <[email protected]>
f87421d to
9a4e57e
Compare
… this in the future Signed-off-by: Adrian Edwards <[email protected]>
sgoggins
previously approved these changes
Mar 25, 2026
mn-ram
added a commit
to mn-ram/augur
that referenced
this pull request
Mar 27, 2026
Builds on augurlabs#3783 (check_prs_enabled infrastructure). Applies the same disabled-PR check to collect_pull_request_review_comments, which hits the repos/{owner}/{repo}/pulls/comments endpoint — this also returns 404 when PRs are disabled and had no prior handling. Also migrates the URL construction to use GithubDataAccess.endpoint_url() following the pattern established in retrieve_all_pr_data.
2 tasks
mn-ram
added a commit
to mn-ram/augur
that referenced
this pull request
Mar 27, 2026
Builds on augurlabs#3783 (check_prs_enabled infrastructure). Applies the same disabled-PR check to collect_pull_request_review_comments, which hits the repos/{owner}/{repo}/pulls/comments endpoint — this also returns 404 when PRs are disabled and had no prior handling. Also migrates the URL construction to use GithubDataAccess.endpoint_url() following the pattern established in retrieve_all_pr_data. Signed-off-by: mn-ram <[email protected]>
…g what it already does Signed-off-by: Adrian Edwards <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Github recently added the ability to disable PRs on repos to help projects handle AI slop in the short term.
For whatever reason, the API for disabled PRs is throwing a 404 error that we werent previously handling because we were assuming these api calls would always exist.
This PR fixes #3731
this is done by creating a new function within the
GitHubDataAccessclass that is intended to check for these 404s and return in a way that can be used to skip the affected task.Notes for Reviewers
This PR also includes a forward-looking function that builds on the discussions that have happened around how and where to build URLs to achieve what may be a best of both worlds approach.
Under this new system, GithubDataAccess has
endpoint_url, which, when provided with a URL path and optional dictionary of search arguments, assembles a full URL. This puts GitHubDataAccess in charge of providing the base domain for an API call, while leaving callers in charge of the url path they would like to call. The benefits of this include:Testing
I will test this locally on some known-affected repos from the underlying issue to confirm the fix.
Signed commits