halted when deleteOldComment is true

This commit is contained in:
Federico 2022-02-22 11:02:31 -08:00
parent 2c5912d576
commit a75d863059
3 changed files with 13 additions and 8 deletions

8
dist/index.js generated vendored
View file

@ -300,11 +300,13 @@ function run() {
yield (0, comment_1.createComment)(octokit, config_1.repo, config_1.pullRequestNumber, config_1.body, config_1.header);
return;
}
if (!previous) {
if (config_1.deleteOldComment) {
if (previous) {
yield (0, comment_1.deleteComment)(octokit, previous.id);
}
return;
}
if (config_1.deleteOldComment) {
yield (0, comment_1.deleteComment)(octokit, previous.id);
if (!previous) {
return;
}
if (config_1.hideOldComment) {

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long

View file

@ -55,14 +55,17 @@ async function run(): Promise<undefined> {
return
}
if (deleteOldComment) {
if (previous) {
await deleteComment(octokit, previous.id)
}
return
}
if (!previous) {
return
}
if (deleteOldComment) {
await deleteComment(octokit, previous.id)
return
}
if (hideOldComment) {
await minimizeComment(octokit, previous.id, hideClassify)
return