-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
bots: Adapt push-rewrite to webhook quickly posting test statuses #11478
bots: Adapt push-rewrite to webhook quickly posting test statuses #11478
Conversation
bots/push-rewrite
Outdated
@@ -54,6 +61,10 @@ def main(): | |||
api = github.GitHub(repo=opts.repo) | |||
old_statuses = api.statuses(remote) | |||
|
|||
# add [no-test] to title to prevent tests bring triggered | |||
pull = find_pr_with_sha(api, remote) | |||
api.post("pulls/{0}".format(pull["number"]), "{0} [no-test]".format(pull["title"])) |
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.
As this works on an existing PR by definition, couldn't this now use the label? This would avoid github notification email noise.
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.
oh yea, then that's preferred
a935533
to
76b25e4
Compare
76b25e4
to
055d955
Compare
055d955
to
ae84643
Compare
ae84643
to
0d4a689
Compare
0d4a689
to
fb5684e
Compare
fb5684e
to
785c478
Compare
785c478
to
92ef9bd
Compare
92ef9bd
to
b563cc3
Compare
d8f0e1a
to
6bc5fc9
Compare
6bc5fc9
to
eb873b2
Compare
eb873b2
to
46fc52a
Compare
46fc52a
to
fed5d70
Compare
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.
Looks good now, and it seems you thoroughly tested this (judging by the number of force-pushes). Just one minor issue left.
bots/push-rewrite
Outdated
if pull["head"]["sha"] == sha: | ||
return pull | ||
sys.stderr.write("Could not find pull with revision {0}.\n".format(sha)) | ||
return 1 |
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 will just be interpreted by the caller as "pull request #1", so please rather do sys.exit() here.
fed5d70
to
35ce906
Compare
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.
Dank je wel!
TODO: