Skip to content

feat(github): add integrations to keep pull requests up to date #258

Description

@dan-petty

Description

Implement end-to-end integrations to automatically keep GitHub pull requests up to date with their base branches (e.g. main or active release branches).

Objectives & Deliverables

  1. GitHub Action Workflow (.github/workflows/update-prs.yml):
    • Automatically trigger when changes are pushed to main or release/** branches.
    • Support workflow_dispatch (with base branch and PR number inputs) and PR comment /update / /sync triggers.
    • Gracefully handle conflicts, draft PRs, and mergeability status.
  2. Native CLI Command (devops pr update):
    • Provide devops pr update [PR_NUMBER] with --all, --base, --repo, --expected-head-sha, and --dry-run options.
    • Call GitHub's PUT /repos/{owner}/{repo}/pulls/{number}/update-branch endpoint with rate-limited, token-bucket pacing via run_gh.
    • Rich terminal status reporting.
  3. FastMCP Agent Tool (pr_update_branch):
    • Expose MCP tool allowing autonomous agents to update PR branches programmatically.
  4. Comprehensive Test Suite:
    • Unit and integration tests in tests/test_pr_update.py verifying single PR update, batch --all updates, conflict handling, --dry-run, and MCP tool wrapper.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority/p1-highHigh impact work required for upcoming release milestonescope/cliCore CLI framework, Typer subcommands, options, and tablestype/featureNew user-facing functionality or capability addition

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions