-
Notifications
You must be signed in to change notification settings - Fork 43
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
Commits from Merge-Commits are not considered for a release when using provider git
or gitlab
#168
Comments
I am pretty sure, that the problem is related to the code at https://github.com/go-semantic-release/provider-git/blob/90e05cb6343f0c539a01337f4edf1aeb73dbfa4c/pkg/provider/git.go#L108 It seems to break the I tried to test and fix this myself, however my go skills are very limited (basically non-existing). Hope someone can join the issue. |
Iam facing the same error. |
@simon-weimann - We have found the problem in our case. It was an unset Perhaps your token has also expired? |
There are log_order options available now to help achieve the same affect when using the CI_JOB_TOKEN instead of the GITLAB_TOKEN.
i.e. |
I noticed a strange behaviour/bug with the
git
provider when running semantic-release for a git repository that looks the following:As you can see, the tip of the repo is a merge-commit, that merges a branch with commit that complies with the conventional commit syntax (feat: feature).
Running
semantic-release --provider git --no-ci
should add a tag v1.1.0 at the merge-request but it doesn't:It does not detect any changes related to the branch that is being merged. However when using the
github
provider this works as expected.As recently a change was implemented, that the
gitlab
provider uses thegit
provider internally when not providing aGITLAB_TOKEN
and instead using theCI_JOB_TOKEN
, I also experience the same behaviour above for thegitlab
provider. (go-semantic-release/provider-gitlab#7, #141)As a workaround, we have to change the default merge strategy for gitlab from
merge-commit
tofast-forward
which is not desired.When changing the commit message for the merge commit to the conventional commit syntax, it does create arelease, however it still does not respect the commits from the branch to be merged:
Running semantic release produces a release
v1.0.1
which should be av1.1.0
as the feature branch contains a comit withfeat
:Steps to reproduce:
Expected behaviour:
Semantic-Release does respect both parent for a merge-commit when running the commit analyzer.
I hope the problem is clear and can be fixed.
The text was updated successfully, but these errors were encountered: