fix: ignore delete label if dry-run (#3211)

This commit is contained in:
Yuki MIZUNO 2019-02-14 18:43:16 +09:00 committed by Rhys Arkins
parent 703fa52d6c
commit 123bdd4572

View file

@ -28,7 +28,14 @@ async function getParentBranch(config) {
} }
if (pr.labels && pr.labels.includes(config.rebaseLabel)) { if (pr.labels && pr.labels.includes(config.rebaseLabel)) {
logger.info('Manual rebase requested via PR labels for #' + pr.number); logger.info('Manual rebase requested via PR labels for #' + pr.number);
// istanbul ignore if
if (config.dryRun) {
logger.info(
`DRY-RUN: Would delete label ${config.rebaseLabel} from #${pr.number}`
);
} else {
await platform.deleteLabel(pr.number, config.rebaseLabel); await platform.deleteLabel(pr.number, config.rebaseLabel);
}
return { parentBranch: undefined }; return { parentBranch: undefined };
} }
} }