lib/tutter/action/sppuppet.rb in tutter-sppuppet-1.1.2 vs lib/tutter/action/sppuppet.rb in tutter-sppuppet-1.1.3

- old
+ new

@@ -100,11 +100,11 @@ if pr.mergeable_state != 'clean' && !incident_merge_override msg = "Merge state for is not clean. Current state: #{pr.mergeable_state}\n" reassure = "I will try to merge this for you when the builds turn green\n" + "If your build fails or becomes stuck for some reason, just say 'rebuild'\n" + - 'If have an incident and want to skip the tests and the peer review, please post the link to the jira ticket.' + 'If you have an incident and want to skip the tests or the peer review, please post the link to the jira ticket.' if merge_command return post_comment(pull_request_id, msg + reassure) else return 200, msg end @@ -136,9 +136,12 @@ URL: #{pr.url} Tests: #{@client.combined_status(@project, pr.head.sha).statuses.map { |s| [s.state, s.description, s.target_url].join(", ") }.join("\n ")} #{pr.body} MERGE_MSG + if incident_merge_override + @client.add_labels_to_an_issue @project, pull_request_id, ['incident'] + end begin merge_commit = @client.merge_pull_request(@project, pull_request_id, merge_msg) rescue Octokit::MethodNotAllowed => e return post_comment(pull_request_id, "Pull request not mergeable: #{e.message}") end