Skip to content

feat: living status comment for upstream PR maintenance #132

@diberry

Description

@diberry

Problem

Upstream PR maintenance comments go stale. Ralph posts "Waiting for CI" but when CI passes minutes later, the comment stays forever — misleading maintainers into thinking the PR isn't ready.

Example: bradygaster#726 (comment)

Solution: Living Status Comment

Use a single "living" comment per upstream PR that gets updated in-place on every Ralph loop, instead of appending new comments that go stale.

Pattern

  1. Search PR comments for <!-- ralph-upstream-status -->
  2. If found → gh api PATCH to update body with current state
  3. If not found → gh pr comment to create with marker
  4. Body always reflects CURRENT state:
<!-- ralph-upstream-status -->
## Upstream Maintenance Status
**Last checked:** {ISO 8601 timestamp}

- [x] Mergeable: MERGEABLE
- [x] Single commit
- [x] File audit: clean
- [x] CI: All checks green
- [x] Team approval: Reviewed on fork
- [x] Maintainer feedback: none

**Status:** Ready for maintainer review

Rules

  • ONE status comment per PR — never post a second
  • Update timestamp and checklist on every Ralph loop
  • Keep historical action comments (team reviews, changeset additions) as separate comments — do NOT merge those into the status comment
  • <!-- ralph-upstream-status --> marker MUST be on line 1

Where to implement

Update dina-upstream-pr-maintenance skill on diberry/squad branch:

.copilot/skills/dina-upstream-pr-maintenance/SKILL.md

gh API commands

Find existing comment:

gh api repos/{owner}/{repo}/issues/{pr_number}/comments --jq '.[] | select(.body | contains("<!-- ralph-upstream-status -->")) | .id'

Update comment:

gh api repos/{owner}/{repo}/issues/comments/{comment_id} -X PATCH -f body="..."

Create comment:

gh pr comment {pr_number} --repo {owner}/{repo} --body "..."

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestgo:needs-researchNeeds investigationsquadSquad triage inbox — Lead will assign to a membersquad:flightAssigned to Flight (Lead)

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions