neovim/.github/workflows/reviewers_add.yml
dundargoc 755512ed60 ci: don't add reviewers for PRs created by a bot
This will ensure automatic backports created by the backport action does
not request reviewers (since the commit in question has already been
vetted and merged), but manual backports created by users does request
reviewers as these commits has not been vetted previously.
2024-09-13 16:58:15 +02:00

20 lines
612 B
YAML

name: "reviewers: add"
on:
pull_request_target:
types: [labeled, ready_for_review, reopened]
workflow_call:
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@v4
- name: 'Request reviewers'
uses: actions/github-script@v7
with:
script: |
const script = require('./.github/scripts/reviewers_add.js')
await script({github, context})