Files
neovim/.github/workflows/reviewers_add.yml
T
Daniel Hast 755087f8ef ci: set default permissions for workflows
The default workflow permissions are overly broad; setting permissions
explicitly at the workflow level ensures excessive permissions are not
unintentionally granted to jobs. For details, see:
https://docs.zizmor.sh/audits/#excessive-permissions
2026-03-09 21:36:20 -04:00

26 lines
682 B
YAML

name: "reviewers: add"
on:
pull_request_target:
types: [labeled, ready_for_review, reopened]
workflow_call:
permissions: {}
jobs:
request-reviewer:
if: github.event.pull_request.state == 'open' && github.event.pull_request.draft == false && !endsWith(github.actor, '[bot]')
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- name: 'Request reviewers'
uses: actions/github-script@v8
with:
script: |
const script = require('./.github/scripts/reviewers_add.js')
await script({github, context})