Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

restore method as before #60

Merged
merged 1 commit into from
Sep 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading