Skip to content

Commit

Permalink
ci: add auto assign and specify reviewer CI
Browse files Browse the repository at this point in the history
  • Loading branch information
m1sk9 committed Nov 18, 2023
1 parent 517406c commit ff578a9
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Auto assign and Specify reviewer

on:
pull_request:
types: [ opened, unassigned ]

jobs:
assign:
runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- run: gh pr edit ${{ github.event.number }} --add-assignee ${{ github.actor }}
if: ${{ toJson(github.event.pull_request.assignees) == '[]' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
reviewer:
runs-on: ubuntu-latest
timeout-minutes: 5
needs: assign

steps:
- run: gh pr edit ${{ github.event.number }} --add-reviewer @approvers/pulsate
if: ${{ toJson(github.event.pull_request.requested_reviewers) != '@approvers/pulsate' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}

0 comments on commit ff578a9

Please sign in to comment.