Skip to content

fix: don't duplicate issue cross-references on edit - #38881

Draft
silverwind wants to merge 1 commit into
go-gitea:mainfrom
silverwind:xref-no-dup
Draft

fix: don't duplicate issue cross-references on edit#38881
silverwind wants to merge 1 commit into
go-gitea:mainfrom
silverwind:xref-no-dup

Conversation

@silverwind

@silverwind silverwind commented Aug 11, 2026

Copy link
Copy Markdown
Member

Don't duplicate issue cross-references when editing a comment. It dedupes per-comment, GitHub dedupes per-issue which would be a much bigger rewrite that I will leave for later.

Editing a mention added a second timeline entry on the referenced issue,
because the lookup skipped neutered rows and the match compared the
reference action. Removing and re-adding a mention, or changing
"closes #1" to a plain "#1", left the old row behind and inserted a new
one. Match on the target issue alone and write the new action to the row
that already exists, so one entry survives every edit, as on GitHub.

Assisted-by: Claude Code:claude-opus-5
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Aug 11, 2026
@silverwind

Copy link
Copy Markdown
Member Author

Maybe it's better to go for per-issue dedup. Initial investigation shows that it may require a migration, that's why I put it off.

@silverwind
silverwind marked this pull request as draft August 12, 2026 08:56
@silverwind silverwind changed the title fix: don't duplicate issue references on edit fix: don't duplicate issue cross-references on edit Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. type/bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants