Skip to content

Commit

Permalink
merging PR Chaosthebot#545: Fix "ci failed" issue v2
Browse files Browse the repository at this point in the history
Chaosthebot#545: Fix "ci failed" issue v2

Description:
Previously, chaosbot would remove the tag when the build was still pending. That caused problems, as seen in Chaosthebot#543. With this, it should be stable (it won't be removed then added again).

:white_check_mark: PR passed with a vote of 6 for and 0 against, a weighted total of 6.0 and a threshold of 6.0, and a current meritocracy review.

Vote record:
@PlasmaPower: 1
@Reuh: 1
@andrewda: 1
@mark-i-m: 1
@md678685: 1
@rudehn: 1
  • Loading branch information
PlasmaPower authored and chaosbot committed Jun 10, 2017
1 parent e0e3528 commit a5dd723
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions github_api/prs.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,10 +249,8 @@ def get_ready_prs(api, urn, window):

# if master successfully passes travis build check this pr
if master_build_passed:
build_failed = has_build_failed(api, urn, pr["head"]["sha"])

# if this PR fails - add label and close it if it's stale
if build_failed:
if has_build_failed(api, urn, pr["head"]["sha"]):
issues.label_issue(api, urn, pr_num, ["ci failed"])
handle_broken_pr(api, urn, pr, delta, "ci")
continue
Expand All @@ -264,7 +262,9 @@ def get_ready_prs(api, urn, window):
mergeable = get_is_mergeable(api, urn, pr_num)

if mergeable is True:
issues.unlabel_issue(api, urn, pr_num, ["conflicts", "ci failed"])
issues.unlabel_issue(api, urn, pr_num, ["conflicts"])
if has_build_passed(api, urn, pr["head"]["sha"]):
issues.unlabel_issue(api, urn, pr_num, ["ci failed"])
yield pr
elif mergeable is False:
issues.label_issue(api, urn, pr_num, ["conflicts"])
Expand Down

0 comments on commit a5dd723

Please sign in to comment.