apply suggestions

This commit is contained in:
WebFreak001 2023-02-09 18:42:37 +01:00
parent 7f05636c59
commit b2b0280464
No known key found for this signature in database
GPG key ID: AEFC88D11109D1AA
5 changed files with 10 additions and 10 deletions

View file

@ -19,7 +19,7 @@ inputs:
default: "false"
required: false
only_create:
description: "only create a new comment if there is no existing one, otherwise do nothing. Only `true` is allowed. Just skip this item when you don't need it."
description: "only create a new comment if there is no existing one, otherwise do nothing. Only `true` is allowed. Just skip this item when you don't need it. This options has higher priority than hide_and_recreate, hide."
default: "false"
required: false
hide_details:

8
dist/index.js generated vendored
View file

@ -229,7 +229,7 @@ exports.hideClassify = core.getInput("hide_classify", {
});
exports.deleteOldComment = core.getBooleanInput("delete", { required: true });
exports.onlyCreateComment = core.getBooleanInput("only_create", {
required: false
required: true
});
exports.hideOldComment = core.getBooleanInput("hide", { required: true });
exports.githubToken = core.getInput("GITHUB_TOKEN", { required: true });
@ -350,9 +350,9 @@ function run() {
yield (0, comment_1.createComment)(octokit, config_1.repo, config_1.pullRequestNumber, body, config_1.header);
return;
}
if (previous && config_1.onlyCreateComment) {
// don't comment anything, user specified only_create, so this is probably
// a placeholder / introduction comment.
if (config_1.onlyCreateComment) {
// don't comment anything, user specified only_create and there is an
// existing comment, so this is probably a placeholder / introduction one.
return;
}
if (config_1.hideOldComment) {

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long

View file

@ -23,7 +23,7 @@ export const hideClassify = core.getInput("hide_classify", {
}) as ReportedContentClassifiers
export const deleteOldComment = core.getBooleanInput("delete", {required: true})
export const onlyCreateComment = core.getBooleanInput("only_create", {
required: false
required: true
})
export const hideOldComment = core.getBooleanInput("hide", {required: true})
export const githubToken = core.getInput("GITHUB_TOKEN", {required: true})

View file

@ -71,9 +71,9 @@ 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.
if (onlyCreateComment) {
// don't comment anything, user specified only_create and there is an
// existing comment, so this is probably a placeholder / introduction one.
return
}