Skip to content

Commit

Permalink
Merge pull request #60 from moosetechnology/feature-restore-after-bad…
Browse files Browse the repository at this point in the history
…-merge

restore method as before
  • Loading branch information
alkalinan authored Sep 16, 2024
2 parents 8319ca8 + de542ff commit 78659c8
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions src/GitLabHealth-Model-Importer/GLHModelImporter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Class {
#classVars : [
'currentImporter'
],
#category : 'GitLabHealth-Model-Importer'
#category : #'GitLabHealth-Model-Importer'
}

{ #category : #'as yet unclassified' }
Expand Down Expand Up @@ -563,7 +563,7 @@ GLHModelImporter >> importCommitsOfBranch: aGLHBranch forRefName: refName until:
{ #category : #'as yet unclassified' }
GLHModelImporter >> importContributedProjectsOfUser: aGLHUser [

| newlyFoundElmts page foundElmts remaningProjects|
| newlyFoundElmts page foundElmts remaningProjects |
page := 0.
foundElmts := OrderedCollection new.
newlyFoundElmts := { true }.
Expand All @@ -572,7 +572,7 @@ GLHModelImporter >> importContributedProjectsOfUser: aGLHUser [
page := page + 1.
('import contributed project of user ' , aGLHUser name , ' page '
, page printString) recordInfo.
results := self glhApi
results := self glhApi
contributedProjectsOfUserId: aGLHUser id
orderBy: 'last_activity_at'
simple: true
Expand All @@ -586,10 +586,24 @@ GLHModelImporter >> importContributedProjectsOfUser: aGLHUser [
(self glhModel
addAll: newlyFoundElmts
unless: self blockOnIdEquality) ].
remaningProjects := self importProjects:
((foundElmts collect: #id) difference:
((self userCatalogue atId: aGLHUser id) at:
#contributedProjects)).

aGLHUser contributedProjects
addAll: foundElmts , remaningProjects
unless: self blockOnIdEquality.

self userCatalogue
addUser: aGLHUser
withProjects: (aGLHUser contributedProjects collect: #id).

^ foundElmts
]

{ #category : #'as yet unclassified' }
GLHModelImporter >> importCreatorOfCommit2: aCommit [
GLHModelImporter >> importCreatorOfCommit: aCommit [

aCommit commitCreator ifNil: [
aCommit commitCreator:
Expand All @@ -598,20 +612,6 @@ GLHModelImporter >> importCreatorOfCommit2: aCommit [
^ aCommit commitCreator
]

{ #category : #'as yet unclassified' }
GLHModelImporter >> importCreatorOfCommit: aCommit [

remaningProjects := self importProjects: ((foundElmts collect: #id) difference: ((self userCatalogue atId: aGLHUser id) at: #contributedProjects)).

aGLHUser contributedProjects
addAll: (foundElmts, remaningProjects)
unless: self blockOnIdEquality.

self userCatalogue addUser: aGLHUser withProjects: (aGLHUser contributedProjects collect: #id).

^ foundElmts
]

{ #category : #api }
GLHModelImporter >> importDiffOfCommit: aCommit [

Expand Down

0 comments on commit 78659c8

Please sign in to comment.