You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Is there a way to disable compare and commit urls? #216
// .versionrc.cjs
module.exports = {
writerOpts: {
finalizeContext(context) {
context.linkReferences = false; // no commit-hash links, no "closes #x" links
context.linkCompare = false; // also drop the compare link in the version header
return context;
},
},
};
However, this replaces the finalizeContext from the standard writer, so it might have other effects that you don't intend. It's a bit of a hack.
It would be cleaner for commit-and-tag-version to allow you to change the context directly - right now, here we just pass:
.context({ version: newVersion }),
But there's no reason that we couldn't allow the modification of context there. A PR that addresses this would be welcome.
Activity
TimothyJones commentedon Apr 9, 2025
Hi! Can you tell me where you set these properties?
unlocomqx commentedon Apr 15, 2025
In the
.versionrcfile like this{ "commitUrlFormat":"", "compareUrlFormat":"", "bumpFiles": [ { "filename": "package.json", "type": "json" }, { "filename": "dynamicproduct.php", "updater": "scripts/updater.cjs" } ] }Thank you
AndreBezBirolo commentedon May 29, 2025
Same question here.
TimothyJones commentedon Jul 21, 2026
In version 13, I believe you can do this with:
However, this replaces the
finalizeContextfrom the standard writer, so it might have other effects that you don't intend. It's a bit of a hack.It would be cleaner for commit-and-tag-version to allow you to change the context directly - right now, here we just pass:
But there's no reason that we couldn't allow the modification of context there. A PR that addresses this would be welcome.