mirror of
https://github.com/marocchino/sticky-pull-request-comment.git
synced 2025-12-14 12:31:14 +00:00
apply suggestions
This commit is contained in:
parent
7f05636c59
commit
b2b0280464
5 changed files with 10 additions and 10 deletions
|
|
@ -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
8
dist/index.js
generated
vendored
|
|
@ -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
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
|
|
@ -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})
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue