-
Notifications
You must be signed in to change notification settings - Fork 317
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
fixes getProjects(namespace, name) with a search #208
base: master
Are you sure you want to change the base?
Conversation
@@ -585,8 +585,15 @@ public GitlabProject getProject(Serializable projectId) throws IOException { | |||
* use namespace & project name to get project | |||
*/ | |||
public GitlabProject getProject(String namespace, String projectName) throws IOException{ | |||
String tailUrl = GitlabProject.URL + "/" + namespace + "%2F" + projectName; | |||
return retrieve().to(tailUrl, GitlabProject.class); | |||
String fullName = namespace+" / "+projectName; |
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.
Should this be?
String fullName = namespace + "/" + projectName;
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.
I tested on our internal GitLab and we really have a space between each side of the slash. It's working with the changes.
However, may this be a GitLab configuration ?
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.
Hmmmm. It might just be stripping whitespace?
… name instead of the full name
Hi, I changed slightly the implementation to check the Namespace name. It's safer now :-) Best, |
I am able to access a project by namespace and name against Gitlab EE 9.4. It's important to escape the namespace (see #254). |
@novalis I checked with the latest version (4.1.0) against our GitLab CE 11.8.1 and I still have the same problem... Maybe there is a difference on this between CE and EE ? |
I won't be able to check this out until early June. Please pester me then. If it's more urgent, maybe @jhedwardyang can take a look. The space seems extremely unlikely, but what do I know? |
Hello,
Here is a little contribution to fix the
getProject(String namespace, String projectName)
method, because in the Gitlab API, you can only access a project by its ID. Hence you need to do a search and compare it with retrieved projects.Any feedback is welcomed :-)
Best regards,
Cédric