mirror of
https://github.com/marocchino/sticky-pull-request-comment.git
synced 2025-12-14 20:41:15 +00:00
rename option to recreate
This commit is contained in:
parent
eb64714cc1
commit
1ec19bd242
2 changed files with 3 additions and 3 deletions
|
|
@ -8,7 +8,7 @@ inputs:
|
|||
append:
|
||||
description: "Indicate if new comment messages should be appended to previous comment message"
|
||||
required: false
|
||||
replace:
|
||||
recreate:
|
||||
description: "Indicate if previous comment should be removed before creating a new comment"
|
||||
required: false
|
||||
message:
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ async function run() {
|
|||
const path = core.getInput("path", { required: false });
|
||||
const header = core.getInput("header", { required: false }) || "";
|
||||
const append = core.getInput("append", { required: false }) || false;
|
||||
const replace = core.getInput("replace", { required: false }) || false;
|
||||
const recreate = core.getInput("recreate", { required: false }) || false;
|
||||
const githubToken = core.getInput("GITHUB_TOKEN", { required: true });
|
||||
const octokit = new GitHub(githubToken);
|
||||
const previous = await findPreviousComment(octokit, repo, number, header);
|
||||
|
|
@ -37,7 +37,7 @@ async function run() {
|
|||
|
||||
if (previous) {
|
||||
const previousBody = append && previous.body;
|
||||
if (replace) {
|
||||
if (recreate) {
|
||||
await deleteComment(octokit, repo, previous.id);
|
||||
await createComment(octokit, repo, number, body, header, previousBody);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue