Skip to content
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

Add GitLab support #99

Merged
merged 7 commits into from
Feb 21, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix gitlab path
  • Loading branch information
pomber committed Feb 19, 2019
commit 9a9cb60b481eaa79f87ef132fbf38463615085dd
5 changes: 2 additions & 3 deletions src/git-providers/gitlab-provider.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function getUrlParams() {
return [];
}

return [owner + "/" + reponame, sha, "/" + paths.join("/")];
return [owner + "/" + reponame, sha, paths.join("/")];
}

function getPath() {
Expand All @@ -62,7 +62,7 @@ async function getCommits(path, last) {
if (!cache[path]) {
const commitsResponse = await fetch(
`https://gitlab.com/api/v4/projects/${encodeURIComponent(
"6509971" //TODO fix
repo
)}/repository/commits?path=${encodeURIComponent(path)}&ref_name=${sha}`,
{ headers: getHeaders() }
);
Expand Down Expand Up @@ -99,7 +99,6 @@ async function getCommits(path, last) {
}

function logIn() {
console.log("login");
// return new Promise((resolve, reject) => {
var authenticator = new netlify({
site_id: "ccf3a0e2-ac06-4f37-9b17-df1dd41fb1a6"
Expand Down