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

Integrate with GitHub releases #10

Open
nedtwigg opened this issue May 13, 2020 · 0 comments
Open

Integrate with GitHub releases #10

nedtwigg opened this issue May 13, 2020 · 0 comments
Labels
enhancement New feature or request pr-welcome We doesn't plan to build, but are happy to merge

Comments

@nedtwigg
Copy link
Member

It would be useful to turn GitHub releases into a changelog, and vice-versa. Our Changelog.java would be helpful for this. In pseudocode:

import com.diffplug.spotless.changelog.Changelog;
import com.diffplug.spotless.changelog.Changelog.VersionEntry;

// this won't compile, but the main APIs are already present
Changelog empty = new Changelog("## [Unreleased]\n");
Changelog withGitHub = empty.withMutatedVersions(versions -> {
  for (GitHubRelease r : GitHubApi.releases()) {
    versions.add(VersionEntry.versionDate(r.version(), r.date())
      .setChanges(r.releaseNotes()));
  }
})
System.out.println(withGitHub.toStringUnix());

We'd be happy to merge any PRs which add GitHub integration (in either direction) into spotless-changelog-lib. Once that has been accomplished, we'd be happy to merge any PRs which add GitHub-related functionality into the gradle plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request pr-welcome We doesn't plan to build, but are happy to merge
Projects
None yet
Development

No branches or pull requests

1 participant