Skip to content

Context attribute "compareUrl" is not working with bitbucket repository #90

@arkadioz

Description

@arkadioz

@momocow I was using the tool with github, but now I am trying to setup everything on bitbucket too, I notice that this on my default handlebars template (which is the same from the example but with the emojis):

{{#if compareUrl}}
# 🎉 [v{{nextRelease.version}}]({{compareUrl}}) ({{datetime "UTC:yyyy-mm-dd"}}) 🔖
{{else}}
# 🎉 v{{nextRelease.version}} ({{datetime "UTC:yyyy-mm-dd"}}) 🔖
{{/if}}

works with github repository, but with bitbucket it is always entering the else, is there anyway to make it work with bitbucket too?

When I was using release-notes generator plugin I also had to do some tweaks for it to work with bitbucket like so:

[
      "@semantic-release/release-notes-generator",
      {
        "preset": "conventionalcommits",
        "presetConfig": {
          "commitUrlFormat": "{{host}}/{{owner}}/{{repository}}/commits/{{hash}}",
          "compareUrlFormat": "{{host}}/{{owner}}/{{repository}}/compare/{{previousTag}}..{{currentTag}}",
          "types": [
            {
              "type": "feat",
              "section": "New Feature(s) 🚀"
            },
            {
              "type": "fix",
              "section": "Bug Fix(es) 🐛️"
            }
          ]
        }
      }
    ]

Please let me know if I can do something like this to get the compare url working, the commit url was easy to fix on the commit template but the compare url not sure how to fix.

EDIT: I was reading again this https://github.com/momocow/semantic-release-gitmoji?tab=readme-ov-file#releasenotesoptions

you mention that github is currently the only repo supported but you also mention that it is possible to override the baseUrl and other values, can you please show example how to override them? Maybe this way it can work with bitbucket too

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions