Skip to content

Commit 28b1532

Browse files
committed
fix: Allow reactions to be added to an existing comment without providing message
Skip issues.updateComment call if no message was provided.
1 parent bc14ce3 commit 28b1532

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

src/main.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,15 @@ async function run() {
9393
comment_id: number;
9494
body: string;
9595
}) {
96-
const { data: comment } = await octokit.rest.issues.updateComment({
96+
const params = {
9797
owner,
9898
repo,
9999
comment_id,
100-
body,
101-
});
100+
};
101+
102+
const { data: comment } = await (body
103+
? octokit.rest.issues.updateComment({ ...params, body })
104+
: octokit.rest.issues.getComment(params));
102105

103106
core.setOutput('id', comment.id);
104107
core.setOutput('body', comment.body);

0 commit comments

Comments
 (0)