Skip to content

Commit

Permalink
Merge pull request #47 from moosetechnology/refactor-remove-gitmetric…
Browse files Browse the repository at this point in the history
…4user

refactor: remove GitMetric class and subclasses
  • Loading branch information
alkalinan authored Sep 3, 2024
2 parents 0495154 + bae5d11 commit 75bc8e5
Show file tree
Hide file tree
Showing 14 changed files with 201 additions and 476 deletions.
4 changes: 2 additions & 2 deletions src/GitLabHealth-Model-Analysis/CodeChurnMetric.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ CodeChurnMetric >> calculate [

| commits res groupedByDate totalContributions gitAnalyzer |
userCommits ifNil: [ self load ].

totalContributions := OrderedCollection new.
groupedByDate := self setupGroupedDate.
gitAnalyzer := GitAnalyzer new maxChildCommit: maxCommitWindow.

commits := user
commits := self
foundSuccessorOf: userCommits
andCompleteImportForMax: maxCommitWindow.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@ CommentContributionMetric >> description [

{ #category : #loading }
CommentContributionMetric >> load [
userCommits := user loadCompleteCommitsSince: (period at: #since) until: (period at: #until).

userCommits := self
loadCompleteCommitsSince: (period at: #since)
until: (period at: #until)
]

{ #category : #accessing }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ DelayUntilFirstChurnMetric >> calculate [
| commits groupedByDate res average |
userCommits ifNil: [ self load ].
groupedByDate := self setupGroupedDate.
commits := user
commits := self
foundSuccessorOf: userCommits
andCompleteImportForMax: maxCommitWindow.


"class commit by dates, filter none user commits"
commits do: [ :commit |
commit commitCreator = user user ifTrue: [
commit commitCreator = user ifTrue: [
| overDate |
overDate := self transformDate: commit created_at to: over.

Expand Down Expand Up @@ -59,7 +59,7 @@ DelayUntilFirstChurnMetric >> calculate [
ifFalse: [
(filtered sum: [ :v | v asDuration asSeconds ])
/ filtered size ] ].

res := res reject: #isNil.

average := res
Expand Down
213 changes: 0 additions & 213 deletions src/GitLabHealth-Model-Analysis/GitMetric.class.st

This file was deleted.

8 changes: 0 additions & 8 deletions src/GitLabHealth-Model-Analysis/GitMetric4Group.class.st

This file was deleted.

8 changes: 0 additions & 8 deletions src/GitLabHealth-Model-Analysis/GitMetric4Project.class.st

This file was deleted.

Loading

0 comments on commit 75bc8e5

Please sign in to comment.