Skip to content

feat(issue): carry upstream comments into the mirror on issue pull#50

Merged
cabljac merged 2 commits into
mainfrom
feat/issue-pull-comments
Jun 5, 2026
Merged

feat(issue): carry upstream comments into the mirror on issue pull#50
cabljac merged 2 commits into
mainfrom
feat/issue-pull-comments

Conversation

@cabljac

@cabljac cabljac commented Jun 5, 2026

Copy link
Copy Markdown
Owner

Problem

venfork issue pull copied only the upstream issue body into the mirror, dropping the comment thread — the team lost the discussion context they need to triage.

Change

  • readIssue now requests comments from gh issue view --json ....
  • New renderPulledComments() (exported for unit testing) formats the thread as an ### Upstream comments (N) Markdown section: per comment, **@author** — <createdAt>: + body.
  • issue pull appends that section to the mirror issue body (between body and the existing provenance footer). The pull spinner now reports the comment count.

Direction is one-way: comments flow upstream → mirror only. issue stage still promotes the redacted body alone, so internal comments are never pushed upstream.

Tests

  • Unit tests for renderPulledComments (empty/undefined, multi-comment rendering, singular label + missing-author fallback).
  • Extended e2e tier 5: add an upstream comment, then assert the pulled mirror issue body contains it under "Upstream comments".
  • bun run check clean; full suite 297 pass / 6 e2e-skipped.

Docs

README issue pull updated: notes comments are snapshotted at pull time (still no live sync of later comments/state).

cabljac added 2 commits June 5, 2026 08:17
`venfork issue pull` only copied the upstream issue body, dropping the
comment thread the team needs for triage. Fetch comments via
`gh issue view --json ...,comments` and snapshot them into the mirror
issue body under an "Upstream comments" section.

Comments flow upstream->mirror only; `issue stage` still promotes the
body alone (redacted), so internal comments are never pushed upstream.
…l test

Address self-review: IssueComment.body is optional to match the renderer's
defensive `c.body?.trim()`, and the issue-pull unit test mock now includes a
comment so the in-command render path is exercised.
@cabljac cabljac merged commit 8453867 into main Jun 5, 2026
4 checks passed
@cabljac cabljac deleted the feat/issue-pull-comments branch June 5, 2026 07:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant