mirror of
https://github.com/marocchino/sticky-pull-request-comment.git
synced 2025-12-19 14:35:50 +00:00
Update src/main.ts
Co-authored-by: August “Kai” Kaiser <85895815+awkaiser-tr@users.noreply.github.com>
This commit is contained in:
parent
2c5912d576
commit
2b9b09ef4a
1 changed files with 5 additions and 7 deletions
12
src/main.ts
12
src/main.ts
|
|
@ -50,17 +50,15 @@ async function run(): Promise<undefined> {
|
||||||
header
|
header
|
||||||
)
|
)
|
||||||
|
|
||||||
if (!previous && !deleteOldComment) {
|
if (deleteOldComment) {
|
||||||
await createComment(octokit, repo, pullRequestNumber, body, header)
|
if (previous) {
|
||||||
|
await deleteComment(octokit, previous.id)
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!previous) {
|
if (!previous) {
|
||||||
return
|
await createComment(octokit, repo, pullRequestNumber, body, header)
|
||||||
}
|
|
||||||
|
|
||||||
if (deleteOldComment) {
|
|
||||||
await deleteComment(octokit, previous.id)
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (hideOldComment) {
|
if (hideOldComment) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue