diffplug / diffplug/spotless-changelog

Integrate with GitHub releases

Open
#10 1 comment 1 reaction 0 assignees View on GitHub
enhancement pr-welcome
Dominant language
Java
Stars
49
Forks
2
PR merge metrics
No merged PRs in 30d

Description

It would be useful to turn [GitHub releases](https://help.github.com/en/github/administering-a-repository/managing-releases-in-a-repository) into a changelog, and vice-versa. Our [`Changelog.java`](https://github.com/diffplug/spotless-changelog/blob/master/spotless-changelog-lib/src/main/java/com/diffplug/spotless/changelog/Changelog.java) would be helpful for this. In pseudocode:

```java
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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.