mirror of
https://github.com/neovim/neovim.git
synced 2024-12-25 13:45:15 -07:00
ef95174694
Using team reviewers when possible reduces the churn on the git history as we'll be able to add or remove reviewers without needing to change the workflow files. This requires using Github fine-grained personal access tokens with Pull Requests set to "Read and write" and Members to "Read-only".
20 lines
605 B
YAML
20 lines
605 B
YAML
name: "Request reviews"
|
|
on:
|
|
pull_request_target:
|
|
types: [labeled, ready_for_review, reopened]
|
|
jobs:
|
|
request-reviewer:
|
|
if: github.event.pull_request.state == 'open' && github.event.pull_request.draft == false
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
pull-requests: write
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: 'Request reviewers'
|
|
uses: actions/github-script@v6
|
|
with:
|
|
github-token: ${{ secrets.TEAM_REVIEW }}
|
|
script: |
|
|
const script = require('./.github/scripts/reviews.js')
|
|
await script({github, context})
|