diff --git a/action.yml b/action.yml index 252bbb2..27ab183 100644 --- a/action.yml +++ b/action.yml @@ -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: diff --git a/src/main.ts b/src/main.ts index 89e25b9..5a82f92 100644 --- a/src/main.ts +++ b/src/main.ts @@ -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 {