From 17db3d5bd2dd58253916f5340b8fbcbaa84c92ba Mon Sep 17 00:00:00 2001 From: Alex Burgel Date: Thu, 4 May 2023 22:29:20 -0400 Subject: [PATCH] Add output definitions --- action.yml | 5 +++++ src/comment.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 6c9d264..6b335c3 100644 --- a/action.yml +++ b/action.yml @@ -78,6 +78,11 @@ inputs: description: "The GitHub access token (e.g. secrets.GITHUB_TOKEN) used to create or update the comment. This defaults to {{ github.token }}." default: "${{ github.token }}" required: false +outputs: + previous_comment_id: + description: "ID of previous comment, if found" + created_comment_id: + description: "ID of newly created comment, if any" runs: using: "node16" main: "dist/index.js" diff --git a/src/comment.ts b/src/comment.ts index da70951..b6bad34 100644 --- a/src/comment.ts +++ b/src/comment.ts @@ -115,7 +115,7 @@ export async function createComment( if (!body && !previousBody) return core.warning("Comment body cannot be blank") - await octokit.rest.issues.createComment({ + let x = await octokit.rest.issues.createComment({ ...repo, issue_number, body: previousBody