[CI] Use github's graphQL to query review state directly#14661
Merged
hail-ci-robot merged 5 commits intohail-is:mainfrom Aug 25, 2024
Merged
[CI] Use github's graphQL to query review state directly#14661hail-ci-robot merged 5 commits intohail-is:mainfrom
hail-ci-robot merged 5 commits intohail-is:mainfrom
Conversation
ehigham
reviewed
Aug 21, 2024
| query {{ | ||
| repository(owner: "{self.target_branch.branch.repo.owner}", name: "{self.target_branch.branch.repo.name}") {{ | ||
| pullRequest(number: {self.number}) {{ | ||
| number |
Collaborator
Author
There was a problem hiding this comment.
Ooh, good catch. This is the PR number, I was just using it as a sanity check when testing the API out manually. It's not really necessary any more, assuming we trust github to return what we ask it for
iris-garden
approved these changes
Aug 21, 2024
Contributor
iris-garden
left a comment
There was a problem hiding this comment.
Looks good to me with the manual testing!
patrick-schultz
approved these changes
Aug 22, 2024
Member
patrick-schultz
left a comment
There was a problem hiding this comment.
Thanks Chris, this is clearly the right way to get the review state.
f7a3230 to
eee1702
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.
Fixes #14660 by using the graphQL API to query github directly. Replaces our current parallel interpretation of reviews into a review decision, which is brittle if we ever change review requirements in github again.
Tested by manually updating the live CI to use the test batch generated image. Results:
job_group_inst_coll_cancellable_resources#14645 is now considered pending, rather than approved, which is what we are currently, incorrectly, calculating)