Skip to content

Commit

Permalink
Fix bitbucket landing
Browse files Browse the repository at this point in the history
  • Loading branch information
pomber committed Feb 24, 2019
1 parent 032859f commit dab29b8
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions src/git-providers/bitbucket-provider.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import netlify from "netlify-auth-providers";
import { Base64 } from "js-base64";
import React from "react";
const TOKEN_KEY = "bitbucket-token";

Expand Down Expand Up @@ -27,23 +26,18 @@ async function getContent(repo, sha, path) {
}

const content = await contentResponse.text();
// const content = Base64.decode(contentJson.content);

return { content };
}

function getUrlParams() {
const [
,
owner,
reponame,
action,
sha,
...paths
] = window.location.pathname.split("/");

// if (action !== "commits" && action !== "blob") {
// return [];
// }
const [, owner, reponame, , sha, ...paths] = window.location.pathname.split(
"/"
);

if (!sha) {
return [];
}

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

0 comments on commit dab29b8

Please sign in to comment.