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

Possibility to customize changelog format #23

Open
mstachniuk opened this issue Oct 8, 2020 · 3 comments
Open

Possibility to customize changelog format #23

mstachniuk opened this issue Oct 8, 2020 · 3 comments
Labels

Comments

@mstachniuk
Copy link

Current changelog format is good for Open Source project. However for non-OSS is not important who and how much commit.
And other customizations should be possible like header, footer, date format. See: mockito/shipkit#370

The implementation may create a JSON file as mid step then everyone can generate whatever is needed.

@mockitoguy
Copy link
Contributor

I'd like to see customers asking for it first ;-) I'd like to avoid complexity and evolving the plugin into something that is hard to maintain. My experience with offering "configuration" for formatting that it is a never-ending story of expanding the configuration to support more formatting use cases.

The implementation may create a JSON file as mid step then everyone can generate whatever is needed.

This would be my preference.

Thanks for reporting!

@mockitoguy mockitoguy added enhancement New feature or request maybe and removed maybe labels Mar 21, 2021
@mockitoguy mockitoguy added maybe and removed enhancement New feature or request labels Apr 12, 2021
@beatngu13
Copy link

We at JUnit Pioneer would also appreciate customization to a certain degree:

junit-pioneer/junit-pioneer#622

Similar to GitHub's release notes generator, it would helpful to filter tags and create categories. Here is an example configuration:

# .github/release.yml

changelog:
  exclude:
    labels:
      - ignore-for-release
    authors:
      - octocat
  categories:
    - title: Breaking Changes 🛠
      labels:
        - Semver-Major
        - breaking-change
    - title: Exciting New Features 🎉
      labels:
        - Semver-Minor
        - enhancement
    - title: Other Changes
      labels:
        - "*"

Do you have any plans for such customization options?

@LunNova
Copy link
Contributor

LunNova commented May 20, 2022

In the short term, a custom changelog task works: https://github.com/MinimallyCorrect/DefaultsPlugin/blob/main/src/main/java/dev/minco/gradle/changelog/ChangelogTask.java

// task linked above already registered as mincoGenerateChangelog

tasks.named("mincoGenerateChangelog") {
	version.value("" + project.version)
	githubUrl.value(project.ext["githubUrl"] as String)
	outputFile.fileValue(project.file("$buildDir/changelog.md"))
	fromRevision.value(project.ext["shipkit-auto-version.previous-tag"] as String)
}

tasks.named("githubRelease") {
	def genTask = tasks.named("mincoGenerateChangelog").get()
	dependsOn(genTask)
	repository = project.ext["githubOwnerProject"] as String
	changelog = genTask.outputFile.get().getAsFile()
	newTagRevision = System.getenv("GITHUB_SHA")
	githubToken = System.getenv("GITHUB_TOKEN")
}

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

No branches or pull requests

4 participants