-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
100 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
repositories: | ||
dev-fe: | ||
reviewers: | ||
- githubName: jsk3342 | ||
slackId: U07GSBHPCPR | ||
name: 김지수 | ||
- githubName: gominzip | ||
slackId: U07H6QLFPBM | ||
name: 고민지 | ||
- githubName: spearStr | ||
slackId: U07H9CTPC9J | ||
name: 홍창현 | ||
|
||
dev-be: | ||
reviewers: | ||
- githubName: hoeeeeeh | ||
slackId: U07GSBPT9ST | ||
name: 김영길 | ||
- githubName: i3kae | ||
slackId: U07H0978N14 | ||
name: 김준서 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
# .github/workflows/pr-slack-notify.yml | ||
name: PR Slack Notification | ||
|
||
on: | ||
pull_request: | ||
types: [opened, reopened] | ||
|
||
jobs: | ||
notify: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
# 리뷰어 정보를 JSON으로 저장 | ||
- name: Set reviewers based on repository | ||
id: set-reviewers | ||
run: | | ||
REPO_NAME="${{ github.repository }}" | ||
if [[ $REPO_NAME == */dev-fe ]]; then | ||
echo "team=FE" >> $GITHUB_OUTPUT | ||
echo "reviewers=<@U07GSBHPCPR> <@U07H6QLFPBM> <@U07H9CTPC9J>" >> $GITHUB_OUTPUT | ||
elif [[ $REPO_NAME == */dev-be ]]; then | ||
echo "team=BE" >> $GITHUB_OUTPUT | ||
echo "reviewers=<@U07GSBPT9ST> <@U07H0978N14>" >> $GITHUB_OUTPUT | ||
fi | ||
- name: Send Slack notification | ||
uses: 8398a7/action-slack@v3 | ||
with: | ||
status: custom | ||
custom_payload: | | ||
{ | ||
"blocks": [ | ||
{ | ||
"type": "section", | ||
"text": { | ||
"type": "mrkdwn", | ||
"text": "🔍 *새로운 ${{ steps.set-reviewers.outputs.team }} PR이 등록되었습니다*" | ||
} | ||
}, | ||
{ | ||
"type": "section", | ||
"fields": [ | ||
{ | ||
"type": "mrkdwn", | ||
"text": "*Repository:*\n${{ github.repository }}" | ||
}, | ||
{ | ||
"type": "mrkdwn", | ||
"text": "*작성자:*\n<@${{ github.event.pull_request.user.login }}>" | ||
} | ||
] | ||
}, | ||
{ | ||
"type": "section", | ||
"text": { | ||
"type": "mrkdwn", | ||
"text": "*PR 제목:*\n<${{ github.event.pull_request.html_url }}|${{ github.event.pull_request.title }}>" | ||
} | ||
}, | ||
{ | ||
"type": "section", | ||
"text": { | ||
"type": "mrkdwn", | ||
"text": "*PR 설명:*\n${{ github.event.pull_request.body }}" | ||
} | ||
}, | ||
{ | ||
"type": "section", | ||
"text": { | ||
"type": "mrkdwn", | ||
"text": "👉 ${{ steps.set-reviewers.outputs.reviewers }} 리뷰 부탁드립니다!" | ||
} | ||
} | ||
] | ||
} | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |