feature: group the Forgejo issue-link confirmation comment per issue instead of per linked spec #35
Labels
No labels
breaking
bug
ci
dependencies
documentation
feature
security
skip-changelog
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
thierryade/backend#35
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Today
apps.specs.tasks.sync_confirmation_commentposts/edits one confirmation comment perSpecVersionIssueLink(the comment id is tracked viaSpecVersionIssueLink.confirmation_comment_id). When a single Forgejo issue is linked to several specs, this spams the issue with one "🔗 Spec liée" comment per spec instead of a single grouped one.Fix:
ForgejoIssueCommentmodel tracking one comment id per(repo_full_name, issue_number)pair, replacing the per-linkconfirmation_comment_idfield.sync_confirmation_comment(repo_full_name, issue_number)to gather every link for that issue and build a single grouped "🔗 Specs liées" comment body, edited in place on later syncs.SpecViewSet.create_issue,SpecVersionIssueLinkViewSet.perform_create,ForgejoIssueWebhookView.post,poll_stale_issue_links) accordingly, deduping to one task dispatch per(repo, issue)pair where several links can share one issue in the same sync.