Nudge Pull Request Reviewers
In the following guide, we are going to create a self-service action in Port that uses Send Slack message
backend to nudge PR reviewers with a kind message.
Usecases
- Faster Merges: Remind reviewers of open PRs to reduce delays.
- Better Code: Encourage timely reviews for quicker feedback.
- Smoother Workflow: Prevent bottlenecks that hinder development progress.
Prerequisitesโ
- Install Port's GitHub app by clicking here.
- Set up a slack app:
- Go to your slack apps page.
- Create a new app or use an existing one.
- Enable Incoming Webhooks and create a new webhook.
- Choose the target Slack channel for notifications.
- Copy the generated webhook URL for use as the
SLACK_WEBHOOK_URL
.
Port configurationโ
- To create the Port action, go to the self-service page:
- Click on the
+ New Action
button. - Click on the
{...} Edit JSON
button. - Copy and paste the following JSON configuration into the editor.
- Click
Save
- Click on the
Port Action: Nudge Pull Request Reviewers
tip
<SLACK_WEBHOOK_URL>
- The webhook URL obtained from slack
{
"identifier": "nudge_reviewers",
"title": "Nudge Reviewers",
"icon": "Slack",
"description": "Remind reviewers about PR",
"trigger": {
"type": "self-service",
"operation": "DAY-2",
"userInputs": {
"properties": {},
"required": []
},
"blueprintIdentifier": "githubPullRequest"
},
"invocationMethod": {
"type": "SLACK",
"url": "<SLACK_WEBHOOK_URL>",
"agent": false,
"synchronized": true,
"method": "POST",
"headers": {},
"body": {
"text": "\n*Reminder: Pending Pull Request Review*\nThis PR needs your attention!\n\n*PR:* <{{ .entity.properties.link }}|{{ .entity.title }}>\n*Reviewers:* {{ .entity.properties.reviewers }}\nReview PR: {{ .entity.properties.link }}"
}
},
"requiredApproval": false,
"publish": true
}
Let's test it!โ
Trigger the action from the self-service page of your Port application.
Done! ๐ You can now send a reminder to PR reviewers.