Skip to content

Commit

Permalink
remove unused variable
Browse files Browse the repository at this point in the history
  • Loading branch information
badetitou committed Jun 14, 2024
1 parent f6f9481 commit 92effa8
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 39 deletions.
13 changes: 5 additions & 8 deletions src/GitLabHealth-Model-Importer/GLHApi.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ Class {
#superclass : #Object,
#instVars : [
'baseAPIUrl',
'privateToken',
'client'
],
#category : #'GitLabHealth-Model-Importer'
Expand Down Expand Up @@ -45,7 +44,7 @@ GLHApi >> client: anObject [
]

{ #category : #'api - commits' }
GLHApi >> commit: commitSHA ofProject: aProjectId withStat: stats [
GLHApi >> commit: commitSHA ofProject: aProjectId [

self client path: (String streamContents: [ :str |
str
Expand All @@ -55,15 +54,12 @@ GLHApi >> commit: commitSHA ofProject: aProjectId withStat: stats [
<< '/repository/commits/';
<< commitSHA asString;
<< '' ]).


stats ifNotNil: [ self client queryAt: #stats put: stats ].

^ self client get
]

{ #category : #'api - commits' }
GLHApi >> commit: commitSHA ofProject: aProjectId [
GLHApi >> commit: commitSHA ofProject: aProjectId withStat: stats [

self client path: (String streamContents: [ :str |
str
Expand All @@ -73,12 +69,13 @@ GLHApi >> commit: commitSHA ofProject: aProjectId [
<< '/repository/commits/';
<< commitSHA asString;
<< '' ]).


stats ifNotNil: [ self client queryAt: #stats put: stats ].

^ self client get
]



{ #category : #'api - commits' }
GLHApi >> commitDiff: commitSHA ofProject: aProjectId unidiff: unidiff [

Expand Down
62 changes: 31 additions & 31 deletions src/GitLabHealth-Model-Importer/GLHModelImporter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,24 @@ GLHModelImporter >> glhModel: anObject [
glhModel := anObject
]

{ #category : #'private - api' }
GLHModelImporter >> importCommit: aCommitID ofProject: aGLHProject [

| result parsedResult |
(glhModel allWithType: GLHCommit) asOrderedCollection
detect: [ :commit | commit id = aCommitID ]
ifFound: [ :commit | ^ commit ].
result := self glhApi
commit: aCommitID
ofProject: aGLHProject id
withStat: false.
parsedResult := self parseCommitResult: result.
self
addCommits: { parsedResult }
toRepository: aGLHProject repository.
^ parsedResult
]

{ #category : #'as yet unclassified' }
GLHModelImporter >> importCommitOfProject: anProject withId: anID [

Expand Down Expand Up @@ -239,24 +257,6 @@ GLHModelImporter >> importCommitOfProject: anProject withId: anID [
^ commit
]

{ #category : #'private - api' }
GLHModelImporter >> importCommit: aCommitID ofProject: aGLHProject [

| result parsedResult |
(glhModel allWithType: GLHCommit) asOrderedCollection
detect: [ :commit | commit id = aCommitID ]
ifFound: [ :commit | ^ commit ].
result := self glhApi
commit: aCommitID
ofProject: aGLHProject id
withStat: false.
parsedResult := self parseCommitResult: result.
self
addCommits: { parsedResult }
toRepository: aGLHProject repository.
^ parsedResult
]

{ #category : #'private - api' }
GLHModelImporter >> importCommits: aGLHProject [
"limited to the last 20 commits"
Expand Down Expand Up @@ -529,6 +529,19 @@ GLHModelImporter >> importGroup: aGroupID [
^ groupResult
]

{ #category : #api }
GLHModelImporter >> importJobsOf: aPipeline [

| result jobs |
result := self glhApi
jobsOfProject: aPipeline project id
ofPipelines: aPipeline id.
jobs := self parseJobsResult: result ofProject: aPipeline project.
jobs do: [ :job | aPipeline addJob: job ].
self glhModel addAll: jobs

]

{ #category : #commit }
GLHModelImporter >> importParentCommitsOfCommit: aGLHCommit forOnly: number [

Expand Down Expand Up @@ -587,19 +600,6 @@ GLHModelImporter >> importPipelinesOfProject: aGLHProject [
aGLHProject addPipeline: pipeline ]
]

{ #category : #api }
GLHModelImporter >> importJobsOf: aPipeline [

| result jobs |
result := self glhApi
jobsOfProject: aPipeline project id
ofPipelines: aPipeline id.
jobs := self parseJobsResult: result ofProject: aPipeline project.
jobs do: [ :job | aPipeline addJob: job ].
self glhModel addAll: jobs

]

{ #category : #'private - api' }
GLHModelImporter >> importRepository: aGLHRepository [

Expand Down

0 comments on commit 92effa8

Please sign in to comment.