mirror of
https://github.com/neovim/neovim.git
synced 2026-05-25 06:18:32 +00:00
Problem: The reviewer assignment workflow can run multiple times for the same PR. Solution: Ensure only the newest review-assignment run continues with workflow concurrency.
30 lines
812 B
YAML
30 lines
812 B
YAML
name: "reviewers: add"
|
|
on:
|
|
pull_request_target:
|
|
types: [labeled, ready_for_review, reopened]
|
|
workflow_call:
|
|
|
|
permissions: {}
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
|
|
cancel-in-progress: true
|
|
|
|
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@v9
|
|
with:
|
|
script: |
|
|
const script = require('./.github/scripts/reviewers_add.js')
|
|
await script({github, context})
|