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

Configure compare URL and commit URL with Angular preset #695

Open
GiamBoscaro opened this issue Aug 7, 2024 · 0 comments
Open

Configure compare URL and commit URL with Angular preset #695

GiamBoscaro opened this issue Aug 7, 2024 · 0 comments

Comments

@GiamBoscaro
Copy link

GiamBoscaro commented Aug 7, 2024

I am generating the CHANGELOG for some repositories hosted in an on premise Bitbucket. The compare and commit link are generated wrong.
The repositoryUrl parameter is configured as this: https://<host>/git/scm/<project>/<repo>.git.
The commit url should be this: https://<host>/git/projects/<project>/repos/<repo>/commits/<commit-sha>
The compare url should be this: https://<host>/git/projects/<project>/repos/<repo>/compare/diff?sourceBranch=refs%2Ftags%2F<current-tag>&targetBranch=refs%2Ftags%2F<previous-tag>

As you can see the links are different from each other and completely different from the ones generated by the preset. One of the reasons (but not the only one) is that the preset is using repositoryUrl to generate the links to the commit url and compare url, but the repositoryUrl used to git pull and git push is completely different from the one that should be for the links.

I have seen that for other presets you could use presetConfig to configure these links. An example:

"presetConfig": { 
       "commitUrlFormat": "{{host}}/git/projects/{{owner}}/repos/{{repository}}/commits/{{hash}}",
       "compareUrlFormat": "{{host}}/git/projects/{{owner}}/repos/{{repository}}/diff?sourceBranch=refs%2Ftags%2F/{{currentTag}}&targetBranch=refs%2Ftags%2F{{previousTag}}"
}

but these do not seem to work with the angular preset. So is there any way to customize these links?

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

1 participant