mirror of
https://github.com/marocchino/sticky-pull-request-comment.git
synced 2026-04-16 19:15:43 +00:00
Add ignore empty input
This commit is contained in:
parent
1d46172340
commit
db01d1ad6c
6 changed files with 78 additions and 20 deletions
|
|
@ -12,7 +12,8 @@ import {
|
|||
hideOldComment,
|
||||
pullRequestNumber,
|
||||
recreate,
|
||||
repo
|
||||
repo,
|
||||
ignoreEmpty
|
||||
} from "./config"
|
||||
import {
|
||||
createComment,
|
||||
|
|
@ -32,6 +33,10 @@ async function run(): Promise<undefined> {
|
|||
try {
|
||||
const body = await getBody()
|
||||
|
||||
if (!body && ignoreEmpty) {
|
||||
return
|
||||
}
|
||||
|
||||
if (!deleteOldComment && !hideOldComment && !body) {
|
||||
throw new Error("Either message or path input is required")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue