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

Wrong commit link for Bitbucket #491

Open
Gabson1 opened this issue Jul 19, 2023 · 3 comments
Open

Wrong commit link for Bitbucket #491

Gabson1 opened this issue Jul 19, 2023 · 3 comments

Comments

@Gabson1
Copy link

Gabson1 commented Jul 19, 2023

Hello everyone.

I would like to raise a possible issue with the generated links for the diff and commits when using bitbucket.
What is generated by default looks like this https://<BASE>/scm/<PROJ_NAME>/<REPO_NAME>/commit/<HASH>.
Bitbucket commit links look like this though: https://<BASE>/projects/<PROJ_NAME>/repos/<REPO_NAME>/commits/<HASH>.
I have tried setting the host to the correct path, but /scm/<PROJ_NAME>/ is still appended after my override.

My question is, am I supposed to define the repo URL somewhere else or is this an issue with this plugin?

Version Information:

  • Bitbucket Data Center: v7.2.1
  • semantic-release: 17.4.7
  • git: 9.0.1
  • exec: 5.0.0
  • changelog: 5.0.1

Thank you in advance. Please reach out if you require further information.

@hpe-ykoehler
Copy link

Would be interested in a fix to that as well, instead of "issue" and "commit" being configuration, I would recommend a config settings such as "scm-server" where one could set "github, gitlab, bitbucket cloud, bitucket server" and get proper URL for each of those.

@travi
Copy link
Member

travi commented Aug 21, 2023

this sounds very related to #449, so the conversation there likely applies here as well. i think this example highlights my hesitation with the previously suggested solution for the specific situation in that other thread.

to find a path forward, i think we need to define a way to make configuration of this area flexible enough to handle various reasons that this needs to be adjusted. this example feels close to me and is an example of what has been enabled by the underlying conventional-changelog project. i have not investigated far enough to know if that can easily be surfaced to make similar possible directly in our config, but understanding options like that is probably the shortest path to enabling a solution here.

@szegheo
Copy link

szegheo commented Dec 21, 2023

We use Bitbucket Enterprise in our own cloud, and I'm here because I wanted to quickly configure the plugin for:
https://bitbucket.DOMAIN.TLD/projects/<PROJ_NAME>/repos/<REPO_NAME>/commits/<HASH>
Am I miss something or is it impossible (as of now)? 😞

pnpm add -D conventional-changelog-conventionalcommits

  [
    "@semantic-release/release-notes-generator",
    {
      "preset": "conventionalcommits",
      "host": "https://bitbucket.company.tld",
      "presetConfig": {
        "commitUrlFormat": "{{host}}/projects/PROJECT-NAME/repos/{{repository}}/commits/{{hash}}"
      }
    }
  ]

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

No branches or pull requests

4 participants