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
Fixes #11794: quality assistant should merge approved PR #333
Fixes #11794: quality assistant should merge approved PR #333
Conversation
Commit modified |
c8ec19e
to
3be0998
Compare
api_url = "https://api.github.com/repos/Normation/{repo}/pulls/{id}/reviews" | ||
url = api_url.format(repo=repo, id=data["number"]) | ||
status = {} | ||
for review in github_call(url): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would reorganize:
reviews = github_call(url) if len(reviews) == 0: skip (no review) else: for review in reviews: status[review['user']['login']] = review['state'] if "CHANGE_REQUESTED" in status.values: reassign else: if freeze: skip (freeze) else: merge
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has also a side effect of reassing at every run (but don't know if it's a problem though)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test this comment
Commit modified |
3be0998
to
c8a87e0
Compare
c8a87e0
to
bacc584
Compare
Commit modified |
OK, merging this PR |
https://www.rudder-project.org/redmine/issues/11794