mirror of
https://github.com/marocchino/sticky-pull-request-comment.git
synced 2026-03-29 02:29:25 +00:00
📦️ Build
This commit is contained in:
parent
308b2fd250
commit
70d2764d1a
2 changed files with 12 additions and 8 deletions
18
dist/index.js
generated
vendored
18
dist/index.js
generated
vendored
|
|
@ -35434,6 +35434,12 @@ async function run() {
|
|||
if (deleteOldComment && recreate) {
|
||||
throw new Error("delete and recreate cannot be both set to true");
|
||||
}
|
||||
if (deleteOldComment && onlyCreateComment) {
|
||||
throw new Error("delete and only_create cannot be both set to true");
|
||||
}
|
||||
if (deleteOldComment && hideOldComment) {
|
||||
throw new Error("delete and hide cannot be both set to true");
|
||||
}
|
||||
if (onlyCreateComment && onlyUpdateComment) {
|
||||
throw new Error("only_create and only_update cannot be both set to true");
|
||||
}
|
||||
|
|
@ -35443,14 +35449,8 @@ async function run() {
|
|||
const octokit = getOctokit(githubToken);
|
||||
const previous = await findPreviousComment(octokit, repo, pullRequestNumber, header);
|
||||
setOutput("previous_comment_id", previous?.id);
|
||||
if (deleteOldComment) {
|
||||
if (previous) {
|
||||
await deleteComment(octokit, previous.id);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (!previous) {
|
||||
if (onlyUpdateComment) {
|
||||
if (onlyUpdateComment || hideOldComment || deleteOldComment) {
|
||||
return;
|
||||
}
|
||||
const created = await createComment(octokit, repo, pullRequestNumber, body, header);
|
||||
|
|
@ -35466,6 +35466,10 @@ async function run() {
|
|||
await minimizeComment(octokit, previous.id, hideClassify);
|
||||
return;
|
||||
}
|
||||
if (deleteOldComment) {
|
||||
await deleteComment(octokit, previous.id);
|
||||
return;
|
||||
}
|
||||
if (skipUnchanged && commentsEqual(body, previous.body || "", header)) {
|
||||
// don't recreate or update if the message is unchanged
|
||||
return;
|
||||
|
|
|
|||
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
Loading…
Add table
Add a link
Reference in a new issue