Skip to content

Commit

Permalink
fix: try to automerge when automerge label is added
Browse files Browse the repository at this point in the history
  • Loading branch information
christophehurpeau committed May 23, 2020
1 parent f3f09b3 commit f49f2ce
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 15 deletions.
11 changes: 7 additions & 4 deletions dist/index-node10-dev.cjs.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index-node10-dev.cjs.js.map

Large diffs are not rendered by default.

11 changes: 7 additions & 4 deletions dist/index-node10.cjs.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index-node10.cjs.js.map

Large diffs are not rendered by default.

8 changes: 3 additions & 5 deletions src/pr-handlers/labelsChanged.ts
Expand Up @@ -109,11 +109,9 @@ export default function labelsChanged(
await updatePrBody(pr, context, repoContext, {
[option]: context.payload.action === 'labeled',
});
} else if (context.payload.action === 'labeled') {
if (
repoContext.labels['merge/automerge'] &&
label.id === repoContext.labels['merge/automerge'].id
) {
} // not an else if
if (context.payload.action === 'labeled') {
if (automergeLabel && label.id === automergeLabel.id) {
await autoMergeIfPossible(pr, context, repoContext);
}
}
Expand Down

0 comments on commit f49f2ce

Please sign in to comment.