mirror of
https://github.com/mshick/add-pr-comment.git
synced 2026-01-01 14:49:44 +11:00
new build
This commit is contained in:
parent
2fe3ecef03
commit
ec62ec7546
3 changed files with 15 additions and 5 deletions
9
dist/index.js
vendored
9
dist/index.js
vendored
|
|
@ -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
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
|
|
@ -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');
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue