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

refactor: remove GitMetric class and subclasses #47

Merged
merged 2 commits into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
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
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
Loading