Skip to content

Commit

Permalink
fix(Khan#29): trim
Browse files Browse the repository at this point in the history
  • Loading branch information
seunggabi committed May 15, 2022
1 parent f8ab347 commit 5b4eae9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@ async function run() {
return;
}

const body =
let body =
(context.eventName === "issue_comment"
// For comments on pull requests
? context.payload.comment.body
// For the initial pull request description
: context.payload.pull_request.body) || '';
core.setOutput('comment_body', body);
body = body.trim();

core.setOutput('comment_body', body);
if (
context.eventName === "issue_comment" &&
!context.payload.issue.pull_request
Expand Down

0 comments on commit 5b4eae9

Please sign in to comment.