Webhooks
PR Review Comment Event
Webhooks
PR Review Comment Event
Trigger a workflow whenever an pull_request_review_comment action is performed in a GitHub repository.
If you would like to trigger a workflow when a comment is made on a PR, use the issueCommentEvent instead
Usage
import * as github from "@trigger.dev/github";
new Trigger({
id: "demo",
on: github.events.pullRequestCommentEvent({
repo: "triggerdotdev/trigger.dev",
}),
run: async (event, ctx) => {},
}).listen();
Params
reporequired
string
The full path to the repository, including the organization
Event
action
string
The pull_request action, can be one of: created
, edited
, deleted
.
commentrequired
object
The pull request review comment object.
pull_requestrequired
object
The pull request object.
repositoryrequired
object
A repository on GitHub.
senderrequired
object
The GitHub user object who performed the action.
organization
object
The organization object the repository belongs to.
Additional event fields
edited PR Review Comment
changes
object
Example Workflows
new Trigger({
id: "new-pr",
name: "Notify Slack on new PR Review Comment",
on: github.events.pullRequestCommentEvent({
repo: "triggerdotdev/trigger.dev",
}),
run: async (event, ctx) => {
if (event.action === "created") {
await slack.postMessage("New PR comment", {
channelName: "github-prs",
text: `New PR comment by ${event.sender.login} on PR ${event.pull_request.title} (${event.pull_request.html_url})`,
});
}
},
}).listen();