Skip to content

Commit

Permalink
Merge pull request #50 from moosetechnology/feature/projectIntoCatalogue
Browse files Browse the repository at this point in the history
fix fuse:with: to include projectIds
  • Loading branch information
alkalinan authored Sep 5, 2024
2 parents 276b2bf + 59fb681 commit a41e8af
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ GLHUserCatalogueV2Test >> testExportAndLoad [

catalogue addUser: user.
json := catalogue exportToJson.

res := GLHUserCatalogueV2 loadFromJson: json.

self assert: res size equals: catalogue size.
self assert: ((res at: 'test user' at: #contributedProjects) includes: 11) equals: true.
self assert: ((res at: 'test user' at: #names) includes: 'test user') equals: true.
Expand Down
3 changes: 2 additions & 1 deletion src/GitLabHealth-Model-Analysis/GLHUserCatalogueV2.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -259,14 +259,15 @@ GLHUserCatalogueV2 >> exportToJson [
(#id -> user id) } asDictionary;
yourself ].

^ STONJSON toString: tempDic
^ STONJSON toStringPretty: tempDic
]

{ #category : #fuse }
GLHUserCatalogueV2 >> fuse: mainUser with: subUser [
self at: mainUser ifPresent: [ :entry |
self at: subUser ifAbsent: [ ^ self ].
(entry at: #names) addAll: (self at: subUser at: #names ).
(entry at: #contributedProjects) addAll: (self at: subUser at: #contributedProjects ).
self removeKey: subUser.
].
]
Expand Down

0 comments on commit a41e8af

Please sign in to comment.