Skip to content

Commit

Permalink
Revert "ci: add assign-reviewer job (#529)" (#590)
Browse files Browse the repository at this point in the history
This reverts commit 675caa0.
  • Loading branch information
bky373 authored Nov 11, 2024
1 parent c202261 commit 76fb734
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions .github/workflows/automation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,28 +24,3 @@ jobs:
- uses: actions/labeler@v5
with:
repo-token: ${{ github.token }}

assign-reviewer:
runs-on: ubuntu-latest
steps:
- name: Get previous PR author and assign as reviewer
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
current_repo=${{ github.repository }}
current_pr_num=${{ github.event.number }}
# ์ด์ „ PR ์ค‘์—์„œ ํ˜„์žฌ PR ์ž‘์„ฑ์ž์™€ ๋‹ค๋ฅธ ์ž‘์„ฑ์ž ์ฐพ๊ธฐ
previous_pr_author=$(gh pr list --repo $current_repo \
--state all \
--search "created:<${{ github.event.pull_request.created_at }} sort:created-desc -author:${{ github.actor }}" \
--limit 3 \
--json number,author \
--jq "map(select(.number < $current_pr_num))[0].author.login")
if [ -n "$previous_pr_author" ]; then
gh pr edit $current_pr_num --repo $current_repo --add-reviewer $previous_pr_author
else
echo "โŒ No previous PR author found to assign as reviewer"
exit 1
fi

0 comments on commit 76fb734

Please sign in to comment.