Skip to content

Commit 0fd6f26

Browse files
committed
Added static getPathWithNamespace(String, String) method (#380).
1 parent 28e25f0 commit 0fd6f26

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/main/java/org/gitlab4j/api/models/Project.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -646,4 +646,15 @@ public static final boolean isValid(Project project) {
646646
public String toString() {
647647
return (JacksonJson.toJsonString(this));
648648
}
649+
650+
/**
651+
* Formats a fully qualified project path based on the provided namespace and project path.
652+
*
653+
* @param namespace the namespace, either a user name or group name
654+
* @param path the project path
655+
* @return a fully qualified project path based on the provided namespace and project path
656+
*/
657+
public static final String getPathWithNammespace(String namespace, String path) {
658+
return (namespace.trim() + "/" + path.trim());
659+
}
649660
}

0 commit comments

Comments
 (0)