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

Feature: add option to skip changelog generation #18

Closed
1 of 2 tasks
brandonroberts opened this issue Aug 16, 2023 · 3 comments · Fixed by #23
Closed
1 of 2 tasks

Feature: add option to skip changelog generation #18

brandonroberts opened this issue Aug 16, 2023 · 3 comments · Fixed by #23

Comments

@brandonroberts
Copy link

Type of feature

🍕 Feature

Current behavior

Currently, as part of the release process, a changelog is generated with the release commit.

This feature would allow you to configure a flag to skip changelog generation, and only apply the release commit and semantic version. The default would remain as-is today.

Suggested solution

No response

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Contributing Docs

  • I agree to follow this project's Contribution Docs
@0-vortex
Copy link
Contributor

IMHO this could be done without committing a breaking change, by leveraging a new environment variable:

const {
  GITHUB_SHA,
  GITHUB_REPOSITORY,
  GITHUB_REF,
  GIT_COMMITTER_NAME,
  GIT_COMMITTER_EMAIL,
  GIT_AUTHOR_NAME,
  GIT_AUTHOR_EMAIL,
  SETTINGS_CHANGELOG
} = process.env;

.. and setting it to true unless it's specifically defined:

!GIT_COMMITTER_NAME && (process.env.GIT_COMMITTER_NAME = "open-sauced[bot]");
!GIT_COMMITTER_EMAIL && (process.env.GIT_COMMITTER_EMAIL = "63161813+open-sauced[bot]@users.noreply.github.com");
!SETTINGS_CHANGELOG && (process.env.SETTINGS_CHANGELOG = true)

.. and then adding a conditional around @semantic-release/changelog:

if (SETTINGS_CHANGELOG === true) {
  addPlugin("@semantic-release/changelog", {
    "changelogTitle": `# 📦 ${owner}/${repo} changelog
  
  
  [![conventional commits](https://img.shields.io/badge/conventional%20commits-1.0.0-yellow.svg)](https://conventionalcommits.org)
  [![semantic versioning](https://img.shields.io/badge/semantic%20versioning-2.0.0-green.svg)](https://semver.org)
  
  
  > All notable changes to this project will be documented in this file`
  });
}

Would the proposed code changes cover the requirements? 🍕

@brandonroberts
Copy link
Author

Yep, seems reasonable to me

@github-actions
Copy link

github-actions bot commented Sep 7, 2023

🎉 This issue has been resolved in version 2.4.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging a pull request may close this issue.

2 participants