feat(issue): carry upstream comments into the mirror on issue pull#50
Merged
Conversation
`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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
venfork issue pullcopied only the upstream issue body into the mirror, dropping the comment thread — the team lost the discussion context they need to triage.Change
readIssuenow requestscommentsfromgh issue view --json ....renderPulledComments()(exported for unit testing) formats the thread as an### Upstream comments (N)Markdown section: per comment,**@author** — <createdAt>:+ body.issue pullappends 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 stagestill promotes the redacted body alone, so internal comments are never pushed upstream.Tests
renderPulledComments(empty/undefined, multi-comment rendering, singular label + missing-author fallback).bun run checkclean; full suite 297 pass / 6 e2e-skipped.Docs
README
issue pullupdated: notes comments are snapshotted at pull time (still no live sync of later comments/state).