Skip to content

fix(github): remove duplicate PR titles in stack comments#21

Open
laz-canva wants to merge 1 commit intodmmulroy:mainfrom
laz-canva:fix-duplicate-pr-titles
Open

fix(github): remove duplicate PR titles in stack comments#21
laz-canva wants to merge 1 commit intodmmulroy:mainfrom
laz-canva:fix-duplicate-pr-titles

Conversation

@laz-canva
Copy link
Copy Markdown

@laz-canva laz-canva commented Feb 21, 2026

Summary

Fixes duplicate PR titles appearing in GitHub stack comments by removing the explicit title from the markdown source and relying on GitHub's automatic #N expansion.

Problem

When ryu posted stack visualization comments on GitHub PRs, it included both the PR title and the PR number (e.g., feat: add auth #123). GitHub automatically expands #123 references to include the PR title, resulting in duplicate titles: feat: add auth feat: add auth #123.

Solution

Remove the explicit PR title from GitHub comments and use only #N. GitHub's auto-expansion will show the title once with rich previews (hover cards, status badges, etc.).

Before:

* **feat: add auth #123 👈**

After:

* **#123 👈**

GitHub renders this with the full title via auto-expansion, eliminating duplication.

Changes

  • Updated GitHub formatting logic in src/submit/execute.rs to only show #N
  • Updated tests to verify PR titles are not in the markdown source
  • GitLab formatting is unaffected (still uses explicit [title !N](url) format)

Testing

  • ✅ All 76 unit tests pass
  • ✅ All 54 integration tests pass
  • ✅ Stack comments now render without duplication

Breaking Change

This changes the comment format, but it's a bug fix - the old behavior caused duplication.

GitHub automatically expands #123 references to include the PR title
with rich previews (hover cards, status badges, etc.). Previously, ryu
was explicitly including both the PR title AND #N, resulting in
duplicate titles appearing in comments.

Changes:
- Updated GitHub formatting to only show "#N" instead of "title #N"
- GitHub's auto-expansion will show the title once with rich previews
- Updated tests to verify PR titles are not in the markdown source
- Renamed test to clarify it checks for no duplicate title

This is a breaking change in comment format, but it's a bug fix -
the old behavior caused duplication. GitLab formatting is unaffected.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@laz-canva laz-canva force-pushed the fix-duplicate-pr-titles branch from f7f7fe0 to 9d177d4 Compare March 4, 2026 06:30
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