Send only task-related notifications from GitHub to Slack
MIT License
Send only task-related notifications from GitHub to Slack
Users only specified in userlist.toml
will be notified through Slack.
ken-matsui-developer Comment on #1 Testing Notifications @ken-matsui-reviewer Hi, I am testing notifications using ken-matsui/notify-slack. Please let me know if you receive any notification on Slack. ken-matsui/notify-slack | Jan 6th
ken-matsui-developer #1 Testing Notifications ken-matsui/notify-slack | Jan 6th
ken-matsui-developer #1 Testing Notifications ken-matsui/notify-slack | Jan 6th
ken-matsui-developer Approval on #1 Testing Notifications Looks good. Thanks! ken-matsui/notify-slack | Jan 6th
ken-matsui-developer Requested Changes on #1 Testing Notifications I would prefer the first line to be like the following. ken-matsui/notify-slack | Jan 6th
ken-matsui-developer Comment on #1 Testing Notifications Is this a typo? ken-matsui/notify-slack | Jan 6th
ken-matsui-developer #1 Testing Notifications ken-matsui/notify-slack | Jan 6th
You will need to prepare two files on your repository which you want to configure.
.github/workflows/notify-slack.yml
name: GitHub Notification
on:
pull_request:
types: [review_requested, closed]
pull_request_review:
types: [submitted]
issue_comment:
pull_request_review_comment:
jobs:
notify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ken-matsui/[email protected]
with:
slack_oauth_access_token: ${{ secrets.SLACK_OAUTH_ACCESS_TOKEN }}
.github/userlist.toml
[[users]]
github = "ken-matsui"
slack = "UXXXXXXXXXX"
[[users]]
github = "ken-matsui-2"
slack = "UXXXXXXXXXX"
Create New App
, and select From scratch
App Name
(e.g. GitHub Notification
), and select your workspaceCreate App
Add features and functionality
in Building Apps for Slack
, and click Permissions
Scopes
section, and click Add an OAuth Scope
in Bot Token Scopes
chat:write
Install to Workspace
on the OAuth Tokens for Your Workspace
sectionAllow
Bot User OAuth Token
See https://www.workast.com/help/articles/61000165203/.
This action has only a slack_oauth_access_token
input and no outputs.
First, you'll need to have a reasonably modern version of
node
handy. This won't work with versions older than 9, for instance.
Install the dependencies
$ npm install
Build the typescript and package it for distribution
$ npm run build && npm run package
Actions are run from GitHub repos so we will checkin the packed dist folder.
Then run ncc and push the results:
$ npm run package
$ git add dist
$ git commit -m "prod dependencies"
$ git tag v1.0.0
$ git push origin v1.0.0
Note: We recommend using the --license
option for ncc, which will create a license file for all of the production node modules used in your project.
Your action is now published! 🚀
See the versioning documentation