add setting to only create, but not update comment

This commit is contained in:
WebFreak001 2023-02-07 20:22:10 +01:00
parent 0170f2ea39
commit 7f05636c59
No known key found for this signature in database
GPG key ID: AEFC88D11109D1AA
6 changed files with 38 additions and 193 deletions

View file

@ -13,7 +13,8 @@ import {
pullRequestNumber,
recreate,
repo,
ignoreEmpty
ignoreEmpty,
onlyCreateComment
} from "./config"
import {
createComment,
@ -70,6 +71,12 @@ async function run(): Promise<undefined> {
return
}
if (previous && onlyCreateComment) {
// don't comment anything, user specified only_create, so this is probably
// a placeholder / introduction comment.
return
}
if (hideOldComment) {
await minimizeComment(octokit, previous.id, hideClassify)
return