We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
message
1 parent bc14ce3 commit 28b1532Copy full SHA for 28b1532
1 file changed
src/main.ts
@@ -93,12 +93,15 @@ async function run() {
93
comment_id: number;
94
body: string;
95
}) {
96
- const { data: comment } = await octokit.rest.issues.updateComment({
+ const params = {
97
owner,
98
repo,
99
comment_id,
100
- body,
101
- });
+ };
+
102
+ const { data: comment } = await (body
103
+ ? octokit.rest.issues.updateComment({ ...params, body })
104
+ : octokit.rest.issues.getComment(params));
105
106
core.setOutput('id', comment.id);
107
core.setOutput('body', comment.body);
0 commit comments