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

Bitbucket Edit Link goes to wrong link #1235

Closed
nickngqs opened this issue Jan 28, 2019 · 3 comments
Closed

Bitbucket Edit Link goes to wrong link #1235

nickngqs opened this issue Jan 28, 2019 · 3 comments
Labels
contribution welcome Contributions welcome

Comments

@nickngqs
Copy link
Contributor

nickngqs commented Jan 28, 2019

  • [ x] I confirm that this is a issue rather than a question.

Bug report

Editing links for Bitbucket doesn't work giving wrong URL to edit.

Version

0.14.8

Steps to reproduce

No steps required

What is expected?

It should go to the link below in order to work.
https://bitbucket.org/example-team/example-repo/src/master/docs/

What is actually happening?

Click on link goes to below url instead
https://bitbucket.org/example-team/example-repo/master/docs/

Other relevant information

Proposed feature as well to allow editing dynamic links in case individual api changes.

For example
It should go to the link below in order to work.

https://bitbucket.org/${organisation}/${repo-name}/${additional-url}

@ulivz
Copy link
Member

ulivz commented Jan 29, 2019

Thanks for the report, since I don't use Bitbucket, could you help to fix it. Contribution welcome!

Ref: related code.

@ulivz ulivz added the contribution welcome Contributions welcome label Jan 29, 2019
nickngqs added a commit to nickngqs/vuepress that referenced this issue Jan 30, 2019
@ulivz ulivz closed this as completed in 3c5b3a6 Jan 30, 2019
fago added a commit to drunomics/vuepress that referenced this issue Feb 11, 2019
fago added a commit to drunomics/vuepress that referenced this issue Feb 11, 2019
fago added a commit to drunomics/vuepress that referenced this issue Feb 11, 2019
ulivz pushed a commit that referenced this issue Feb 11, 2019
@SimonEast
Copy link

Thanks for the fix, but unfortunately there's no way to enable working editLinks for BitBucket without also enabling the repo link in the header (I'd like to use the former without the latter).

This is happening because the code is checking for the string bitbucket.org in the repo variable, not the docsRepo variable. Perhaps if (bitbucket.test(repo)) should be if (bitbucket.test(docsRepo))?

@daltondiaz
Copy link
Contributor

I don't why bitbucket put the /src in the end of repository, but when I did the edit link for bitbucket the configuration was:

{
    ...
    repo: "https://bitbucket.org/myrepo/myproject/src",
    docsDir: "docs",
    docsBranch: "master",
    ...
}

So was only add the /src in the end of repo. I follow the pattern of github.

But ins't a problem these way and ins't necessary to change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution welcome Contributions welcome
Projects
None yet
Development

No branches or pull requests

4 participants