Github Actions to request PR reviews using Slack
- Set the secret
SLACK_BOT_TOKEN
for messaging
Your repository > Settings > Secrets > New repository secret
The Value have to be a token in the form of xoxb-
provided by Slack.
- Create a file
.github/workflow/request-pr-review.yml
:
name: Request PR Review
on:
schedule:
- cron: '0 1 * * 1-5' # The notification period you want. See https://crontab.guru/
jobs:
requestReview:
runs-on: ubuntu-latest
steps:
- name: Request PR Review
uses: ygnoh/actions-request-pr-review@v1.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
slackBotToken: ${{ secrets.SLACK_BOT_TOKEN }}
repoUrl: 'https://github.com/ygnoh/actions-tutorial'
Required A token provided by Github
Required A token of your Slack Bot for sending messages
e.g. xoxb-798572638592-435243279588-9aCaWNnzVYelK9NzMMqa1yxz
Required URL of your repository
e.g. github.com/username/reponame