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

Fix #173: Use OpenShift compliant git/vcs annotations #212

Merged
merged 1 commit into from
Jun 1, 2020

Conversation

rohanKanojia
Copy link
Member

Fix #173

@rohanKanojia rohanKanojia requested a review from manusa May 26, 2020 14:52
}
});
}

protected void addAnnotations(PlatformMode platformMode, Map<String, String> annotations, String gitRemoteUrl, String branch, String commitId) {
Copy link
Member

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) {
Copy link
Member

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
Copy link

codecov bot commented Jun 1, 2020

Codecov Report

Merging #212 into master will increase coverage by 0.04%.
The diff coverage is 29.72%.

Impacted file tree graph

@@             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     
Impacted Files Coverage Δ Complexity Δ
...kube/kit/config/resource/OpenShiftAnnotations.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
...rg/eclipse/jkube/enricher/generic/GitEnricher.java 19.64% <40.74%> (+19.64%) 4.00 <4.00> (+4.00)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2076887...b45ce17. Read the comment docs.

@sonarcloud
Copy link

sonarcloud bot commented Jun 1, 2020

SonarCloud Quality Gate failed.

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

36.2% 36.2% Coverage
0.0% 0.0% Duplication

warning 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.
Read more here

@manusa manusa merged commit aa28b53 into eclipse-jkube:master Jun 1, 2020
@rohanKanojia rohanKanojia deleted the pr/issue173 branch July 8, 2020 05:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use OpenShift compliant git/vcs annotations
2 participants