Skip to content

Conversation

@doteric
Copy link

@doteric doteric commented May 19, 2023

Addresses the #449 issue.

@travi , please let me know is this an acceptable way to handle this or you would prefer some other way. I found it not really convenient for any other approach + TypeScript would help a lot in the future 😁

Anything else would require work inside conventional-changelog-writer and also possibly in every changelog template. For example conventional-changelog-eslint has ...{{@root.repository}}/compare/{{previousTag}}...{{currentTag}}...

const [, owner, repository] = /^\/(?<owner>[^/]+)?\/?(?<repository>.+)?$/.exec(pathname);

const { issue, commit, referenceActions, issuePrefixes } =
const { issue, commit, referenceActions, issuePrefixes, repositoryPathSuffix } =
Copy link
Author

@doteric doteric May 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const { issue, commit, referenceActions, issuePrefixes, repositoryPathSuffix } =
const { issue, commit, referenceActions, issuePrefixes, repositoryPathSuffix = "" } =

I could also default to an empty string if you'd like and just do

repository:`${repository}${repositoryPathSuffix}`, 

Whatever is preferred ;D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant