chouetz / slapr

Add Pull Request status emojis to Slack posts.

Home Page:https://github.com/DataDog/hackadog-slapr

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Slapr

Add Pull Requests status emojis to Slack posts.

Example Screenshot

On pull_request_review or pull_request events Slapr will update your slack posts with suitable emojis.

Slack posts

Slack posts should contain the PR URL.

Examples:

Requirements

Slack API Token with following permissions

  • channels:history
  • reactions:read
  • reactions:write

Emoji status

emoji description
SLAPR_EMOJI_REVIEW_STARTED The PR has at least 1 in-progress review.
SLAPR_EMOJI_APPROVED The PR has all required approvals and is ready to be merged.
SLAPR_EMOJI_NEEDS_CHANGES Changes are requested for the PR.
SLAPR_EMOJI_MERGED The PR is merged.
SLAPR_EMOJI_CLOSED The PR is closed.

Example Usage

name: Slack emoji PR updates
on:
  pull_request_review:
    types: [submitted]
  pull_request:
    types: [closed]

jobs:
  run_slapr:
    runs-on: ubuntu-latest
    steps:
    - uses: DataDog/slapr@master
      env:
        GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
        GITHUB_REPO: DataDog/slapr
        SLACK_CHANNEL_ID: CTMRQMGVB
        SLACK_API_TOKEN: "${{ secrets.SLACK_BOT_USER_OAUTH_ACCESS_TOKEN }}"
        SLAPR_BOT_USER_ID: UTMS06TPX
        SLAPR_NUMBER_OF_APPROVALS_REQUIRED: 2 # integer minimum=1 default=1. The number of approvals that are required for the approval emoji to be added in Slack

About

Add Pull Request status emojis to Slack posts.

https://github.com/DataDog/hackadog-slapr


Languages

Language:Python 98.8%Language:Dockerfile 1.2%