Skip to content

Commit

Permalink
[WIP]
Browse files Browse the repository at this point in the history
  • Loading branch information
shin-usu committed Aug 14, 2024
1 parent 5be67aa commit 4e305e9
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/ios-assign-reviewers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Auto assign iOS PR reviewers

on:
pull_request:
types: [opened, ready_for_review, labeled]

jobs:
reviewers-assign:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write

timeout-minutes: 5
steps:
- name: Assign reviewers
uses: actions/github-script@v7
if: contains(github.event.pull_request.labels.*.name, 'type:iOS 🍎') && github.event.pull_request.draft == false
with:
script: |
const author = context.payload.pull_request.user.login;
const reviewers = ['ry-itto', 'charles-b-stb', 'MrSmart00', 'shin-usu'].filter(reviewer => reviewer !== author)
await github.rest.pulls.requestReviewers({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.payload.pull_request.number,
reviewers
});

0 comments on commit 4e305e9

Please sign in to comment.