GitHub `#NNN` issue/PR refs duplicate and break URL on sync
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 59.6k
- Forks
- 5.8k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 49
Description
Affected: Plane Cloud, official GitHub integration. See also: meta-issue on destructive overwrite (issue 01).
Symptom
GitHub issue/PR references in a body or comment are corrupted in three distinct ways after a GH→Plane import + Plane→GH round-trip.
Input (GH markdown): #146
Plane stored HTML, after one import:
<a class="issue-link js-issue-link" data-id="..."
href="https://github.com/<owner>/<repo>/issues/146"
rel="noopener noreferrer"></a><a href="https://github.com/<repo>/issues/146"
rel="noopener noreferrer"><repo> #146</a>
Pushed back to GH markdown:
[](https://github.com/<owner>/<repo>/issues/146)[<repo> #146](https://github.com/<repo>/issues/146)
Three distinct bugs
- URL drops the repository owner.
<owner>/<repo>/issues/Nbecomes<repo>/issues/N— i.e. the integration treats the repo name as the owner segment. The resulting link is a 404 on GitHub. - Empty anchor emitted alongside the populated anchor. The first
<a>has the correct URL but empty link text. The second<a>has the broken URL and the human-readable text. - Anchors multiply on subsequent re-imports. We observed up to 7 repeated tokens preceding the final
#NNNlink for a single reference after 11 consecutive Plane→GH pushes (visible inuserContentEdits). Each round-trip appears to accumulate another anchor.
Impact
- Cross-references between issues become unclickable (404).
- Bodies grow on every round-trip; one issue grew from 2133 bytes to 3461 bytes after a single Plane→GH push, and continued to grow on subsequent pushes.
Ask
Preserve #NNN references as bare #NNN text. GitHub auto-renders these natively.
If conversion to a link is desirable, emit the link once, with the correct <owner>/<repo>/issues/N URL form. Do not emit a companion empty anchor.
Reproduction
- Connect a GitHub repo to a Plane workspace via the official GitHub integration. Set sync to bidirectional.
- Create a GitHub issue whose body references another issue with
#42. Apply thePlanelabel. - Within seconds the Plane work item has stored HTML with the doubled-anchor + wrong-owner-URL pattern shown above.
- To exercise the destructive Plane→GH push, follow the trigger recipe in meta-issue 01. Re-trigger to observe anchor multiplication.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the official GitHub integration and reproduce the GH→Plane→GH round-trip using a body containing #42, then inspect the reference conversion paths on both sync directions. Done means preserving a bare #NNN reference or emitting one correct owner/repository URL without an empty companion anchor or growth across repeated imports.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github, markdown, typescript
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100