How to make a review comment on a PR. #1806
Answered
by
scaredmonad
scaredmonad
asked this question in
Q&A
-
This example shows how to reply to an opened issue: app.on('issues.opened', async (context) => {
const issueComment = context.issue({
body: 'Thanks for opening this issue!',
});
await context.octokit.issues.createComment(issueComment);
}); I would like to know how the same could be achieved with a PR. Apparently, this doesn't work: app.on('pull_request.opened', async (context) => {
const reviewComment = context.pullRequest({ body: "some text" });
await context.octokit.pulls.createReview(reviewComment);
}); |
Beta Was this translation helpful? Give feedback.
Answered by
scaredmonad
Feb 20, 2023
Replies: 1 comment
-
Ok, I went over the REST API docs on this and it was very vague but it seems the 1st example is exactly what I was looking for:
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
scaredmonad
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ok, I went over the REST API docs on this and it was very vague but it seems the 1st example is exactly what I was looking for: