Skip to content

Commit

Permalink
👷 :: [#433] Assign 자동화 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
baekteun committed Mar 7, 2024
1 parent 8ede180 commit 9cc83c6
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/AutoAssign.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Auto assign PR author

on:
pull_request:
types:
- opened
- reopened

jobs:
assign-pr-author:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Get PR author
id: get-pr-author
run: echo "author=${{ github.event.pull_request.user.login }}" >> $GITHUB_OUTPUT

- name: Assign PR author
run: gh pr edit ${{ github.event.number }} --add-assignee ${{ steps.get-pr-author.outputs.author }}
env:
GH_TOKEN: ${{ github.token }}

- name: Comment success result to PR
uses: mshick/add-pr-comment@v2
if: ${{ success() }}
with:
message: |
## ✅ Assign 자동 지정을 성공했어요!
@${{ steps.get-pr-author.outputs.author }}
allow-repeats: true

- name: Comment failure result to PR
uses: mshick/add-pr-comment@v2
if: ${{ failure() }}
with:
message: "## ❌ PR의 Assign 자동 지정을 실패했어요."
allow-repeats: true

0 comments on commit 9cc83c6

Please sign in to comment.