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

Improve Gerrit connector usability #222

Closed
wants to merge 6 commits into from

Conversation

corebonts
Copy link
Contributor

Although these fixes might work on their own, they touch the same file, that's why I created one pull request for all of them.

Contains a fix that allows Gerrit HTTP password usage.

See uwolfer/gerrit-rest-java-client#70
This makes it possible to use http password token that is defined in
Settings -> HTTP Password page instead of the regular site password.

https://gerrit-review.googlesource.com/Documentation/rest-api.html#authentication
When a cherry-pick is done and there are more commits with the same
changeId, an exended id can be used to distinguish between them.

It has a tilde separated format:
project/subproject~branch/subbranch~changeId

If this is not encoded but just put in the URL, an error message comes
from the server like:
Request not successful. Message: Not Found. Status-Code: 404.
Content: Not found: project
As it's a Gerrit feature and not a client side deduplication, it should
not have a large overhead, therefore it's enabled by default.
@codecov-commenter
Copy link

Codecov Report

Merging #222 into master will increase coverage by 1.79%.
The diff coverage is 76.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #222      +/-   ##
============================================
+ Coverage     73.25%   75.05%   +1.79%     
- Complexity      612      629      +17     
============================================
  Files           146      147       +1     
  Lines          1963     1984      +21     
  Branches        128      128              
============================================
+ Hits           1438     1489      +51     
+ Misses          468      436      -32     
- Partials         57       59       +2     
Impacted Files Coverage Δ Complexity Δ
.../sputnik/connector/gerrit/GerritFacadeBuilder.java 69.69% <64.28%> (+56.65%) 6.00 <2.00> (+4.00)
...l/touk/sputnik/connector/gerrit/GerritOptions.java 87.50% <87.50%> (ø) 5.00 <5.00> (?)
...a/pl/touk/sputnik/configuration/GeneralOption.java 98.46% <100.00%> (+0.04%) 3.00 <0.00> (ø)
...pl/touk/sputnik/connector/gerrit/GerritFacade.java 92.30% <100.00%> (+44.93%) 11.00 <0.00> (+3.00)
...ava/pl/touk/sputnik/connector/http/HttpHelper.java 88.88% <0.00%> (+3.70%) 11.00% <0.00%> (+1.00%)
src/main/java/pl/touk/sputnik/review/Review.java 67.50% <0.00%> (+5.00%) 15.00% <0.00%> (+3.00%)
.../touk/sputnik/connector/gerrit/GerritPatchset.java 80.00% <0.00%> (+20.00%) 4.00% <0.00%> (+1.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 b991f9d...873547a. Read the comment docs.

@codecov-io
Copy link

Codecov Report

Merging #222 (873547a) into master (b9482aa) will increase coverage by 2.66%.
The diff coverage is 76.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #222      +/-   ##
============================================
+ Coverage     72.38%   75.05%   +2.66%     
- Complexity      608      629      +21     
============================================
  Files           146      147       +1     
  Lines          1988     1984       -4     
  Branches        131      128       -3     
============================================
+ Hits           1439     1489      +50     
+ Misses          489      436      -53     
+ Partials         60       59       -1     
Impacted Files Coverage Δ Complexity Δ
.../sputnik/connector/gerrit/GerritFacadeBuilder.java 69.69% <64.28%> (+56.65%) 6.00 <2.00> (+4.00)
...l/touk/sputnik/connector/gerrit/GerritOptions.java 87.50% <87.50%> (ø) 5.00 <5.00> (?)
...a/pl/touk/sputnik/configuration/GeneralOption.java 98.46% <100.00%> (+0.04%) 3.00 <0.00> (ø)
...pl/touk/sputnik/connector/gerrit/GerritFacade.java 92.30% <100.00%> (+44.93%) 11.00 <0.00> (+3.00)
...l/touk/sputnik/processor/detekt/ResultBuilder.java 78.94% <0.00%> (-2.01%) 7.00% <0.00%> (-1.00%)
...touk/sputnik/processor/ktlint/KtlintProcessor.java 88.00% <0.00%> (-0.47%) 9.00% <0.00%> (ø%)
...k/sputnik/processor/ktlint/LintErrorConverter.java 100.00% <0.00%> (ø) 5.00% <0.00%> (ø%)
...touk/sputnik/processor/detekt/DetektProcessor.java 85.71% <0.00%> (+2.78%) 10.00% <0.00%> (-3.00%) ⬆️
...ava/pl/touk/sputnik/connector/http/HttpHelper.java 88.88% <0.00%> (+3.70%) 11.00% <0.00%> (+1.00%)
... and 5 more

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 b9482aa...ceed77c. Read the comment docs.

@corebonts
Copy link
Contributor Author

I will do the merge again as gerrit lib was upgraded on master.

@corebonts
Copy link
Contributor Author

Recreated: #230

@corebonts corebonts closed this Jan 15, 2021
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.

3 participants