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 support for bitbucket repositories #1615

Closed
czlowiek488 opened this issue Jun 27, 2021 · 0 comments · Fixed by #1695
Closed

Add support for bitbucket repositories #1615

czlowiek488 opened this issue Jun 27, 2021 · 0 comments · Fixed by #1695
Labels
enhancement Improved functionality good first issue Easier issue for first time contributors

Comments

@czlowiek488
Copy link

czlowiek488 commented Jun 27, 2021

Problem

Im using bitbucket and as I can see only github repositories are allowed.

/(github(?:\.[a-z]+)*\.[a-z]{2,})[:/]([^/]+)\/(.*)/

Suggested Solution

Add bitbucket to regexp.
in GitHubPlugin.js file I changed.
In constructor

const url = /(bitbucket(?:\.[a-z]+)*\.[a-z]{2,})[:/]([^/]+)\/(.*)/.exec(repoLinks[i]);

In getGitHubUrl

return [
   `https://${this.gitHubHostname}`,
   this.gitHubUser,
   this.gitHubProject,
   "src", // blob was previously
    this.branch,
    fileName.substr(this.path.length + 1),
  ].join("/");
@czlowiek488 czlowiek488 added the enhancement Improved functionality label Jun 27, 2021
@Gerrit0 Gerrit0 added the good first issue Easier issue for first time contributors label Jun 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improved functionality good first issue Easier issue for first time contributors
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants