Skip to content

Commit

Permalink
fix(*): pr-slack-noti workflow 수정 (#29)
Browse files Browse the repository at this point in the history
* fix: pr-slack-noti

* chore: remove user-mapping

* fix

* fix
  • Loading branch information
Doeunnkimm authored Jun 29, 2024
1 parent 0aa2bc6 commit af655d5
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 122 deletions.
6 changes: 0 additions & 6 deletions .github/user-mapping.json

This file was deleted.

10 changes: 3 additions & 7 deletions .github/workflows/auto-approve.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,11 @@ jobs:
uses: actions/checkout@v2

- name: Auto approve PR
uses: hmarr/[email protected]
with:
github-token: ${{ secrets.ACCESS_TOKEN }}

- name: Comment on PR
run: |
PR_NUMBER=$(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH")
REVIEW_BODY="고생했다. 🎉👍🏽"
curl -s -X POST \
-H "Authorization: token ${{ secrets.ACCESS_TOKEN }}" \
-H "Content-Type: application/json" \
-d "{\"body\":\"고생했다. 🎉👍🏽\"}" \
"https://api.github.com/repos/${{ github.repository }}/issues/${PR_NUMBER}/comments"
-d "{\"event\":\"APPROVE\", \"body\":\"${REVIEW_BODY}\"}" \
"https://api.github.com/repos/${{ github.repository }}/pulls/${PR_NUMBER}/reviews"
39 changes: 39 additions & 0 deletions .github/workflows/pr-slack-noti.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: PR Slack Notification

on:
pull_request:
types: [review_requested]
issue_comment:
types: [created]

jobs:
notify:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '20'

- name: Install pnpm
run: npm install -g pnpm

- name: Install dependencies
run: pnpm install

- name: Build
run: pnpm build

- name: Notify Slack
uses: ./
with:
github_token: ${{ secrets.SLACK_BOT_ACCESS_TOKEN }}
slack_token: ${{ secrets.SLACK_BOT_ACCESS_TOKEN }}
slack_channel: C079A5A8BL0
slack_workspace: 'DEPROMEET 15th'
reviewers_file: .github/workflows/reviewers.yml
slack_merge_emoji_name: check
13 changes: 13 additions & 0 deletions .github/workflows/reviewers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
reviewers:
- githubName: Doeunnkimm
slackId: U07600UQG3T
name: WEB_김도은
- githubName: semnil5202
slackId: U075KR29RGR
name: Web_이세민
- githubName: LeeJeongHooo
slackId: U075C1A16LT
name: Web_이정호
- githubName: Andrevile
slackId: U07545VMS21
name: Web_장종오
109 changes: 0 additions & 109 deletions .github/workflows/slack-notify.yml

This file was deleted.

0 comments on commit af655d5

Please sign in to comment.