diff --git a/core/modules/savers/gitlab.js b/core/modules/savers/gitlab.js index 505face43..cce69099c 100644 --- a/core/modules/savers/gitlab.js +++ b/core/modules/savers/gitlab.js @@ -48,12 +48,9 @@ GitLabSaver.prototype.save = function(text,method,callback) { var uri = endpoint + "/projects/" + encodeURIComponent(repo) + "/repository/"; // Perform a get request to get the details (inc shas) of files in the same path as our file $tw.utils.httpRequest({ - url: uri + "tree/" + encodeURIComponent(path.replace(/^\/+|\/$/g, '')), + url: uri + "tree/?path=" + encodeURIComponent(path.replace(/^\/+|\/$/g, '')) + "&branch=" + encodeURIComponent(branch.replace(/^\/+|\/$/g, '')), type: "GET", headers: headers, - data: { - ref: branch - }, callback: function(err,getResponseDataJson,xhr) { var getResponseData,sha = ""; if(err && xhr.status !== 404) {