WIP Group contributions in UI

This commit is contained in:
2026-07-26 16:04:56 +02:00
parent a7e017971a
commit 3cab203498
9 changed files with 416 additions and 45 deletions
+3 -6
View File
@@ -1,15 +1,12 @@
import { isEmpty } from '@ember/utils';
//
// Derives a stable grouping key for a contribution, so that contributions
// created for the same issue/pull request (one per contributor) can be
// linked together in the UI.
//
// The bot writes the exact same `url` string (the html_url of the issue/PR)
// into every per-contributor IPFS document for a given piece of work, so the
// top-level `url` field on the model is sufficient as a grouping key. Manual
// contributions without a URL return null and are treated as singletons.
//
// Until we have identical IPFS documents for different contributions, we will
// use the URL as grouping key
export default function contributionGroupingKey (contribution) {
let url = contribution ? contribution.url : null;
if (isEmpty(url)) return null;