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
+9
View File
@@ -2,6 +2,8 @@ import EmberObject, { computed } from '@ember/object';
import { isEmpty, isPresent } from '@ember/utils';
import moment from 'moment';
import contributionGroupingKey from 'kredits-web/utils/contribution-grouping-key';
export default EmberObject.extend({
// Contract
id: null,
@@ -44,6 +46,13 @@ export default EmberObject.extend({
return isPresent(this.pendingTx);
}),
// Stable key shared by all per-contributor contributions created for the
// same issue/pull request (derived from `url`). Manual contributions without
// a URL return null and are treated as singletons (not grouped).
groupId: computed('url', function() {
return contributionGroupingKey(this);
}),
serialize () {
return JSON.stringify(this);
}