new build

This commit is contained in:
Michael Shick 2022-11-05 08:46:54 -04:00
parent 2fe3ecef03
commit ec62ec7546
No known key found for this signature in database
GPG key ID: ADF5BC9704BB4A61
3 changed files with 15 additions and 5 deletions

9
dist/index.js vendored
View file

@ -1200,9 +1200,10 @@ const run = async () => {
shouldCreateComment = false; shouldCreateComment = false;
} }
} }
let createdCommentData;
if (shouldCreateComment) { if (shouldCreateComment) {
if (proxyUrl) { if (proxyUrl) {
await createCommentProxy({ createdCommentData = await createCommentProxy({
owner, owner,
repo, repo,
issueNumber, issueNumber,
@ -1212,14 +1213,18 @@ const run = async () => {
}); });
} }
else { else {
await octokit.rest.issues.createComment({ const createdComment = await octokit.rest.issues.createComment({
owner, owner,
repo, repo,
issue_number: issueNumber, issue_number: issueNumber,
body: message, body: message,
}); });
createdCommentData = createdComment.data;
} }
}
if (createdCommentData) {
core.setOutput('comment-created', 'true'); core.setOutput('comment-created', 'true');
core.setOutput('comment-id', createdCommentData.id);
} }
else { else {
core.setOutput('comment-created', 'false'); core.setOutput('comment-created', 'false');

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View file

@ -115,9 +115,10 @@ const run = async () => {
shouldCreateComment = false; shouldCreateComment = false;
} }
} }
let createdCommentData;
if (shouldCreateComment) { if (shouldCreateComment) {
if (proxyUrl) { if (proxyUrl) {
await createCommentProxy({ createdCommentData = await createCommentProxy({
owner, owner,
repo, repo,
issueNumber, issueNumber,
@ -127,14 +128,18 @@ const run = async () => {
}); });
} }
else { else {
await octokit.rest.issues.createComment({ const createdComment = await octokit.rest.issues.createComment({
owner, owner,
repo, repo,
issue_number: issueNumber, issue_number: issueNumber,
body: message, body: message,
}); });
createdCommentData = createdComment.data;
} }
}
if (createdCommentData) {
core.setOutput('comment-created', 'true'); core.setOutput('comment-created', 'true');
core.setOutput('comment-id', createdCommentData.id);
} }
else { else {
core.setOutput('comment-created', 'false'); core.setOutput('comment-created', 'false');