-
Notifications
You must be signed in to change notification settings - Fork 480
Get more information from gitlab #186
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
Conversation
Also removed wrong itemsPerPage parameter from getMergeRequestChanges method and improved its comment.
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.
@ISibboI
Thank you for your contribution. I've requested a couple small changes, but as a whole, it looks great.
* @throws GitLabApiException if encoding throws an exception | ||
*/ | ||
protected String urlEncodeForPath(String s) throws GitLabApiException { | ||
try { |
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.
Why not just add encoded = encoded.replace("+", "%20");
to urlEncode(String s)
I'm pretty sure urlEncode(String s)
not processing +
is an oversight
@@ -43,7 +43,7 @@ public RepositoryFile getFile(String filePath, Integer projectId, String ref) th | |||
Form form = new Form(); | |||
addFormParam(form, "ref", ref, true); | |||
Response response = get(Response.Status.OK, form.asMap(), | |||
"projects", projectId, "repository", "files", urlEncode(filePath)); | |||
"projects", projectId, "repository", "files", urlEncodeForPath(filePath)); |
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.
Change back to urlEncode(filePath)
after fix to AbstractApi.urlEncode(String s)
After further thought and examination of the other classes that sub-classed AbstractUser, I have changed my mind and deleted the comments about not needing Contributor and Participant classes. I now believe it is correct creating those classes. Address the urlEncode() change and this is good to merge. |
Put functionality of AbstractApi.urlEncodeForPath into AbstractApi.urlEncode and removed the former.
Thank you for your feedback! I was not sure what the urlEncode method exactly does, so I first implemented a second one, to be safe. Now it should be as you requested. |
@ISibboI |
@ISibboI |
Hey,
as mentioned in issue #180 before, here is a pull request with additions to the API. I added more than just the one missing method in this. I hope it's fine to merge it alltogether.
Additions:
Fixes: