reviewers_add.yml 612 B

1234567891011121314151617181920
  1. name: "reviewers: add"
  2. on:
  3. pull_request_target:
  4. types: [labeled, ready_for_review, reopened]
  5. workflow_call:
  6. jobs:
  7. request-reviewer:
  8. if: github.event.pull_request.state == 'open' && github.event.pull_request.draft == false && !endsWith(github.actor, '[bot]')
  9. runs-on: ubuntu-latest
  10. permissions:
  11. pull-requests: write
  12. steps:
  13. - uses: actions/checkout@v4
  14. - name: 'Request reviewers'
  15. uses: actions/github-script@v7
  16. with:
  17. script: |
  18. const script = require('./.github/scripts/reviewers_add.js')
  19. await script({github, context})