WIP Group contributions in UI
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user