-
Notifications
You must be signed in to change notification settings - Fork 523
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
Fix #173: Use OpenShift compliant git/vcs annotations #212
Conversation
} | ||
}); | ||
} | ||
|
||
protected void addAnnotations(PlatformMode platformMode, Map<String, String> annotations, String gitRemoteUrl, String branch, String commitId) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be better if the function was pure and instead of creating side effects in the input annotations variable you returned a new Map with the annotations. This map can then be appended (if applicable) to the existing variable using putAll
.
} | ||
}); | ||
} | ||
|
||
protected static Map<String, String> addAnnotations(PlatformMode platformMode, String gitRemoteUrl, String branch, String commitId) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: this method is not adding any annotations but generating/inferring them. Method should be named something like getAnnotations
generateAnnotations
inferAnnotations
or sth like that.
Codecov Report
@@ Coverage Diff @@
## master #212 +/- ##
============================================
+ Coverage 26.76% 26.80% +0.04%
- Complexity 1626 1630 +4
============================================
Files 350 351 +1
Lines 18308 18320 +12
Branches 2801 2800 -1
============================================
+ Hits 4900 4911 +11
Misses 12848 12848
- Partials 560 561 +1
Continue to review full report at Codecov.
|
...e-kit/enricher/generic/src/test/java/org/eclipse/jkube/enricher/generic/GitEnricherTest.java
Show resolved
Hide resolved
SonarCloud Quality Gate failed. 0 Bugs 36.2% Coverage The version of Java (1.8.0_131) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11. |
Fix #173