Skip to content
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

Merged
merged 2 commits into from
Mar 28, 2019

Conversation

croissanne
Copy link
Contributor

@croissanne croissanne commented Mar 27, 2019

TODO:

  • test this on this very pr!

@croissanne croissanne added the no-test For doc/workflow changes, or experiments which don't need a full CI run, label Mar 27, 2019
@croissanne croissanne changed the title bots: Adapt push-rewrite to webhook quickly posting test statuses bots: Adapt push-rewrite to webhook quickly posting test statuses [no-test] Mar 27, 2019
@croissanne croissanne changed the title bots: Adapt push-rewrite to webhook quickly posting test statuses [no-test] bots: Adapt push-rewrite to webhook quickly posting test statuses Mar 27, 2019
@@ -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"]))
Copy link
Member

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.

Copy link
Contributor Author

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

@croissanne croissanne added no-test For doc/workflow changes, or experiments which don't need a full CI run, and removed no-test For doc/workflow changes, or experiments which don't need a full CI run, labels Mar 27, 2019
@croissanne croissanne removed the no-test For doc/workflow changes, or experiments which don't need a full CI run, label Mar 27, 2019
bots/push-rewrite Outdated Show resolved Hide resolved
bots/push-rewrite Outdated Show resolved Hide resolved
@croissanne croissanne added the no-test For doc/workflow changes, or experiments which don't need a full CI run, label Mar 27, 2019
@croissanne croissanne removed no-test For doc/workflow changes, or experiments which don't need a full CI run, test-external labels Mar 27, 2019
@croissanne croissanne added no-test For doc/workflow changes, or experiments which don't need a full CI run, and removed no-test For doc/workflow changes, or experiments which don't need a full CI run, test-external labels Mar 28, 2019
@croissanne croissanne removed no-test For doc/workflow changes, or experiments which don't need a full CI run, test-external labels Mar 28, 2019
@croissanne croissanne added the no-test For doc/workflow changes, or experiments which don't need a full CI run, label Mar 28, 2019
@croissanne croissanne added no-test For doc/workflow changes, or experiments which don't need a full CI run, and removed no-test For doc/workflow changes, or experiments which don't need a full CI run, labels Mar 28, 2019
@croissanne croissanne removed the no-test For doc/workflow changes, or experiments which don't need a full CI run, label Mar 28, 2019
Copy link
Member

@martinpitt martinpitt left a 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.

if pull["head"]["sha"] == sha:
return pull
sys.stderr.write("Could not find pull with revision {0}.\n".format(sha))
return 1
Copy link
Member

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.

@croissanne croissanne added the no-test For doc/workflow changes, or experiments which don't need a full CI run, label Mar 28, 2019
@croissanne croissanne removed the no-test For doc/workflow changes, or experiments which don't need a full CI run, label Mar 28, 2019
Copy link
Member

@martinpitt martinpitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dank je wel!

@martinpitt martinpitt merged commit 200fca9 into cockpit-project:master Mar 28, 2019
@croissanne croissanne deleted the push-rewrite-fix branch September 23, 2019 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants