WIP Group contributions by URL

This commit is contained in:
2026-07-26 14:08:02 +02:00
parent 606f5c9383
commit a7e017971a
6 changed files with 218 additions and 4 deletions
+17
View File
@@ -0,0 +1,17 @@
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.
//
export default function contributionGroupingKey (contribution) {
let url = contribution ? contribution.url : null;
if (isEmpty(url)) return null;
return url;
}