Skip to content

Commit

Permalink
fix: ensure [skip-ci] exists when automatic automerge from renovate
Browse files Browse the repository at this point in the history
  • Loading branch information
christophehurpeau committed Jul 11, 2019
1 parent 4503cbf commit badd77b
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/pr-handlers/labelsChanged.ts
Expand Up @@ -39,11 +39,28 @@ export default function labelsChanged(app: Application): void {
);
await updatePrBody(context, repoContext, {
autoMergeWithSkipCi: true,
// force label to avoid racing events (when both events are sent in the same time, reviewflow treats them one by one but the second event wont have its body updated)
autoMerge:
autoMergeLabel &&
context.payload.pull_request.labels.find(
(l): boolean => l.id === autoMergeLabel.id,
)
? true
: repoContext.config.prDefaultOptions.autoMerge,
});
// }
} else if (autoMergeLabel && label.id === autoMergeLabel.id) {
await updatePrBody(context, repoContext, {
autoMerge: true,
// force label to avoid racing events (when both events are sent in the same time, reviewflow treats them one by one but the second event wont have its body updated)
// Note: si c'est renovate qui ajoute le label autoMerge, le label codeApprovedLabel n'aurait pu etre ajout茅 que par renovate 茅galement (on est a quelques secondes de l'ouverture de la pr par renovate)
autoMergeWithSkipCi:
codeApprovedLabel &&
context.payload.pull_request.labels.find(
(l): boolean => l.id === codeApprovedLabel.id,
)
? true
: repoContext.config.prDefaultOptions.autoMergeWithSkipCi,
});
}
await autoMergeIfPossible(context, repoContext);
Expand Down

0 comments on commit badd77b

Please sign in to comment.