A GitHub Action that adds emoji reactions to Slack messages when PRs are reviewed, approved, merged, or closed.
- Create a Slack app Oauth Bot Token scopes:
reactions:read,reactions:write,channels:history,groups:history - Install the app to your workspace and note the Bot User ID and OAuth Token
- Add the Bot User OAuth Token (
xoxb-...) as a repository secret namedSLACK_BOT_TOKEN - Add
SLACK_CHANNEL_IDandSLACK_BOT_USER_IDas repository variables (Settings > Secrets and variables > Actions > Variables) - Create
.github/workflows/pr-emojis.yml:
name: PR Emojis in Slack
on:
pull_request_review:
types: [submitted]
pull_request:
types: [opened, synchronize, closed]
issue_comment:
types: [created]
jobs:
pr-emojis:
runs-on: ubuntu-latest
steps:
- name: Run pr-emojis-in-slack
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_CHANNEL_ID: ${{ vars.SLACK_CHANNEL_ID }}
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
SLACK_BOT_USER_ID: ${{ vars.SLACK_BOT_USER_ID }}
run: |
curl -fsSL https://github.com/AdeptMind/pr-emojis-in-slack/releases/download/v1.1.1/pr-emojis-in-slack -o pr-emojis-in-slack
chmod +x pr-emojis-in-slack
./pr-emojis-in-slack| Variable | Required | Default | Description |
|---|---|---|---|
GITHUB_TOKEN |
Yes | GitHub token for API access — provided automatically by GitHub Actions | |
SLACK_BOT_TOKEN |
Yes | Slack Bot User OAuth Token (xoxb-...) |
|
SLACK_CHANNEL_ID |
Yes | Slack channel to monitor | |
SLACK_BOT_USER_ID |
Yes | Slack bot user ID | |
EMOJI_MONITORING |
No | sparkles |
Emoji added when PR is being monitored |
EMOJI_REVIEW_STARTED |
No | eyes |
Emoji for review started |
EMOJI_APPROVED |
No | white_check_mark |
Emoji for approval |
EMOJI_CHANGES_REQUESTED |
No | warning |
Emoji for changes requested |
EMOJI_COMMENTED |
No | speech_balloon |
Emoji for comments |
EMOJI_MERGED |
No | rocket |
Emoji for merged PR |
EMOJI_CLOSED |
No | no_entry_sign |
Emoji for closed PR |
NUMBER_OF_APPROVALS_REQUIRED |
No | 1 |
Approvals needed for approved emoji |