Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Donald Oakes committed Jan 16, 2020
1 parent 6e89f2e commit 6e5901d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -6,7 +6,7 @@ git:
depth: 250
branches:
only:
- none # master
- master
env:
- LD_LIBRARY_PATH=/home/travis/build/CenturyLinkCloud/mdw/mdw-workflow/assets/com/centurylink/mdw/node
before_install:
Expand Down
Expand Up @@ -40,7 +40,8 @@ public GitLabDiscoverer(URL repoUrl, boolean isTrusted) throws IOException {
if (query != null) {
for (String pair : query.split("&")) {
int eq = pair.indexOf('=');
if (eq > 0 && eq < pair.length() - 1 && pair.substring(0,eq).equals("Private-Token")) {
if (eq > 0 && eq < pair.length() - 1 &&
(pair.substring(0, eq).equals("Private-Token") || pair.substring(0, eq).equals("private_token"))) {
setToken(pair.substring(eq + 1));
}
}
Expand Down Expand Up @@ -98,9 +99,9 @@ else if (http.getResponseCode() != 200) {
}

public JSONArray getTreeInfo(String path, String ref, boolean recursive) throws IOException {
// projects/MDW_DEV%2Fmdw-demo-ctl/repository/tree?path=/&ref=master
// projects/MDW_DEV%2Fmdw-demo-ctl/repository/tree?path=/&ref=master&page_size=100
String url = apiBase + "/projects/" + URLEncoder.encode(repoPath, "utf-8") + "/repository/tree?path=" +
URLEncoder.encode(path, "utf-8") + "&ref=" + ref;
URLEncoder.encode(path, "utf-8") + "&ref=" + ref + "&per_page=100";
if (recursive)
url += "&recursive=true";
HttpHelper http = getHttpHelper(url);
Expand Down

0 comments on commit 6e5901d

Please sign in to comment.