🌏 한국어 | English
PR 리뷰 요청을 받으면 Slack으로 알리는 Github Actions
- GitHub의 Repository variable을 사용해서
GitHub닉네임과Slackid를 매칭하는 기능 추가
- 메시지 전달을 위해
SLACK_BOT_TOKEN이름의 secret을 세팅하세요.
세팅할 Repo > Settings > Secrets > New repository secret
이때, Value는 슬랙에서 제공하는 xoxb- 형태의 토큰이어야 합니다.
- Repository Variables에
SLACK_IDS변수를 생성하세요.
Repository setting -> Security -> Secrets and variables -> Actions -> Variables -> Repository Variables
SLACK_IDS: 레포지토리 내 동료들의 GitHub 닉네임:Slack Id 형태
**Slack Id: Slack 프로필 -> 멤버 ID 복사
e.g.
"SnoopyComp:U08UZVUFU8N,hikarigin99:U08VFBD06SG, ..."
.github/workflow/notify-pr-review.yml파일을 만드세요:
name: notify pr review
on:
pull_request:
types: [review_requested]
jobs:
notify:
runs-on: [ubuntu-latest]
steps:
- name: Notify PR Review
uses: SnoopyComp/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
slackIds: ${{ vars.SLACK_IDS }}
slackBotToken: ${{ secrets.SLACK_BOT_TOKEN }}Required GitHub에서 제공하는 토큰
Required Repository Variables에 SLACK_IDS가 정의되어 있어야 함
Required Slack bot을 통해 메시지를 보내기 위한 토큰
e.g. xoxb-798572638592-435243279588-9aCaWNnzVYelK9NzMMqa1yxz
Copyright (c) 2023-present NAVER Corp.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
