mirror of
https://github.com/marocchino/sticky-pull-request-comment.git
synced 2025-12-19 14:35:50 +00:00
halted when deleteOldComment is true
This commit is contained in:
parent
2c5912d576
commit
a75d863059
3 changed files with 13 additions and 8 deletions
8
dist/index.js
generated
vendored
8
dist/index.js
generated
vendored
|
|
@ -300,11 +300,13 @@ function run() {
|
||||||
yield (0, comment_1.createComment)(octokit, config_1.repo, config_1.pullRequestNumber, config_1.body, config_1.header);
|
yield (0, comment_1.createComment)(octokit, config_1.repo, config_1.pullRequestNumber, config_1.body, config_1.header);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!previous) {
|
if (config_1.deleteOldComment) {
|
||||||
|
if (previous) {
|
||||||
|
yield (0, comment_1.deleteComment)(octokit, previous.id);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (config_1.deleteOldComment) {
|
if (!previous) {
|
||||||
yield (0, comment_1.deleteComment)(octokit, previous.id);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (config_1.hideOldComment) {
|
if (config_1.hideOldComment) {
|
||||||
|
|
|
||||||
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
11
src/main.ts
11
src/main.ts
|
|
@ -55,14 +55,17 @@ async function run(): Promise<undefined> {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (deleteOldComment) {
|
||||||
|
if (previous) {
|
||||||
|
await deleteComment(octokit, previous.id)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if (!previous) {
|
if (!previous) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (deleteOldComment) {
|
|
||||||
await deleteComment(octokit, previous.id)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if (hideOldComment) {
|
if (hideOldComment) {
|
||||||
await minimizeComment(octokit, previous.id, hideClassify)
|
await minimizeComment(octokit, previous.id, hideClassify)
|
||||||
return
|
return
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue