feat(agents): add pull request creation skill - #1079
Conversation
Signed-off-by: Miyoung Choi <miyoungc@nvidia.com>
Signed-off-by: Miyoung Choi <miyoungc@nvidia.com>
Signed-off-by: Miyoung Choi <miyoungc@nvidia.com>
|
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughChangesContributor pull request workflow
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 5
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.agents/skills/contributor-create-pr/SKILL.md:
- Line 204: Update the single-template branch in the PR creation instructions to
assign the temporary file path to NMP_PR_BODY, then redirect the trusted git
show output into that file before gh pr create uses it. Ensure the existing gh
pr create invocation receives the populated NMP_PR_BODY path.
- Around line 31-35: Update the repository URL validation around gh repo view,
remote URL checks, and the fetch/push commands to reject plaintext http:// and
git:// transports; permit only authenticated encrypted HTTPS or SSH URLs before
using any URL. Apply this validation consistently to the referenced command
sections and abort when a URL violates the allowed schemes.
- Around line 31-35: Update the repository validation steps around NMP_REPO and
git remote get-url origin to compare every configured fetch and push URL for
origin against $NMP_REPO before any fetch or push occurs; fail validation on
mismatches rather than only displaying the remote URL, while preserving the
existing GitHub target and authentication checks.
- Around line 42-45: Update the setup flow around NMP_BASE_BRANCH to validate
the origin remote first by retrieving its URL with git remote get-url origin and
comparing it with NMP_REPO. Stop immediately on mismatch, before git fetch,
assigning NMP_BASE_REF, or reading repository policy via git show; preserve the
existing branch discovery and fetch behavior after validation succeeds.
- Around line 197-207: Update the template-resolution workflow in the
contributor PR creation instructions to detect when the trusted base has no pull
request template but the feature branch adds one, and use a controlled bootstrap
PR body for that first-template installation. Preserve the existing behavior for
an absent template without a newly added replacement, multiple templates, and
changes to an existing template; only bypass the stop condition for the explicit
first-template bootstrap case.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 7bd54877-fd8e-467b-850e-571f47f46e4c
📒 Files selected for processing (2)
.agents/skills/contributor-create-pr/SKILL.md.github/PULL_REQUEST_TEMPLATE.md
Signed-off-by: Miyoung Choi <miyoungc@nvidia.com>
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.agents/skills/contributor-create-pr/SKILL.md:
- Line 192: Export NMP_BASE_REF immediately after its assignment in the
surrounding contributor PR workflow so the nested bash DCO audit can access it;
keep the existing validation and audit behavior unchanged.
- Line 192: Update the DCO audit workflow around git rev-list to detect shallow
repository history and deepen or unshallow the repository before auditing
"$NMP_BASE_REF..HEAD". Keep the existing NMP_BASE_REF validation and ensure the
audit runs only after complete feature-branch ancestry is available.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 7839366a-41f5-424a-a8ed-d82f66d9ac13
📒 Files selected for processing (1)
.agents/skills/contributor-create-pr/SKILL.md
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
There was a problem hiding this comment.
Actionable comments posted: 2
♻️ Duplicate comments (3)
.agents/skills/contributor-create-pr/SKILL.md (3)
246-249: 🎯 Functional Correctness | 🔴 CriticalPopulate
NMP_PR_BODYbefore PR creation.The template section describes a
mktempfile but never assigns its path toNMP_PR_BODYor writes the trusted template into it. Line [329] therefore passes an unset or empty path togh pr create. Assign the path, redirectgit showinto it, and use that populated file.Also applies to: 324-330
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.agents/skills/contributor-create-pr/SKILL.md around lines 246 - 249, Populate NMP_PR_BODY in the template-selection flow before invoking gh pr create. Assign it to the mktemp file path and redirect the trusted-base git show output into that file, ensuring both single-template and selected-template cases use the populated path while preserving the missing-template stop behavior.
239-248: 🎯 Functional Correctness | 🟠 MajorAllow the first-template bootstrap case.
The lookup reads only
$NMP_BASE_REF. When the base has no template, Line [248] stops even though this PR adds.github/PULL_REQUEST_TEMPLATE.md. Detect that exact first-template case and use a controlled bootstrap body. Preserve the stop for an absent replacement or ambiguous templates.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.agents/skills/contributor-create-pr/SKILL.md around lines 239 - 248, Update the PR-template lookup in the contributor workflow to allow a controlled bootstrap body when the trusted base lacks a template but the current PR change adds .github/PULL_REQUEST_TEMPLATE.md. Continue using the trusted-base template when available, and preserve the existing stop behavior when no replacement template is added or when template selection is ambiguous; do not reuse branch-modified or historical PR bodies.
191-193: 🎯 Functional Correctness | 🟠 MajorExport
NMP_BASE_REFto the DCO audit shell.
NMP_BASE_REFis assigned before the here-document, but it is not exported. The childbashat Line [191] cannot see it, so Line [192] exits before auditing commits. Export the variable or pass it inline.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.agents/skills/contributor-create-pr/SKILL.md around lines 191 - 193, Export NMP_BASE_REF before the bash here-document in the DCO audit flow so the child shell can access the validated base reference. Update the assignment near the DCO audit block, preserving the existing required-value validation and audit behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.agents/skills/contributor-create-pr/SKILL.md:
- Line 212: Update the commit-audit flow around git rev-list to detect whether
the repository is shallow and deepen or unshallow it before enumerating PR
commits. Ensure the existing audit still processes every commit in the
NMP_BASE_REF..HEAD range, including ancestors omitted by the initial
feature-clone fetch.
- Around line 358-362: Update the CodeRabbit comment filters in the issue and
pull-request gh api queries to match only the verified CodeRabbit bot or app
login, replacing the broad contains("coderabbit") predicate. Keep the existing
pagination and selected output fields unchanged, and use the exact approved
identity consistently in both queries.
---
Duplicate comments:
In @.agents/skills/contributor-create-pr/SKILL.md:
- Around line 246-249: Populate NMP_PR_BODY in the template-selection flow
before invoking gh pr create. Assign it to the mktemp file path and redirect the
trusted-base git show output into that file, ensuring both single-template and
selected-template cases use the populated path while preserving the
missing-template stop behavior.
- Around line 239-248: Update the PR-template lookup in the contributor workflow
to allow a controlled bootstrap body when the trusted base lacks a template but
the current PR change adds .github/PULL_REQUEST_TEMPLATE.md. Continue using the
trusted-base template when available, and preserve the existing stop behavior
when no replacement template is added or when template selection is ambiguous;
do not reuse branch-modified or historical PR bodies.
- Around line 191-193: Export NMP_BASE_REF before the bash here-document in the
DCO audit flow so the child shell can access the validated base reference.
Update the assignment near the DCO audit block, preserving the existing
required-value validation and audit behavior.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 956b3f7d-8ee8-4903-bef8-3ac2328f3537
📒 Files selected for processing (2)
.agents/skills/contributor-create-pr/SKILL.md.github/PULL_REQUEST_TEMPLATE.md
🚧 Files skipped from review as they are similar to previous changes (1)
- .github/PULL_REQUEST_TEMPLATE.md
Signed-off-by: Miyoung Choi <miyoungc@nvidia.com>
…-platform-contributor-create-pr/miyoungc Signed-off-by: Miyoung Choi <miyoungc@nvidia.com>
….com:NVIDIA-NeMo/nemo-platform into nemo-platform-contributor-create-pr/miyoungc Signed-off-by: Miyoung Choi <miyoungc@nvidia.com>
Signed-off-by: Miyoung Choi <miyoungc@nvidia.com>
Summary
Add a repository-local pull request workflow and a trusted NeMo Platform pull request template. Together, they consolidate the repository's contribution requirements into a repeatable path from completed changes through validation, DCO auditing, PR creation, post-push description refresh, and review follow-up.
Changes
.agents/skills/contributor-create-pr/SKILL.mdwith branch and worktree checks, direct-repository and fork remote validation, targeted validation selection, shallow-history-safe DCO auditing, conventional title validation, safe pushes, CI and automated-review follow-up, and merge-conflict handling..github/PULL_REQUEST_TEMPLATE.md, adapting NemoClaw's core summary, change classification, quality-gate, and verification structure to NeMo Platform's targeted validation, documentation, conventional-title, and DCO workflows.Type of Change
Quality Gates
Verification
Signed-off-by:traileruv run pre-commit run -apasses, or any blocked checks are identified belowTargeted validation:
quick_validate.py .agents/skills/contributor-create-pr: passed.pre-commit run --files .github/PULL_REQUEST_TEMPLATE.md .agents/skills/contributor-create-pr/SKILL.md: passed.git diff --check origin/main...HEAD: passed.Signed-off-by:trailers. GitHub-generated merge commit290f3c643has no trailer and is retained as an approved exception; GitHub's DCO check passes.uv 0.10.2while the repository requires<0.10.0, Docker access is unavailable, and the isolated worktree lacks the required Studio dependencies and Node 22.23.2 runtime. Ruff, Ruff format, ty, lock drift, plugin import, merge-conflict, and all applicable changed-file hooks passed.Summary by CodeRabbit
Documentation
Chores