/convert-mention-action

githubからslackへよしなにメンション飛ばしたい

Primary LanguageJavaScriptMIT LicenseMIT

Convert mention action

Convert GitHub's mention to slack's.

Convert mention action

Convert GitHub's mention to Slack's.



demo

Supports

Issue

  • created
  • closed
  • comment
    • created
    • edited

Pull request

  • created
  • closed
  • comment
    • created
    • edited
  • review requested
  • review changed
    • comment
    • approve
    • dissmiss
  • code comments

Usage

Create .github/convert-mention.json.

{
  "githubName": "slackName"
}

Example:

{
  "tyankatsu0105": "katsuya yamamoto",
  "yykaoruko": "kaoruko yamamoto"
}

This actions reads config file in .github/convert-mention.json automatically.

name: Convert GitHub's mention to Slack's

on:
  issue_comment:
    types: [created, edited]
  pull_request_review_comment:
    types: [created, edited]
  pull_request_review:
    types: [submitted, edited, dismissed]
  issues:
    types: [opened, closed]
  pull_request:
    types: [review_requested, opened, closed]

jobs:
  message:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2

      - name: Convert mention
        uses: tyankatsu0105/convert-mention-action@v2.0.0
        env:
          SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
          SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }}

This action requests the user:read function and permission scope of the slack app.