commit-analyzer: Step analyzeCommits suddenly exits 0 without analyzing commits

As part of our CI/CD-pipelines we use semantic-release to create new tags within a self-hosted GitLab instance on dozens of repositories. This has been working steadily for ~2 years, but has been broken rather inexplicable since yesterday on all of them.
While the pipelines seem to succeed, as an exit code 0 is thrown, the analyzeCommits step completes without actually analysing found commits:

...
[8:42:57 AM] [semantic-release] › ✔  Completed step "verifyConditions" of plugin "@semantic-release/gitlab"
[8:42:57 AM] [semantic-release] › ℹ  Found git tag 1.0.1 associated with version 1.0.1 on branch master
[8:42:57 AM] [semantic-release] › ℹ  Found 4 commits since last release
[8:42:57 AM] [semantic-release] › ℹ  Start step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
Cleaning up file based variables
Job succeeded

Running with --debug I verified commits are still found with correct content, and as we’re experiencing it on all pipelines I’m starting to think it has something to do with the plugin itself. I tried running previous versions of both node and semantic-release, but without success.

I’m curious if anyone else experiences the same or notices a faulty configuration in YAML’s above. What baffles me the most is that it has been working steadily for a long time.

Configuration

We configured the pipeline and semantic-release as follows:

.gitlab-ci.yml

default:
  interruptible: false
stages:
  - tag

tag:
  image: node:latest
  stage: tag
  before_script:
    - apt-get update && apt-get install -y --no-install-recommends git-core ca-certificates
    - npm install -g semantic-release @semantic-release/changelog @semantic-release/commit-analyzer @semantic-release/gitlab @semantic-release/git @semantic-release/npm @semantic-release/release-notes-generator conventional-changelog conventional-changelog-conventionalcommits 
  script:
    - semantic-release
  when: on_success
  only:
    - master
  except:
    refs:
      - tags
    variables:
      - $CI_COMMIT_TITLE =~ /^RELEASE:.+$/

.releaserc.yaml

plugins:
  - "@semantic-release/gitlab"
branches: ['master']
ci: true
debug: true
dryRun: false
tagFormat: '${version}'

# Global plugin options (will be passed to all plugins)
preset: 'conventionalcommits'
gitlabUrl: 'https://git.organisation.com/' # your gitlab url

verifyConditions:
  - '@semantic-release/changelog'
  - '@semantic-release/git'
  - '@semantic-release/gitlab'
  - 
analyzeCommits:
  - path: '@semantic-release/commit-analyzer'

generateNotes:
  - path: '@semantic-release/release-notes-generator'
    writerOpts:
      groupBy: 'type'
      commitGroupsSort: 'title'
      commitsSort: 'header'
    linkCompare: true
    linkReferences: true

prepare:
  - path: '@semantic-release/changelog'
  - path: '@semantic-release/git'
    message: 'RELEASE: ${nextRelease.version}'
    assets: ['CHANGELOG.md']

publish:
  - path: '@semantic-release/gitlab'

About this issue

  • Original URL
  • State: closed
  • Created 10 months ago
  • Reactions: 15
  • Comments: 20 (6 by maintainers)

Commits related to this issue

Most upvoted comments

I could reproduce this issue locally as well. I tried downgrading every npm package we need for semantic-release to run, which received a new release in the past few days. When downgrading conventional-changelog-conventionalcommits to version 6.1.0 it worked as it did one week ago. So the bug seems to be related to this package.

Huge thanks to @angylada for their debugging.

If it’s helpful for others using cycjimmy/semantic-release-action on GitHub Actions, installing 6.1.0 of conventional-changelog-conventionalcommits did fix this for me.

      - name: Deploy git tag and Gradle plugin release via Semantic Release 
        uses: cycjimmy/semantic-release-action@v3
        with: 
          # Hard-coding version as workaround https://github.com/semantic-release/commit-analyzer/issues/517#issuecomment-1697193361
          extra_plugins: |
            @semantic-release/git
            @semantic-release/exec
            conventional-changelog-conventionalcommits@6.1.0 
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

I’ve got the same problem as author of the issue while using official Github Action for Semantic Release – do we have any solution to fix it?

Just digging around, not 100% sure, maybe someone can have a good look as well. In version 7.0.0 of conventional-changelog-conventionalcommits, the path of files have moves from dash-words to camelCase. I believe this is causing the commit-analyzer to fail?

conventional-changelog/conventional-changelog@8d0ffbe

https://github.com/semantic-release/commit-analyzer/blob/master/lib/load-parser-config.js#L24C30-L24C30

We fixed the issue in our installation reverting to

conventional-changelog-conventionalcommits@6.1.0

together with

@semantic-release/commit-analyzer@10.0.1

We’re using semantic release 20.x actually. We’ve not tested latest commit-analyzer releases (we will do tomorrow). So it seems that the issue is related to conventional-changelog-conventionalcommits > 6.1.0 as far as we can understand

Just digging around, not 100% sure, maybe someone can have a good look as well. In version 7.0.0 of conventional-changelog-conventionalcommits, the path of files have moves from dash-words to camelCase. I believe this is causing the commit-analyzer to fail?

https://github.com/conventional-changelog/conventional-changelog/commit/8d0ffbe6c59b861b560cea0e3594c7b32e978cc3

https://github.com/semantic-release/commit-analyzer/blob/master/lib/load-parser-config.js#L24C30-L24C30