Update pr

From NVIDIA-NeMo/DataDesigner · View interactive version

Update pr is an AI agent skill from the GitHub repository NVIDIA-NeMo/DataDesigner. Update an existing GitHub PR description to reflect current changes after incorporating feedback. The argument may include the "--title" flag to also update the pull-request title, plus special instructions for the summary.

How to use this skill

Skill file

Update Pull Request

Update the description of an existing GitHub pull request for the current branch.

Arguments

$ARGUMENTS can be used for:

Step 1: Find the Existing PR

  1. Get current branch and PR info:

```bash

gh pr view --json number,title,body,url,headRefName,state

```

Important checks:

Step 2: Gather Current State

Run these commands in parallel to understand the full state:

  1. Uncommitted changes: git status --porcelain
  2. All commits on branch: git log origin/main..HEAD --oneline
  3. File changes summary: git diff --stat origin/main..HEAD
  4. Full diff: git diff origin/main..HEAD
  5. Repo info: gh repo view --json nameWithOwner -q '.nameWithOwner' (for constructing file URLs)

Important checks:

Step 3: Analyze and Categorize Changes

By Change Type (from commits and diff)

Identify Attention Areas

Flag for special reviewer attention:

Step 4: Update the PR

  1. Push any new commits (if needed):

```bash

git push

```

  1. Generate updated description using the same template as create-pr (see below)
  1. Update the PR body:

```bash

gh pr edit <number> --body "$(cat <<'EOF'

<body>

EOF

)"

```

  1. Optionally update title (if --title flag was provided):

```bash

gh pr edit <number> --title "<new-title>"

```

  1. Return the PR URL to the user.

PR Description Template

Use the same template as create-pr, with an updated footer:

## Summary

[1-2 sentence overview of what this PR accomplishes]

## Changes

### Added
- [New features/files - link to key files when helpful]

### Changed
- [Modified functionality - reference commits for specific changes]

### Removed
- [Deleted items]

### Fixed
- [Bug fixes - if applicable]

## Attention Areas

> Reviewers: Please pay special attention to the following:

- [`path/to/critical/file.py`](https://github.com/<owner>/<repo>/blob/<branch>/path/to/critical/file.py) - [Why this needs attention]

---
*Description updated with AI*

Section Guidelines

Edge Cases

Key Differences from `/create-pr`

| Aspect | /create-pr | /update-pr |

|--------|--------------|--------------|

| PR state | Creates new | Updates existing |

| Command | gh pr create | gh pr edit |

| First step | Check for commits | Find existing PR |

| Branch push | With -u flag | Simple push |

| Title | Always sets | Optional (with --title) |

| Footer | "Generated with AI" | "Description updated with AI" |

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.