-
Notifications
You must be signed in to change notification settings - Fork 204
Bring back mandatory travis-ci check #412
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
Conversation
|
I don't think we should close PR's that don't pass CI – or if we do make a very large timeout. Take this example: if the base |
|
@andrewda I'd hope that this would prevent Travis from breaking on master, but you're right that it could still happen. |
|
@PlasmaPower My main worry was that if something like fd6ce27 or 39b7867 were to happen, where a hotfix is pushed without going through a PR. |
|
Oh yeah, good point. |
|
In my opinion, if master is failing, we shouldn't force PRs to pass Travis, but if it is stable, we should add a timeout period to the end. Edit: if this changes, I'll upvote. |
|
Nice ideas guys! I've updated TODO |
|
Looks good now! 👍 |
|
Ironic, this breaks Travis. |
PlasmaPower
left a comment
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 still don't see where it checks if master is failing.
github_api/prs.py
Outdated
| continue | ||
|
|
||
| # check if this PR successfully passed travis-ci | ||
| build_passed = has_build_passed(api, pr["statuses_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.
You need to pass in the SHA here.
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.
yeah, didn't have time to finish, will try to do it this evening.
|
Oh, sorry, I didn't see that this was WIP. |
|
@PlasmaPower feel free to review, it's basically finished, but I can't test as I have issues running docker after all updates. |
github_api/prs.py
Outdated
| return api("PUT", path, json=data) | ||
|
|
||
|
|
||
| def close_stale_pr(api, urn, pr, delta, reason): |
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.
Maybe a better name like handle_broken_pr? This implies the PR is stale and the function will close it.
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.
Thanks @PlasmaPower ! I've struggle so much with naming of this function ^_^
|
I checked, and Travis is run for new commits on master: https://github.com/chaosbot/Chaos/commits/master Edit: also is run for squash commits I'm assuming you checked that this method of getting the status works? |
It doesn't block PRs if status is not added for some reason It doesn't block them if master is also failing
|
@PlasmaPower please review ;) |
|
🤦♂️ I've accidentally closed it |
|
🙆♀️ PR passed with a vote of 20 for and 0 against, a weighted total of 19.5 and a threshold of 6.5, and a current meritocracy review. See merge-commit 6c56cc4 for more details. |
|
looks nice =D |
How it works:
masteris checkedshaof theheadcommit is taken and it's status (example for this PR) is checked.ci failedlabel and skipped.TODO:
ci failedfor build with failing CImasteris okay (as we do with PRs with conflicts)