Closed Will-Mann-16 closed 6 months ago
Hi @Will-Mann-16
It looks like the commit analyzer doesn't support commit messages with scopes. Created a test: https://github.com/go-semantic-release/commit-analyzer-cz/pull/3
That still doesnt explain why it doesn't release anything though. It should still generate a release when it hits the next 'normal' message like feat:
or fix:
.
@cliedeman I work with @Will-Mann-16 and I manually renamed a dependabot's commit name to remove the scope. The release pipeline ran with no errors but it still failed to find a new version and release properly.
Below is the commit history of the repo and the red arrow shows the first and last time the pipeline actually released a new version. The top commit is the dependabot commit which I rename manually to remove the scope.
Hi @Will-Mann-16 and @TommoLeedsy, thanks for using go-semantic-release 🕺
From what I can see, there have only been chore
commits since the last release, v1.22.0
. go-semantic-release is configured by default to only release if a fix
or feat
commit message is detected since the last release (the scope is parsed correctly but ignored for now).
You can configure dependapot in a way to use either a feat
or fix
commit prefix using the config file: https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#commit-message
@christophwitzko Thanks for your response, is there a possibility to add other commit types to cause a release? It might be nice if these were user customisable to an extent? I'm happy to work on a feature like this, if that's something you would be interested in.
Yes, that sounds like a good idea! I will look into it. 👍
@christophwitzko Sounds good, thank you very much!
Hi everyone, I created an issue for that in the commit-analyzer repo: https://github.com/go-semantic-release/commit-analyzer-cz/issues/4
Will close this one for now.
Hi everyone, I have extended the commit analyzer with customizable release rules: https://github.com/go-semantic-release/commit-analyzer-cz?tab=readme-ov-file#customizable-release-rules
You can now configure custom commit types/scopes that trigger releases.
If you want that dependabot commits (chore(deps)
) trigger a new minor release you can add the following .semrelrc
config to your repo:
{
"plugins":{
"commit-analyzer":{
"options":{
"minor_release_rules":"feat,chore(deps)"
}
}
}
}
Let me know if that works for you. ☺️
@christophwitzko This looks fantastic, thank you very much.
Hi guys,
Love the work you've done with the library. However we recently we're having issues recently after enabling dependabot with some of our commits. The pipelines now will run, but won't release a new version at all. As you can see below, the red arrow indicates the last release and the actions on the pipeline are showing the release pipeline (all pass).
Feel free to look at the library here: https://www.github.com/ls6-events/astra for more detailed logging.
And this is our pipeline output for the most recent run (specifically the
release
job):The actions yaml is here:
We suspect dependabot, but we don't entirely know. This has been happening across our repos soon after we enable dependabot but we did it all quite recently so it could be something else.
Thanks!