• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

moosetechnology / GitProjectHealth / 13966424968

20 Mar 2025 09:50AM UTC coverage: 69.853% (-0.6%) from 70.404%
13966424968

Pull #157

github

web-flow
Merge 4f2bf4dc7 into 0366375be
Pull Request #157: new Note entity

1164 of 2048 new or added lines in 18 files covered. (56.84%)

2 existing lines in 1 file now uncovered.

14030 of 20085 relevant lines covered (69.85%)

0.7 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

90.0
/src/GitLabHealth-Model-Analysis/CreatedNotesByACRByProjectMetric.class.st
1
Class {
2
        #name : #CreatedNotesByACRByProjectMetric,
3
        #superclass : #ProjectMetric,
4
        #category : #'GitLabHealth-Model-Analysis'
5
}
6

7
{ #category : #'as yet unclassified' }
8
CreatedNotesByACRByProjectMetric >> calculate [
1✔
9
    | notes acrnotes regex |
1✔
10

1✔
11
    projectMergeRequests ifNil: [ self load ].
1✔
12

1✔
13
    "Import all notes from project merge request"
1✔
14
    notes := projectMergeRequests 
1✔
15
        flatCollect: [ :mr | glhImporter importNotesfromMergeRequest: mr iid ofProject: mr project id ].
1✔
16

1✔
17
    "Filtering notes with ACR notation"
1✔
18
    regex := '.*Auto code review has detected that the code violates this rule.*' asRegex.
1✔
19

1✔
20
    acrnotes := notes 
1✔
21
        flatCollect: [ :noteArray | 
1✔
22
            noteArray select: [ :note | (regex search: note body) 
1✔
23
                                                                                                        and: ((note created_at asDateAndTime > (period at: #since) asDateAndTime) 
1✔
24
                                                                                                        and: (note updated_at asDateAndTime < (period at: #until))).] 
1✔
25
        ].
1✔
26

1✔
27
    ^ acrnotes size.
1✔
28

1✔
29
]
1✔
30

31
{ #category : #accessing }
NEW
32
CreatedNotesByACRByProjectMetric >> description [
×
NEW
33
        ^ 'Nb AutoCodeReview notes for a project (all MR) in a given timeline'
×
NEW
34
]
×
35

36
{ #category : #loading }
37
CreatedNotesByACRByProjectMetric >> load [
1✔
38
        projectMergeRequests := self
1✔
39
                              loadMergeRequestsSince:  (period at: #since)
1✔
40
                              until:  (period at: #until)
1✔
41
]
1✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc