Skip to content

Commit

Permalink
pull requests: Remove merge conflict labels during PR update checks.
Browse files Browse the repository at this point in the history
  • Loading branch information
synicalsyntax committed Aug 9, 2018
1 parent 26f38f6 commit 0b03f52
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/events/responses/pullState.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,19 @@ exports.update = async function(pull, repo) {
const deletable = await check(pull, repo);
if (!deletable) continue;

const {label} = this.cfg.pulls.status.mergeConflicts;

if (label) {
try {
await this.issues.removeLabel({
owner: repoOwner, repo: repoName, number: number, name: label
});
} catch (e) {
// although we could attempt to fetch labels of the pull request,
// it's an extra API call, so we silently ignore the error instead.
}
}

const comments = await template.getComments({
number: number, owner: repoOwner, repo: repoName
});
Expand Down

0 comments on commit 0b03f52

Please sign in to comment.