Skip to content
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

Issue with commit type "chore(deps):", not ending up in CHANGELOG.MD #3203

Open
javedfaruquee1 opened this issue Feb 21, 2024 · 2 comments
Open

Comments

@javedfaruquee1
Copy link

javedfaruquee1 commented Feb 21, 2024

Current behavior

Commits with "chore(deps):" are not making to CHANGELOG.MD.

CHANGELOG.MD (No commit entries made for 1.34.7 which was created for merge of commit chore(deps):"

1.34.7 (2024-2-21)
1.34.6 (2024-2-7)
Bug Fixes
test (850c89b)

release.config.js (config file)

module.exports = {
    branches: ["main"],
    plugins: [
      ['@semantic-release/commit-analyzer', {
          preset: 'angular',
          releaseRules: [
            { breaking: true, release: 'major' },
            { revert: true, release: 'patch' },
            { type: 'feat', release: 'minor' },
            { type: 'fix', release: 'patch' },
            { type: 'chore', release: 'patch' },
            { type: 'docs', release: 'patch' },
          ],
        },
      ],
      ["@semantic-release/changelog", {
        changelogFile: "CHANGELOG.md",
      }],
      '@semantic-release/release-notes-generator',
      ['@semantic-release/git', {
        assets: ["CHANGELOG.md"],
        message: 'chore(release): #autops# Release ${nextRelease.version} [skip ci]'
      }],
      '@semantic-release/gitlab',
    ],
    verifyConditions: false,
    verifyRelease: false,
    publish: false,
    tagFormat: '${version}',
  };

Expected behavior

Ideally commit should be included in CHANGELOG.md

semantic-release version

23.0.2

CI environment

Gitlab

Plugins used

No response

semantic-release configuration

module.exports = {
    branches: ["main"],
    plugins: [
      ['@semantic-release/commit-analyzer', {
          preset: 'angular',
          releaseRules: [
            { breaking: true, release: 'major' },
            { revert: true, release: 'patch' },
            { type: 'feat', release: 'minor' },
            { type: 'fix', release: 'patch' },
            { type: 'chore', release: 'patch' },
            { type: 'docs', release: 'patch' },
          ],
        },
      ],
      ["@semantic-release/changelog", {
        changelogFile: "CHANGELOG.md",
      }],
      '@semantic-release/release-notes-generator',
      ['@semantic-release/git', {
        assets: ["CHANGELOG.md"],
        message: 'chore(release): #autops# Release ${nextRelease.version} [skip ci]'
      }],
      '@semantic-release/gitlab',
    ],
    verifyConditions: false,
    verifyRelease: false,
    publish: false,
    tagFormat: '${version}',
  };

CI logs

echo '$ semantic-release --branches main'
++ semantic-release --branches main
[10:16:48 AM] [semantic-release] › ℹ  Running semantic-release version 23.0.2
(node:154) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
[10:16:49 AM] [semantic-release] › ✔  Loaded plugin "analyzeCommits" from "@semantic-release/commit-analyzer"
[10:16:49 AM] [semantic-release] › ✔  Loaded plugin "generateNotes" from "@semantic-release/release-notes-generator"
[10:16:49 AM] [semantic-release] › ✔  Loaded plugin "prepare" from "@semantic-release/changelog"
[10:16:49 AM] [semantic-release] › ✔  Loaded plugin "prepare" from "@semantic-release/git"
[10:16:49 AM] [semantic-release] › ✔  Loaded plugin "success" from "@semantic-release/gitlab"
[10:16:49 AM] [semantic-release] › ✔  Loaded plugin "fail" from "@semantic-release/gitlab"
[10:16:52 AM] [semantic-release] › ✔  Run automated release from branch main on repository [https://gitlab-ci-token:[secure]@gitlab.com/XXXX/new.git](https://gitlab-ci-token:%5Bsecure%5D@gitlab.com/XXXX/new.git)
[10:16:52 AM] [semantic-release] › ✔  Allowed to push to the Git repository
[10:16:52 AM] [semantic-release] › ℹ  Found git tag 1.34.6 associated with version 1.34.6 on branch main
[10:16:52 AM] [semantic-release] › ℹ  Found 1 commits since last release
[10:16:52 AM] [semantic-release] › ℹ  Start step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
[10:16:52 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  **Analyzing commit: chore(deps): test chore deps commit**
[10:16:52 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  The release type for the commit is patch
[10:16:52 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analysis of 1 commits complete: patch release
[10:16:52 AM] [semantic-release] › ✔  Completed step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
[10:16:52 AM] [semantic-release] › ℹ  The next release version is 1.34.7
[10:16:52 AM] [semantic-release] › ℹ  Start step "generateNotes" of plugin "@semantic-release/release-notes-generator"
[10:16:52 AM] [semantic-release] › ✔  Completed step "generateNotes" of plugin "@semantic-release/release-notes-generator"
[10:16:52 AM] [semantic-release] › ℹ  Start step "prepare" of plugin "@semantic-release/changelog"
[10:16:52 AM] [semantic-release] [@semantic-release/changelog] › ℹ  Update /builds/XXXX/new/CHANGELOG.md
[10:16:52 AM] [semantic-release] › ✔  Completed step "prepare" of plugin "@semantic-release/changelog"
[10:16:52 AM] [semantic-release] › ℹ  Start step "prepare" of plugin "@semantic-release/git"
[10:16:52 AM] [semantic-release] [@semantic-release/git] › ℹ  Found 1 file(s) to commit
[10:16:53 AM] [semantic-release] [@semantic-release/git] › ℹ  Prepared Git release: 1.34.7
[10:16:53 AM] [semantic-release] › ✔  Completed step "prepare" of plugin "@semantic-release/git"
[10:16:53 AM] [semantic-release] › ℹ  Start step "generateNotes" of plugin "@semantic-release/release-notes-generator"
[10:16:53 AM] [semantic-release] › ✔  Completed step "generateNotes" of plugin "@semantic-release/release-notes-generator"
[10:16:55 AM] [semantic-release] › ✔  Created tag 1.34.7
[10:16:55 AM] [semantic-release] › ℹ  Start step "success" of plugin "@semantic-release/gitlab"
[10:16:55 AM] [semantic-release] [@semantic-release/gitlab] › ℹ  Verify GitLab authentication (https://gitlab.com/api/v4)
[10:16:55 AM] [semantic-release] › ✔  Completed step "success" of plugin "@semantic-release/gitlab"
[10:16:55 AM] [semantic-release] › ✔  Published release 1.34.7 on default channel
+ exit 0
Cleaning up project directory and file based variables
00:01
+ set -o
+ grep pipefail
+ set -o pipefail
+ set -o errexit
+ set +o noclobber
+ :
+ eval '$'\''rm'\'' -f /builds/XXXX/new.tmp/CI_SERVER_TLS_CA_FILE
'
++ rm -f /builds/XXXX/new.tmp/CI_SERVER_TLS_CA_FILE
+ exit 0
Job succeeded
@javedfaruquee1 javedfaruquee1 changed the title Issue with commit type "chore" Issue with commit type "chore(deps):" Feb 21, 2024
@javedfaruquee1 javedfaruquee1 changed the title Issue with commit type "chore(deps):" Issue with commit type "chore(deps):", not ending up in CHANGELOG.MD Feb 21, 2024
@BinToss
Copy link

BinToss commented Mar 18, 2024

@semantic-release/release-notes-generator must be before @semantic-release/changelog.

semantic-release/release-notes-generator is summarized as...

semantic-release plugin to generate changelog content with conventional-changelog

@BinToss
Copy link

BinToss commented Mar 18, 2024

Additionally, release-notes-generator is not receiving commit-analyzer's configuration. It's using default settings.
You may want to configure its parserOpts and writerOpts to be similar to commit-analyzer's config.
https://github.com/semantic-release/release-notes-generator#usage


Although it's not yet causing issues, you should also move preset to be defined alongside plugins and branch e.g.

    branches: ["main"],
+   preset: 'angular'
    plugins: [

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants