diff --git a/src/GitLabHealth-Model-Analysis/AnalysisReport.class.st b/src/GitLabHealth-Model-Analysis/AnalysisReport.class.st index 2ec4938..210996f 100644 --- a/src/GitLabHealth-Model-Analysis/AnalysisReport.class.st +++ b/src/GitLabHealth-Model-Analysis/AnalysisReport.class.st @@ -6,7 +6,7 @@ Class { 'over', 'metrics' ], - #category : 'GitLabHealth-Model-Analysis' + #category : #'GitLabHealth-Model-Analysis' } { #category : #initialization } diff --git a/src/GitLabHealth-Model-Analysis/ClosedMergeRequestMetric.class.st b/src/GitLabHealth-Model-Analysis/ClosedMergeRequestMetric.class.st index 86add80..56fd116 100644 --- a/src/GitLabHealth-Model-Analysis/ClosedMergeRequestMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/ClosedMergeRequestMetric.class.st @@ -1,7 +1,7 @@ Class { #name : #ClosedMergeRequestMetric, #superclass : #UserMergeRequestMetric, - #category : 'GitLabHealth-Model-Analysis' + #category : #'GitLabHealth-Model-Analysis' } { #category : #calculating } diff --git a/src/GitLabHealth-Model-Analysis/ClosedTicketsMetric.class.st b/src/GitLabHealth-Model-Analysis/ClosedTicketsMetric.class.st index 885f814..a368fd8 100644 --- a/src/GitLabHealth-Model-Analysis/ClosedTicketsMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/ClosedTicketsMetric.class.st @@ -1,7 +1,7 @@ Class { #name : #ClosedTicketsMetric, #superclass : #UserJiraMetric, - #category : 'GitLabHealth-Model-Analysis' + #category : #'GitLabHealth-Model-Analysis' } { #category : #calculating } diff --git a/src/GitLabHealth-Model-Analysis/CodeAdditionByMRMetric.class.st b/src/GitLabHealth-Model-Analysis/CodeAdditionByMRMetric.class.st index 3e0c4b3..c6d5e94 100644 --- a/src/GitLabHealth-Model-Analysis/CodeAdditionByMRMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/CodeAdditionByMRMetric.class.st @@ -1,7 +1,7 @@ Class { #name : #CodeAdditionByMRMetric, #superclass : #UserMergeRequestMetric, - #category : 'GitLabHealth-Model-Analysis' + #category : #'GitLabHealth-Model-Analysis' } { #category : #calculating } diff --git a/src/GitLabHealth-Model-Analysis/CodeAdditionByTicketMetric.class.st b/src/GitLabHealth-Model-Analysis/CodeAdditionByTicketMetric.class.st index 210463e..3109cc7 100644 --- a/src/GitLabHealth-Model-Analysis/CodeAdditionByTicketMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/CodeAdditionByTicketMetric.class.st @@ -1,7 +1,7 @@ Class { #name : #CodeAdditionByTicketMetric, #superclass : #UserJiraMetric, - #category : 'GitLabHealth-Model-Analysis' + #category : #'GitLabHealth-Model-Analysis' } { #category : #calculating } diff --git a/src/GitLabHealth-Model-Analysis/CodeAdditionMetric.class.st b/src/GitLabHealth-Model-Analysis/CodeAdditionMetric.class.st index 064ab99..bd0acbf 100644 --- a/src/GitLabHealth-Model-Analysis/CodeAdditionMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/CodeAdditionMetric.class.st @@ -1,7 +1,7 @@ Class { #name : #CodeAdditionMetric, #superclass : #UserCommitsMetric, - #category : 'GitLabHealth-Model-Analysis' + #category : #'GitLabHealth-Model-Analysis' } { #category : #calculating } diff --git a/src/GitLabHealth-Model-Analysis/CodeChurnMetric.class.st b/src/GitLabHealth-Model-Analysis/CodeChurnMetric.class.st index 46eaff6..a34aff2 100644 --- a/src/GitLabHealth-Model-Analysis/CodeChurnMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/CodeChurnMetric.class.st @@ -4,7 +4,7 @@ Class { #instVars : [ 'maxCommitWindow' ], - #category : 'GitLabHealth-Model-Analysis' + #category : #'GitLabHealth-Model-Analysis' } { #category : #calculating } diff --git a/src/GitLabHealth-Model-Analysis/CodeDeletionByMRMetric.class.st b/src/GitLabHealth-Model-Analysis/CodeDeletionByMRMetric.class.st index abb278a..9797a54 100644 --- a/src/GitLabHealth-Model-Analysis/CodeDeletionByMRMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/CodeDeletionByMRMetric.class.st @@ -1,7 +1,7 @@ Class { #name : #CodeDeletionByMRMetric, #superclass : #UserMergeRequestMetric, - #category : 'GitLabHealth-Model-Analysis' + #category : #'GitLabHealth-Model-Analysis' } { #category : #calculating } diff --git a/src/GitLabHealth-Model-Analysis/CodeDeletionByTicketMetric.class.st b/src/GitLabHealth-Model-Analysis/CodeDeletionByTicketMetric.class.st index 9cdf88b..66e71b0 100644 --- a/src/GitLabHealth-Model-Analysis/CodeDeletionByTicketMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/CodeDeletionByTicketMetric.class.st @@ -1,7 +1,7 @@ Class { #name : #CodeDeletionByTicketMetric, #superclass : #UserJiraMetric, - #category : 'GitLabHealth-Model-Analysis' + #category : #'GitLabHealth-Model-Analysis' } { #category : #calculating } diff --git a/src/GitLabHealth-Model-Analysis/CodeDeletionMetric.class.st b/src/GitLabHealth-Model-Analysis/CodeDeletionMetric.class.st index 0d08a68..e6f465c 100644 --- a/src/GitLabHealth-Model-Analysis/CodeDeletionMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/CodeDeletionMetric.class.st @@ -1,7 +1,7 @@ Class { #name : #CodeDeletionMetric, #superclass : #UserCommitsMetric, - #category : 'GitLabHealth-Model-Analysis' + #category : #'GitLabHealth-Model-Analysis' } { #category : #calculating } diff --git a/src/GitLabHealth-Model-Analysis/CommentContributionMetric.class.st b/src/GitLabHealth-Model-Analysis/CommentContributionMetric.class.st index 149bf55..5872abd 100644 --- a/src/GitLabHealth-Model-Analysis/CommentContributionMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/CommentContributionMetric.class.st @@ -1,7 +1,7 @@ Class { #name : #CommentContributionMetric, #superclass : #UserCommitsMetric, - #category : 'GitLabHealth-Model-Analysis' + #category : #'GitLabHealth-Model-Analysis' } { #category : #calculating } diff --git a/src/GitLabHealth-Model-Analysis/CommitFrequencyMetric.class.st b/src/GitLabHealth-Model-Analysis/CommitFrequencyMetric.class.st index 1994ead..10c7d36 100644 --- a/src/GitLabHealth-Model-Analysis/CommitFrequencyMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/CommitFrequencyMetric.class.st @@ -1,7 +1,7 @@ Class { #name : #CommitFrequencyMetric, #superclass : #UserCommitsMetric, - #category : 'GitLabHealth-Model-Analysis' + #category : #'GitLabHealth-Model-Analysis' } { #category : #calculating } diff --git a/src/GitLabHealth-Model-Analysis/CommitsNumberByJiraTicketsMetric.class.st b/src/GitLabHealth-Model-Analysis/CommitsNumberByJiraTicketsMetric.class.st index 3307e5d..9114c13 100644 --- a/src/GitLabHealth-Model-Analysis/CommitsNumberByJiraTicketsMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/CommitsNumberByJiraTicketsMetric.class.st @@ -1,7 +1,7 @@ Class { #name : #CommitsNumberByJiraTicketsMetric, #superclass : #UserJiraMetric, - #category : 'GitLabHealth-Model-Analysis' + #category : #'GitLabHealth-Model-Analysis' } { #category : #calculating } diff --git a/src/GitLabHealth-Model-Analysis/ContributedProjectMetric.class.st b/src/GitLabHealth-Model-Analysis/ContributedProjectMetric.class.st index 8663cad..8cc89bc 100644 --- a/src/GitLabHealth-Model-Analysis/ContributedProjectMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/ContributedProjectMetric.class.st @@ -1,7 +1,7 @@ Class { #name : #ContributedProjectMetric, #superclass : #UserCommitsMetric, - #category : 'GitLabHealth-Model-Analysis' + #category : #'GitLabHealth-Model-Analysis' } { #category : #calculating } diff --git a/src/GitLabHealth-Model-Analysis/DelayUntilFirstChurnMetric.class.st b/src/GitLabHealth-Model-Analysis/DelayUntilFirstChurnMetric.class.st index 29e14ac..f6b0f08 100644 --- a/src/GitLabHealth-Model-Analysis/DelayUntilFirstChurnMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/DelayUntilFirstChurnMetric.class.st @@ -4,7 +4,7 @@ Class { #instVars : [ 'maxCommitWindow' ], - #category : 'GitLabHealth-Model-Analysis' + #category : #'GitLabHealth-Model-Analysis' } { #category : #calculating } diff --git a/src/GitLabHealth-Model-Analysis/GLHUserCatalogue.class.st b/src/GitLabHealth-Model-Analysis/GLHUserCatalogue.class.st index 9db688e..808bbd6 100644 --- a/src/GitLabHealth-Model-Analysis/GLHUserCatalogue.class.st +++ b/src/GitLabHealth-Model-Analysis/GLHUserCatalogue.class.st @@ -5,7 +5,7 @@ Class { 'users', 'anImporter' ], - #category : 'GitLabHealth-Model-Analysis' + #category : #'GitLabHealth-Model-Analysis' } { #category : #import } diff --git a/src/GitLabHealth-Model-Analysis/GLHUserCatalogueItem.class.st b/src/GitLabHealth-Model-Analysis/GLHUserCatalogueItem.class.st index 5489928..108c1d6 100644 --- a/src/GitLabHealth-Model-Analysis/GLHUserCatalogueItem.class.st +++ b/src/GitLabHealth-Model-Analysis/GLHUserCatalogueItem.class.st @@ -5,7 +5,7 @@ Class { 'user', 'names' ], - #category : 'GitLabHealth-Model-Analysis' + #category : #'GitLabHealth-Model-Analysis' } { #category : #initialization } diff --git a/src/GitLabHealth-Model-Analysis/GLHUserCatalogueV2.class.st b/src/GitLabHealth-Model-Analysis/GLHUserCatalogueV2.class.st index 856c61d..7376d60 100644 --- a/src/GitLabHealth-Model-Analysis/GLHUserCatalogueV2.class.st +++ b/src/GitLabHealth-Model-Analysis/GLHUserCatalogueV2.class.st @@ -1,7 +1,7 @@ Class { #name : #GLHUserCatalogueV2, #superclass : #GLHUserCatalogue, - #category : 'GitLabHealth-Model-Analysis' + #category : #'GitLabHealth-Model-Analysis' } { #category : #import } diff --git a/src/GitLabHealth-Model-Analysis/GitAnalyzer.class.st b/src/GitLabHealth-Model-Analysis/GitAnalyzer.class.st index be075cb..dac8652 100644 --- a/src/GitLabHealth-Model-Analysis/GitAnalyzer.class.st +++ b/src/GitLabHealth-Model-Analysis/GitAnalyzer.class.st @@ -8,7 +8,7 @@ Class { 'onProject', 'maxChildCommits' ], - #category : 'GitLabHealth-Model-Analysis' + #category : #'GitLabHealth-Model-Analysis' } { #category : #analyze } diff --git a/src/GitLabHealth-Model-Analysis/JiraTimeMRTimeDifferenceMetric.class.st b/src/GitLabHealth-Model-Analysis/JiraTimeMRTimeDifferenceMetric.class.st index 8e2b064..6a969f3 100644 --- a/src/GitLabHealth-Model-Analysis/JiraTimeMRTimeDifferenceMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/JiraTimeMRTimeDifferenceMetric.class.st @@ -1,7 +1,7 @@ Class { #name : #JiraTimeMRTimeDifferenceMetric, #superclass : #UserJiraMetric, - #category : 'GitLabHealth-Model-Analysis' + #category : #'GitLabHealth-Model-Analysis' } { #category : #calculating } diff --git a/src/GitLabHealth-Model-Analysis/MergeRequestDurationMetric.class.st b/src/GitLabHealth-Model-Analysis/MergeRequestDurationMetric.class.st index 8b49bc6..609b404 100644 --- a/src/GitLabHealth-Model-Analysis/MergeRequestDurationMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/MergeRequestDurationMetric.class.st @@ -1,7 +1,7 @@ Class { #name : #MergeRequestDurationMetric, #superclass : #UserMergeRequestMetric, - #category : 'GitLabHealth-Model-Analysis' + #category : #'GitLabHealth-Model-Analysis' } { #category : #calculating } diff --git a/src/GitLabHealth-Model-Analysis/OpenedMergeRequestMetric.class.st b/src/GitLabHealth-Model-Analysis/OpenedMergeRequestMetric.class.st index 6e349b4..2e1c4b2 100644 --- a/src/GitLabHealth-Model-Analysis/OpenedMergeRequestMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/OpenedMergeRequestMetric.class.st @@ -1,7 +1,7 @@ Class { #name : #OpenedMergeRequestMetric, #superclass : #UserMergeRequestMetric, - #category : 'GitLabHealth-Model-Analysis' + #category : #'GitLabHealth-Model-Analysis' } { #category : #calculating } diff --git a/src/GitLabHealth-Model-Analysis/PendingMergeRequestMetric.class.st b/src/GitLabHealth-Model-Analysis/PendingMergeRequestMetric.class.st index 946d807..185e7c5 100644 --- a/src/GitLabHealth-Model-Analysis/PendingMergeRequestMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/PendingMergeRequestMetric.class.st @@ -1,7 +1,7 @@ Class { #name : #PendingMergeRequestMetric, #superclass : #UserMergeRequestMetric, - #category : 'GitLabHealth-Model-Analysis' + #category : #'GitLabHealth-Model-Analysis' } { #category : #calculating } diff --git a/src/GitLabHealth-Model-Analysis/ProjectAnalysisReport.class.st b/src/GitLabHealth-Model-Analysis/ProjectAnalysisReport.class.st index a72b67c..f9990bd 100644 --- a/src/GitLabHealth-Model-Analysis/ProjectAnalysisReport.class.st +++ b/src/GitLabHealth-Model-Analysis/ProjectAnalysisReport.class.st @@ -4,7 +4,7 @@ Class { #instVars : [ 'projectName' ], - #category : 'GitLabHealth-Model-Analysis' + #category : #'GitLabHealth-Model-Analysis' } { #category : #accessing } diff --git a/src/GitLabHealth-Model-Analysis/ReviewedByUserMergeRequestMetric.class.st b/src/GitLabHealth-Model-Analysis/ReviewedByUserMergeRequestMetric.class.st index 0ca0e40..ca408fe 100644 --- a/src/GitLabHealth-Model-Analysis/ReviewedByUserMergeRequestMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/ReviewedByUserMergeRequestMetric.class.st @@ -1,7 +1,7 @@ Class { #name : #ReviewedByUserMergeRequestMetric, #superclass : #UserMergeRequestMetric, - #category : 'GitLabHealth-Model-Analysis' + #category : #'GitLabHealth-Model-Analysis' } { #category : #calculating } diff --git a/src/GitLabHealth-Model-Analysis/SelfMergedUnderAMinuteMergeRequestMetric.class.st b/src/GitLabHealth-Model-Analysis/SelfMergedUnderAMinuteMergeRequestMetric.class.st index 5c38042..cf25445 100644 --- a/src/GitLabHealth-Model-Analysis/SelfMergedUnderAMinuteMergeRequestMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/SelfMergedUnderAMinuteMergeRequestMetric.class.st @@ -1,7 +1,7 @@ Class { #name : #SelfMergedUnderAMinuteMergeRequestMetric, #superclass : #UserMergeRequestMetric, - #category : 'GitLabHealth-Model-Analysis' + #category : #'GitLabHealth-Model-Analysis' } { #category : #calculating } diff --git a/src/GitLabHealth-Model-Analysis/TimeBetweenCommitMetric.class.st b/src/GitLabHealth-Model-Analysis/TimeBetweenCommitMetric.class.st index 8b39d2e..5af9688 100644 --- a/src/GitLabHealth-Model-Analysis/TimeBetweenCommitMetric.class.st +++ b/src/GitLabHealth-Model-Analysis/TimeBetweenCommitMetric.class.st @@ -1,7 +1,7 @@ Class { #name : #TimeBetweenCommitMetric, #superclass : #UserCommitsMetric, - #category : 'GitLabHealth-Model-Analysis' + #category : #'GitLabHealth-Model-Analysis' } { #category : #calculating } diff --git a/src/GitLabHealth-Model-Analysis/UserAnalysisReport.class.st b/src/GitLabHealth-Model-Analysis/UserAnalysisReport.class.st index 1972bfa..5288793 100644 --- a/src/GitLabHealth-Model-Analysis/UserAnalysisReport.class.st +++ b/src/GitLabHealth-Model-Analysis/UserAnalysisReport.class.st @@ -5,7 +5,7 @@ Class { 'username', 'email' ], - #category : 'GitLabHealth-Model-Analysis' + #category : #'GitLabHealth-Model-Analysis' } { #category : #accessing } diff --git a/src/GitLabHealth-Model-Importer/GLHApiFile.class.st b/src/GitLabHealth-Model-Importer/GLHApiFile.class.st index 2c0531f..cd9a0a0 100644 --- a/src/GitLabHealth-Model-Importer/GLHApiFile.class.st +++ b/src/GitLabHealth-Model-Importer/GLHApiFile.class.st @@ -5,7 +5,7 @@ Class { 'name', 'type' ], - #category : 'GitLabHealth-Model-Importer' + #category : #'GitLabHealth-Model-Importer' } { #category : #accessing } diff --git a/src/GitLabHealth-Model-Importer/GLHModelImporter.class.st b/src/GitLabHealth-Model-Importer/GLHModelImporter.class.st index 89e1bf4..cd54fa6 100644 --- a/src/GitLabHealth-Model-Importer/GLHModelImporter.class.st +++ b/src/GitLabHealth-Model-Importer/GLHModelImporter.class.st @@ -424,7 +424,7 @@ GLHModelImporter >> importCommitsOfProject: aProject since: fromDate until: toDa { #category : #'import -projects' } GLHModelImporter >> importContributedProjectsOfUser: aGLHUser [ - | remaningProjects params results projects | + | remaningProjects params results projects projectsIds | params := { (#order_by -> 'last_activity_at'). (#simple -> 'true') } asDictionary. @@ -432,12 +432,10 @@ GLHModelImporter >> importContributedProjectsOfUser: aGLHUser [ contributedProjectsOfUser: aGLHUser id withParams: params. - projects := (results collect: [ :projectsJson | - self parseArrayOfProject: projectsJson ]) flattened. - projects := self glhModel - addAll: projects - unless: self blockOnIdEquality. - + projectsIds := (results collect: [ :projectsJson | + (NeoJSONReader fromString: projectsJson) collect: [:projectJson | projectJson at: #id ] ]) flattened. + + projects := self importProjects: projectsIds. remaningProjects := self importProjects: ((projects collect: #id) difference: ((self userCatalogue atId: aGLHUser id) at: diff --git a/src/GitLabProjectHealth-Model-Importer/GLPHModelImporter.class.st b/src/GitLabProjectHealth-Model-Importer/GLPHModelImporter.class.st index 07a27c6..b2935f6 100644 --- a/src/GitLabProjectHealth-Model-Importer/GLPHModelImporter.class.st +++ b/src/GitLabProjectHealth-Model-Importer/GLPHModelImporter.class.st @@ -335,6 +335,10 @@ GLPHModelImporter >> importProject: aProjectID [ | result projectResult | ('Import project with id: ' , aProjectID printString) recordInfo. + (glhModel allWithType: GLHProject) + detect: [ :project | project id = aProjectID ] + ifOne: [ :project | ^ project ]. + result := self repoApi projects get: aProjectID. projectResult := self parseProjectResult: result.