mirror of
https://github.com/marocchino/sticky-pull-request-comment.git
synced 2026-04-22 22:08:51 +00:00
add setting to only create, but not update comment
This commit is contained in:
parent
0170f2ea39
commit
7f05636c59
6 changed files with 38 additions and 193 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue