create-github-pr

bởi nvidia

Tạo pull request GitHub bằng cách sử dụng gh CLI. Sử dụng khi người dùng muốn tạo PR mới, gửi mã để xem xét, hoặc mở pull request. Từ khóa kích hoạt -…

npx skills add https://github.com/nvidia/openshell --skill create-github-pr

Create GitHub Pull Request

Create pull requests on GitHub using the gh CLI.

Prerequisites

  • The gh CLI must be authenticated (gh auth status)
  • You must have commits on a branch that's pushed to the remote
  • For issue-backed work, the branch should follow <issue-number>-<description>/<username>. Exempt issue-less changes may use <description>/<username>.

Before Creating a PR

Check Config Documentation

If the branch changes gateway TOML parsing, [openshell.gateway] fields, [openshell.drivers.<name>] fields, driver config defaults, or Helm rendering of gateway.toml, verify that docs/reference/gateway-config.mdx is updated in the same branch. If the change affects user-facing compute-driver setup, also update docs/reference/sandbox-compute-drivers.mdx or the relevant deployment docs.

Check Agent Infrastructure

Use the sync-agent-infra skill's maintenance map to identify related skill updates when the branch changes behavior, commands, or development workflows. Run its full consistency check when the branch adds, removes, or renames skills or crates; changes workflow relationships or skill coverage; modifies issue or PR templates; or changes agent cross-references. Resolve any drift before creating the PR.

Run Pre-commit Checks

Run the local pre-commit task before opening a PR:

mise run pre-commit

Verify Branch State

Before creating a PR, verify:

  1. You're not on main - Never create PRs directly from main:

    # Should NOT be "main"
    git branch --show-current
    
  2. Branch follows naming convention - Use <issue-number>-<description>/<initials> for issue-backed work or <description>/<initials> for an exempt issue-less change.

    # Example: 1234-add-pagination/jd
    git branch --show-current
    
  3. Consider squashing commits - For cleaner history, squash related commits before pushing:

    # Squash last N commits into one
    git reset --soft HEAD~N
    git commit -m "feat(component): description"
    

Push Your Branch

Ensure your branch is pushed to the remote:

git push -u origin HEAD

Creating a PR

Basic PR creation (opens editor for description):

gh pr create

With title and body:

gh pr create --title "PR title" --body "PR description"

PR Title Format

PR titles must follow the conventional commit format:

<type>(<scope>): <description>

Types:

  • feat - New feature
  • fix - Bug fix
  • docs - Documentation only
  • refactor - Code change that neither fixes a bug nor adds a feature
  • test - Adding or updating tests
  • chore - Maintenance tasks (CI, build, dependencies)
  • perf - Performance improvement

Scope is typically the component name (e.g., evaluator, cli, sdk, jobs).

Examples:

  • feat(evaluator): add support for custom rubrics
  • fix(jobs): handle timeout errors gracefully
  • docs(sdk): update authentication examples
  • refactor(models): simplify deployment logic
  • chore(ci): update Python version in pipeline

Link to an Issue

Features, user-visible behavior changes, public API changes, architecture changes, and multi-PR efforts must link an accepted issue. Use Closes #<issue-number> in the body to auto-close the issue when merged:

gh pr create \
  --title "Fix validation error for empty requests" \
  --body "Closes #123

## Summary
- Added validation for empty request bodies
- Returns 400 instead of 500"

Small documentation fixes, mechanical maintenance, and obvious localized bug fixes may omit a separate issue when the PR contains enough context to review the decision and implementation together. In that case, write No issue required: <brief reason> in the Related Issue section. Do not use this exception for security fixes; follow SECURITY.md.

Create as Draft

For work-in-progress that's not ready for review:

gh pr create --draft --title "WIP: New feature"

With Labels

gh pr create --title "Title" --label "area:cli" --label "topic:security"

Target a Different Branch

Default target is main. To target a different branch:

gh pr create --base "release-1.0"

PR Description Format

PR descriptions must follow the project's PR template structure:

## Summary
<!-- 1-3 sentences: what this PR does and why -->

## Related Issue
<!-- Fixes #NNN / Closes #NNN, or "No issue required: <reason>" for an exempt change -->

## Changes
<!-- Bullet list of key changes -->

## Testing
<!-- What testing was done? -->
- [ ] `mise run pre-commit` passes
- [ ] Unit tests added/updated
- [ ] E2E tests added/updated (if applicable)

## Checklist
- [ ] Follows Conventional Commits
- [ ] Commits are signed off (DCO)

Populate the testing checklist based on what was actually run. Check boxes for steps that were completed.

Example PR (Complete)

gh pr create \
  --title "feat(cli): add pagination to sandbox list" \
  --body "$(cat <<'EOF'
## Summary

Add `--limit` and `--offset` flags to `openshell sandbox list` for pagination.

## Related Issue

Closes #456

## Changes

- Added `offset` and `limit` query parameters to the sandbox list API call
- Default limit is 20, max is 100
- Response includes `total_count` field

## Testing

- [x] `mise run pre-commit` passes
- [x] Unit tests added/updated
- [ ] E2E tests added/updated (if applicable)

## Checklist

- [x] Follows Conventional Commits
- [x] Commits are signed off (DCO)
EOF
)"

Useful Options

OptionDescription
--title, -tPR title (use conventional commit format)
--body, -bPR description
--reviewer, -rRequest review from user
--draftCreate as draft (WIP)
--label, -lAdd label (can use multiple times)
--base, -BTarget branch (default: main)
--head, -HSource branch (default: current)
--webOpen in browser after creation

After Creating

The command outputs the PR URL and number.

Display the URL using markdown link syntax so it's easily clickable:

Created PR [#123](https://github.com/OWNER/REPO/pull/123)

Monitor Workflow Run (Optional)

If the user asks to wait for a green CI before posting the RFR, use this snippet to monitor the workflow run:

# Watch the latest workflow run for the current branch
gh run watch

Or poll manually:

RUN_ID=$(gh run list --branch "$(git branch --show-current)" --limit 1 --json databaseId --jq '.[0].databaseId')
gh run watch "$RUN_ID"

Thêm skills từ nvidia

compileiq-debug
nvidia
Sử dụng khi có điều gì đó không ổn: Search() bị treo, tất cả các đánh giá đều trả về INVALID_SCORE, điểm số không cải thiện, mọi cấu hình đều trả về cùng một số, lỗi ptxas…
nemoclaw-maintainer-cross-issue-sweep
nvidia
Quét các vấn đề đang mở khác để tìm những vấn đề mà một PR nhất định có thể sửa hoặc vô tình làm hỏng. Đưa ra các cơ hội sửa lỗi liền kề và rủi ro mâu thuẫn với file:dòng…
fhir-basics
nvidia
Dạy các tác nhân cách hoạt động của API FHIR R4, những tài nguyên có sẵn, cách truy vấn chúng với tham số tìm kiếm, và cách phân tích chính xác tất cả các định dạng phản hồi…
compileiq-validate-result
nvidia
Sử dụng SAU KHI tìm kiếm hoàn tất và TRƯỚC KHI yêu cầu tăng tốc hoặc gửi ACF. Tải tệp CSV dump_results, trích xuất các ứng viên top-K (đơn mục tiêu)…
changelog-audit
nvidia
Kiểm tra Warp CHANGELOG.md trước khi phát hành: khôi phục các mục bị mất, sắp xếp theo tác động người dùng, tinh chỉnh ngôn ngữ mục, xuống dòng và (chế độ nhánh phát hành) so sánh bump…
maintain-dynamic-plugins
nvidia
Duy trì các bộ nạp plugin động NeMo Relay, tệp kê khai, SDK gốc Rust, giao thức worker gRPC, SDK worker Python, tài liệu, kiểm thử và phạm vi quy trình phát hành
dgx-diagnose
nvidia
Chẩn đoán các sự cố thường gặp của DGX Station GB300 — lỗi CUDA, nhắm sai GPU, lỗi container vLLM/SGLang, vấn đề trạng thái MIG, lỗi NVLink/Fabric Manager,…
case-summary
nvidia
Chuẩn bị một bản tóm tắt ca lâm sàng hoàn chỉnh cho bệnh nhân từ các điểm cuối FHIR. Sử dụng khi được yêu cầu tóm tắt bệnh nhân, tổng hợp ca bệnh, hoặc chuẩn bị cho hội đồng khối u.