fix: skip PR review comment collection when pull requests are disabled#3798
Open
mn-ram wants to merge 1 commit intoaugurlabs:fix/disabled_prsfrom
Open
fix: skip PR review comment collection when pull requests are disabled#3798mn-ram wants to merge 1 commit intoaugurlabs:fix/disabled_prsfrom
mn-ram wants to merge 1 commit intoaugurlabs:fix/disabled_prsfrom
Conversation
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]>
060a698 to
3ab406d
Compare
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
Builds on #3783 which added the
check_prs_enabled()infrastructure and applied it toretrieve_all_pr_data.This PR applies the same check to
collect_pull_request_review_comments, which hits therepos/{owner}/{repo}/pulls/commentsendpoint. This endpoint also returns 404 when pull requests are disabled on a repo, and previously had no handling for that case — causing an unhandled exception in the secondary collection phase.Changes:
check_prs_enabled()early incollect_pull_request_review_commentsand return gracefully if PRs are disabledGithubRandomKeyAuthandGithubDataAccessinstantiation before the checkGithubDataAccess.endpoint_url()following the pattern fromretrieve_all_pr_dataTesting
collect_pull_request_review_commentslogs an info message and returns without errorSigned commits