Repository navigation
58 lines (52 loc) · 1.94 KB
/
Copy pathreview-readiness.yml
File metadata and controls
58 lines (52 loc) · 1.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
name: Review Readiness
on:
pull_request_target:
types: [opened, ready_for_review, labeled, unlabeled]
permissions:
contents: read
issues: read
pull-requests: write
concurrency:
group: review-readiness-${{ github.event.pull_request.number }}
cancel-in-progress: false
jobs:
reviewers:
name: OpenShell / Review Readiness
if: >-
github.event.action == 'opened' ||
(!github.event.pull_request.draft &&
(github.event.action == 'ready_for_review' ||
startsWith(github.event.label.name, 'area:') ||
startsWith(github.event.label.name, 'topic:')))
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
# Use the merged roster and helper, never code from the PR head.
- name: Check out the reviewer roster and helper
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ github.event.repository.default_branch }}
sparse-checkout: |
REVIEWERS.md
MAINTAINERS.md
tasks/scripts/check_review_readiness.py
tasks/scripts/label_accepted_work.py
tasks/scripts/check_maintainer_approval.py
sparse-checkout-cone-mode: false
persist-credentials: false
- name: Label newly opened accepted work and reconcile reviewers
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
PR_NUMBER: ${{ github.event.pull_request.number }}
PR_ACTION: ${{ github.event.action }}
shell: bash
run: |
set -euo pipefail
args=(--repo "$GH_REPO" --pr "$PR_NUMBER" --apply)
if [ "$PR_ACTION" = opened ]; then
args+=(--label-accepted-work)
fi
python3 tasks/scripts/check_review_readiness.py "${args[@]}"