mirror of
https://github.com/mshick/add-pr-comment.git
synced 2025-12-31 22:29:45 +11:00
new build
This commit is contained in:
parent
2fe3ecef03
commit
ec62ec7546
3 changed files with 15 additions and 5 deletions
|
|
@ -115,9 +115,10 @@ const run = async () => {
|
|||
shouldCreateComment = false;
|
||||
}
|
||||
}
|
||||
let createdCommentData;
|
||||
if (shouldCreateComment) {
|
||||
if (proxyUrl) {
|
||||
await createCommentProxy({
|
||||
createdCommentData = await createCommentProxy({
|
||||
owner,
|
||||
repo,
|
||||
issueNumber,
|
||||
|
|
@ -127,14 +128,18 @@ const run = async () => {
|
|||
});
|
||||
}
|
||||
else {
|
||||
await octokit.rest.issues.createComment({
|
||||
const createdComment = await octokit.rest.issues.createComment({
|
||||
owner,
|
||||
repo,
|
||||
issue_number: issueNumber,
|
||||
body: message,
|
||||
});
|
||||
createdCommentData = createdComment.data;
|
||||
}
|
||||
}
|
||||
if (createdCommentData) {
|
||||
core.setOutput('comment-created', 'true');
|
||||
core.setOutput('comment-id', createdCommentData.id);
|
||||
}
|
||||
else {
|
||||
core.setOutput('comment-created', 'false');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue