Skip to content
This repository was archived by the owner on Oct 2, 2023. It is now read-only.

Commit f527cbe

Browse files
authored
Merge pull request #181 from dcanar9/master
adding condition to excessive logging
2 parents 7565336 + 5db3ab5 commit f527cbe

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<artifactId>api-audit</artifactId>
55
<packaging>jar</packaging>
66
<name>${project.groupId}:${project.artifactId}</name>
7-
<version>3.7.29-SNAPSHOT</version>
7+
<version>3.7.30-SNAPSHOT</version>
88
<description>Hygieia Audit Rest API Layer</description>
99
<url>https://github.com/Hygieia/${repository.name}</url>
1010

src/main/java/com/capitalone/dashboard/evaluator/CodeReviewEvaluator.java

+7-2
Original file line numberDiff line numberDiff line change
@@ -221,8 +221,11 @@ private CodeReviewAuditResponseV2 getPeerReviewResponses(CollectorItem repoItem,
221221

222222

223223
Long startTime = System.currentTimeMillis();
224+
if(notPeerReviewed.size() > 0) {
225+
LOGGER.info(String.format("AutoMerge Check :: Reviewing %d Pull Request(s) with no peer review", notPeerReviewed.size()));
226+
}
227+
224228
// iterate though the gitRequests that failed the PR audit and check if the PR was auto merged
225-
LOGGER.info(String.format("AutoMerge Check :: Reviewing %d Pull Request(s) with no peer review", notPeerReviewed.size()));
226229
for(GitRequest noPR: notPeerReviewed){
227230
boolean foundCommit = false;
228231

@@ -264,8 +267,10 @@ private CodeReviewAuditResponseV2 getPeerReviewResponses(CollectorItem repoItem,
264267
if(foundCommit){break;} // stop iterating through PRs if commit was verified
265268
}
266269
}
267-
LOGGER.info(String.format("AutoMerge Check :: Completed in %d ms", System.currentTimeMillis()-startTime));
268270

271+
if(notPeerReviewed.size() > 0) {
272+
LOGGER.info(String.format("AutoMerge Check :: Completed in %d ms", System.currentTimeMillis() - startTime));
273+
}
269274
//check any commits not directly tied to pr
270275
commits.stream().filter(commit -> !allPrCommitShas.contains(commit.getScmRevisionNumber()) && StringUtils.isEmpty(commit.getPullNumber()) && commit.getType() == CommitType.New).forEach(reviewAuditResponseV2::addDirectCommit);
271276

0 commit comments

Comments
 (0)