feat: add reusable CODEOWNERS suggested-reviewer workflows - #556
Draft
kajalj22 wants to merge 1 commit into
Draft
Conversation
Adds two workflow_call workflows, usable by any NeMo repo that keeps a .github/CODEOWNERS file: - _suggest_reviewers.yml: requests reviewers on a PR from `# suggest:` comment lines in CODEOWNERS (a GitHub-native, non-blocking extension of the enforced CODEOWNERS syntax -- GitHub's own parser ignores comment lines, so these can never become required reviewers). Skips a suggestion already covered by enforcement, either textually or via team membership. Alerts Slack (via the existing send-slack-alert action) if the batch request fails, without failing the workflow. - _validate_codeowners_suggestions.yml: runs the shared matcher's own unit tests, warns on redundant CODEOWNERS rules, and verifies every `# suggest:` user/team-member is a current NVIDIA-NeMo org member (reusing check-nvidia-sso + NVIDIA_MANAGEMENT_ORG_PAT, already used elsewhere in this repo). The pattern-matching/parsing logic lives in .github/scripts/codeowners-suggestions.js, shared by both workflows and covered by its own test file. Signed-off-by: Kajal Jain <kajalj@nvidia.com>
kajalj22
added a commit
to NVIDIA-NeMo/Gym
that referenced
this pull request
Aug 22, 2026
Replace the Gym-local implementation with thin callers into NVIDIA-NeMo/FW-CI-templates#556 (_suggest_reviewers.yml and _validate_codeowners_suggestions.yml), so the same CODEOWNERS `# suggest:` convention is reusable by any NeMo repo instead of duplicated per-repo. Pinned to that PR's branch SHA for now; update to a released tag once it merges. .github/CODEOWNERS itself stays in this repo, since ownership data is repo-specific. Signed-off-by: Kajal Jain <kajalj@nvidia.com>
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
_suggest_reviewers.yml— aworkflow_callworkflow that requests reviewers on a PR from# suggest: <pattern> @owner ...comment lines layered on top of a repo's.github/CODEOWNERS. Comment lines are invisible to GitHub's own CODEOWNERS parser, so these can never become required/blocking reviewers no matter what branch protection does — purely advisory, alongside whatever the repo already enforces._validate_codeowners_suggestions.yml— runs the shared matcher's unit tests, warns (non-blocking) on redundant CODEOWNERS rules, and verifies every# suggest:-referenced user (directly, or via a suggested team's membership) is a current NVIDIA-NeMo org member. Reusescheck-nvidia-sso+NVIDIA_MANAGEMENT_ORG_PAT, already used elsewhere in this repo (_cicd_preflight.yml)..github/scripts/codeowners-suggestions.js, the shared pattern-matching/parsing logic, with its ownnode --testsuite (codeowners-suggestions.test.js) — both workflows require the same module rather than duplicating matching logic inline.Motivation
First consumer is
NVIDIA-NeMo/Gym(see companion PR), which wanted PR-level reviewer suggestions that are explicitly non-enforced, on top of its existing enforced CODEOWNERS. Built here instead of repo-local so any NeMo repo with a CODEOWNERS file can adopt it the same way other_*.ymlreusable workflows are consumed.Test plan
node --test .github/scripts/codeowners-suggestions.test.jspasses locally (14/14)