From f0997ec776138ad4c95bf014b55c673ce4f778da Mon Sep 17 00:00:00 2001 From: Benoit Verhaeghe Date: Mon, 19 Oct 2026 16:53:17 +0200 Subject: [PATCH 1/4] add mixed importer api --- src/GitProjectHealth-Model-Importer/GitModelImporter.class.st | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/GitProjectHealth-Model-Importer/GitModelImporter.class.st b/src/GitProjectHealth-Model-Importer/GitModelImporter.class.st index 5793eb81..3add001f 100644 --- a/src/GitProjectHealth-Model-Importer/GitModelImporter.class.st +++ b/src/GitProjectHealth-Model-Importer/GitModelImporter.class.st @@ -659,6 +659,8 @@ GitModelImporter >> importProject: id [ { #category : #'import - projects' } GitModelImporter >> importProject: aProjectID ofGroup: aGroup [ + + ^ self apiImporter importProject: aProjectID ofGroup: aGroup ] { #category : #'import - projects' } From df28b956c009875d454d5c668f66928ebf876d44 Mon Sep 17 00:00:00 2001 From: Benoit Verhaeghe Date: Mon, 19 Oct 2026 17:08:02 +0200 Subject: [PATCH 2/4] check way to clone in P13 different from P12 --- .../GitLocalModelImporter.class.st | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/GitProjectHealth-Model-LocalImporter/GitLocalModelImporter.class.st b/src/GitProjectHealth-Model-LocalImporter/GitLocalModelImporter.class.st index af692ada..1eb09e48 100644 --- a/src/GitProjectHealth-Model-LocalImporter/GitLocalModelImporter.class.st +++ b/src/GitProjectHealth-Model-LocalImporter/GitLocalModelImporter.class.st @@ -438,9 +438,15 @@ GitLocalModelImporter >> tryClone: aGLHProject [ clonePath ensureCreateDirectory. gitUrl := url , '.git'. repo := LGitRepository on: clonePath. - cloneOptions := repo cloneOptionsStructureClass - withCredentialsProvider: - (IceCredentialsProvider defaultForRemoteUrl: url). + + cloneOptions := SystemVersion current major < 12 + ifTrue: [ + repo cloneOptionsStructureClass + withCredentialsProvider: + (IceCredentialsProvider defaultForRemoteUrl: url) ] + ifFalse: [ + LGitCloneOptions withCredentialsProvider: + (IceCredentialsProvider defaultForRemoteUrl: url) ]. repo clone: gitUrl options: cloneOptions. self fetchMRRemotes: repo. ^ clonePath From c935f0d4c1fe2ca22600d893b7de404855aad56c Mon Sep 17 00:00:00 2001 From: Benoit Verhaeghe Date: Wed, 21 Oct 2026 16:21:31 +0200 Subject: [PATCH 3/4] fix block check --- src/GitHubHealth-Model-Importer/GithubModelImporter.class.st | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/GitHubHealth-Model-Importer/GithubModelImporter.class.st b/src/GitHubHealth-Model-Importer/GithubModelImporter.class.st index b53efd6e..52b9e29a 100644 --- a/src/GitHubHealth-Model-Importer/GithubModelImporter.class.st +++ b/src/GitHubHealth-Model-Importer/GithubModelImporter.class.st @@ -534,10 +534,10 @@ GithubModelImporter >> importDiffOfCommit: aGLHCommit [ diffs := aGLHCommit diffs addAll: diffs - unless: self blockForDiffRangeEquality. + unless: self blockForDiffEquality. glhModel addAll: diffs - unless: self blockForDiffRangeEquality. + unless: self blockForDiffEquality. ^ aGLHCommit diffs ] From 43a583e47b35999a8aa985c8f657b9b4ebcdee5b Mon Sep 17 00:00:00 2001 From: Benoit Verhaeghe Date: Wed, 21 Oct 2026 16:39:21 +0200 Subject: [PATCH 4/4] add the import redirection --- .../GitModelMixedImporter.class.st | 103 ++++++++++++++++++ 1 file changed, 103 insertions(+) diff --git a/src/GitProjectHealth-Model-MixedImporter/GitModelMixedImporter.class.st b/src/GitProjectHealth-Model-MixedImporter/GitModelMixedImporter.class.st index d9b90b52..762a703e 100644 --- a/src/GitProjectHealth-Model-MixedImporter/GitModelMixedImporter.class.st +++ b/src/GitProjectHealth-Model-MixedImporter/GitModelMixedImporter.class.st @@ -29,6 +29,18 @@ GitModelMixedImporter >> glhModel: anObject [ self localImporter ifNotNil: [ :importer | importer glhModel: anObject ] ] +{ #category : #'import - pipelines' } +GitModelMixedImporter >> importAllPipelinesOfProject: aGLHProject [ + + ^ self apiImporter importAllPipelinesOfProject: aGLHProject +] + +{ #category : #'import - commits' } +GitModelMixedImporter >> importAndLoadLatestsCommitsOfProject: aGLHProject [ + + ^ self localImporter importAndLoadLatestsCommitsOfProject: aGLHProject +] + { #category : #'import - branches' } GitModelMixedImporter >> importBranchesOfProject: aGLHProject [ @@ -51,6 +63,12 @@ GitModelMixedImporter >> importCommit: aCommitID ofProject: aGLHProject [ self apiImporter importCommit: aCommitID ofProject: aGLHProject ] ] +{ #category : #'import - commits' } +GitModelMixedImporter >> importCommitsOfBranch: aGLHBranch [ + + ^ self localImporter importCommitsOfBranch: aGLHBranch +] + { #category : #'import - commits' } GitModelMixedImporter >> importCommitsOfProject: aGLHProject since: since until: until [ @@ -65,12 +83,54 @@ GitModelMixedImporter >> importDiffOfCommit: aCommit [ do: [ self apiImporter importDiffOfCommit: aCommit ] ] +{ #category : #'import - files' } +GitModelMixedImporter >> importFilesOfBranch: aGLHBranch [ + + ^ self localImporter importFilesOfBranch: aGLHBranch +] + +{ #category : #'import - groups' } +GitModelMixedImporter >> importGroup: aGroupID [ + + ^ self apiImporter importGroup: aGroupID +] + +{ #category : #'import - issues' } +GitModelMixedImporter >> importIssuesOfProject: aGLHProject [ + + ^ self apiImporter importIssuesOfProject: aGLHProject +] + +{ #category : #'import - jobs' } +GitModelMixedImporter >> importJobsOfPipeline: aGLHPipeline [ + + ^ self apiImporter importJobsOfPipeline: aGLHPipeline +] + +{ #category : #'import - commits' } +GitModelMixedImporter >> importLatestCommitsOfProject: aGLHProject [ + + ^ self localImporter importLatestCommitsOfProject: aGLHProject +] + +{ #category : #'import - merge-requests' } +GitModelMixedImporter >> importLatestMergeRequestsOfProject: aGLHProject [ + + ^ self apiImporter importLatestMergeRequestsOfProject: aGLHProject +] + { #category : #'import - pipelines' } GitModelMixedImporter >> importLatestPipelinesOfProject: aGLHProject [ ^ self apiImporter importLatestPipelinesOfProject: aGLHProject ] +{ #category : #'import - releases' } +GitModelMixedImporter >> importLatestReleaseOfProject: aGLHProject [ + + ^ self apiImporter importLatestReleaseOfProject: aGLHProject +] + { #category : #'import - merge-requests' } GitModelMixedImporter >> importMergeRequestCommits: mergeRequest [ @@ -83,24 +143,67 @@ GitModelMixedImporter >> importMergeRequestMergeCommits: aGLHMergeRequest [ ^ self apiImporter importMergeRequestMergeCommits: aGLHMergeRequest ] +{ #category : #'import - merge-requests' } +GitModelMixedImporter >> importMergeRequestsOfProject: aGLHProject [ + + ^ self apiImporter importMergeRequestsOfProject: aGLHProject +] + { #category : #'import - merge-requests' } GitModelMixedImporter >> importMergeRequestsOfProject: aGLHProject since: fromDate until: toDate [ ^ self apiImporter importMergeRequestsOfProject: aGLHProject since: fromDate until: toDate ] +{ #category : #'import - milestones' } +GitModelMixedImporter >> importMilestonesOfProject: aGLHProject [ + + ^ self apiImporter importMilestonesOfProject: aGLHProject +] + { #category : #'import - notes' } GitModelMixedImporter >> importNotesOfMergeRequest: mergeRequest [ ^ self apiImporter importNotesOfMergeRequest: mergeRequest ] +{ #category : #'import - pipelines' } +GitModelMixedImporter >> importPipeline: aPipelineId OfProject: aGLHProject [ + + ^ self apiImporter importPipeline: aPipelineId OfProject: aGLHProject + +] + +{ #category : #'import - merge-requests' } +GitModelMixedImporter >> importPipelinesOfProject: aGLHProject [ + + ^ self apiImporter importPipelinesOfProject: aGLHProject +] + { #category : #'import - projects' } GitModelMixedImporter >> importProject: id [ ^ self apiImporter importProject: id ] +{ #category : #'import - projects' } +GitModelMixedImporter >> importProjectsOfUser: aGLHUser [ + + ^ self apiImporter importProjectsOfUser: aGLHUser +] + +{ #category : #'import - releases' } +GitModelMixedImporter >> importRelease: aReleaseID ofProject: aGLHProject [ + + ^ self apiImporter importRelease: aReleaseID ofProject: aGLHProject +] + +{ #category : #'import - repositories' } +GitModelMixedImporter >> importRepository: aGLHRepository [ + + ^ self localImporter importRepository: aGLHRepository +] + { #category : #'import - tags' } GitModelMixedImporter >> importTagsForProject: aGLHProject [