github-update-pr

Regenerate and push pull request descriptions from a template via gh.

1|Updated Dec 9, 2024
One-click install
npx skills add https://github.com/hadenlabs/tasks --skill github-update-pr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: github-update-pr
Source: https://github.com/hadenlabs/tasks/tree/main/.claude/skills/github-update-pr
Command: npx skills add https://github.com/hadenlabs/tasks --skill github-update-pr

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Keeps pull request descriptions in sync with the latest changes on the active branch, reducing manual updates and misalignment.

Core Features & Use Cases

  • Validate the branch locally and detect the PR that corresponds to it.
  • Regenerate the PR body from .github/PULL_REQUEST_TEMPLATE.md using main...HEAD.
  • Update the PR body via gh pr update, with a fallback to gh api when needed.
  • Handle branches with or without upstreams and surface actionable diagnostics for failures.

Quick Start

Ask me to update the PR body to match the latest diff on the current branch.

Frequently Asked Questions about github-update-pr

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I update a pull request description to match the latest diff?

You can update a pull request description by regenerating the body from .github/PULL_REQUEST_TEMPLATE.md using the main...HEAD diff. The Skill validates the branch, detects the corresponding PR, and updates the body via gh pr update or a gh api fallback.

What is the best way to keep a GitHub PR body in sync with code changes?

The best way to keep a GitHub PR body in sync is to automate regeneration from .github/PULL_REQUEST_TEMPLATE.md based on the main...HEAD diff. This ensures the PR description accurately reflects the latest active branch changes without manual intervention.

Does this PR update automation work for branches without an upstream?

Yes, this PR update automation handles branches with or without upstreams. It validates the local branch, detects the corresponding open PR, and surfaces actionable diagnostics if failures occur during the body regeneration or update process.

How do I regenerate a PR body from a pull request template automatically?

You regenerate a PR body from a pull request template by applying the main...HEAD diff to .github/PULL_REQUEST_TEMPLATE.md. The system detects the open PR for the current branch and updates the description automatically via the GitHub API.

Why does my GitHub pull request description not match my latest commits?

Your GitHub pull request description may not match your latest commits because the body was not regenerated after new code pushes. You need to update the PR description to reflect the current active branch diff using the main...HEAD range.