Skip to content

Instantly share code, notes, and snippets.

@matsubo
Created January 19, 2021 10:13
Show Gist options
  • Save matsubo/69f994a3a9830973c56fd8322798f60f to your computer and use it in GitHub Desktop.
Save matsubo/69f994a3a9830973c56fd8322798f60f to your computer and use it in GitHub Desktop.
github mention to slack sample code
# For Github User
# github_username: "slack_member_id"
# please_replace_me_11: U01G30S9LHW
# please_replace_me_4: U011F5DRG2V
# github_username_A: "slack_member_id_A"
# github_username_B: "slack_member_id_B"
# github_username_C: "slack_member_id_C"
# abeyuya: "XXXXXXXXX"
# For Github Team
# github_teamname: "slack_member_id"
# github_teamname_A: "slack_member_id_D"
on:
issues:
types: [opened, edited]
issue_comment:
types: [created, edited]
pull_request:
types: [opened, edited, review_requested]
pull_request_review:
types: [submitted]
pull_request_review_comment:
types: [created, edited]
jobs:
mention-to-slack:
runs-on: ubuntu-latest
steps:
- name: Run
uses: abeyuya/actions-mention-to-slack@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL_FOR_MENTION }}
icon-url: https://img.icons8.com/color/256/000000/github-2.png
bot-name: "Mention bot"
run-id: ${{ github.run_id }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment