Skip to content

Commit

Permalink
Create post-issue-comment.js
Browse files Browse the repository at this point in the history
matching 5944
  • Loading branch information
t-will-gillis authored Jan 7, 2024
1 parent 759dc67 commit 4a3fc9f
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions github-actions/utils/post-issue-comment.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* Posts a comment on github
* @param {Number} issueNum - the issue number where the comment should be posted
* @param {String} comment - the comment to be posted
*/
async function postComment(issueNum, comment, github, context) {
try {
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issueNum,
body: comment,
});
} catch (err) {
throw new Error(err);
}
}

module.exports = postComment;

0 comments on commit 4a3fc9f

Please sign in to comment.