💙 This integration is available to sponsors.
This action can post the results to a channel in Slack. For example:
To configure the Slack integration:
- Create a webhook in your workspace (you must be a Slack admin). It should look like this:
https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX
. Check out this tutorial if you have questions about getting the webhook URL. - Set the
slack-webhook
(from the previous step) andslack-channel
(don't forget to include the#
character) parameters in this action. - Ready to go!
Since it may be pretty annoying to receive a Slack notification every time someone creates a pull request, it is recommended to configure this action to be executed every while using the schedule
trigger. For example, every Monday at 9am UTC:
name: Pull Request Stats
on:
schedule:
- cron: '0 9 * * 1'
jobs:
stats:
runs-on: ubuntu-latest
steps:
- name: Run pull request stats
uses: flowwer-dev/pull-request-stats@master
with:
slack-channel: '#mystatschannel'
slack-webhook: 'https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX'
# slack-webhook: ${{ secrets.SLACK_WEBHOOK }} You may want to store this value as a secret.