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

Synchronize GitHub Releases with the in-repo changelog #811

Merged
merged 5 commits into from
Sep 7, 2020

Conversation

pietroalbini
Copy link
Member

This PR adds a new handler to triagebot that synchronizes the GitHub Releases with the changelog present inside a repository itself. It's meant to be used for rustc, but it's designed to be easily extensible. Namely, I want to implement support for keep a changelog to synchronize rustwide's changelog in a future PR.

The handler can be enabled by adding this snippet to a triagebot.toml:

[github-releases]
format = "rustc"
project-name = "Rust"
changelog-path = "RELEASES.md"
changelog-branch = "master"

The handler will run when either a new tag is pushed, or when a new commit on the changelog-branch branch is pushed. It will create releases named "{project-name} {tag}" with the relevant section of the changelog as their body. It will also automatically update old releases if the changelog was updated after the fact.

The only supported format right now is rustc, which maps to rustc's RELEASES.md file. It's possible to add new formats by changing the src/changelogs/ module, so this handle can be used for other Rust projects too.

You can see the result of running this in my fork of rustc.

This PR is best reviewed commit-by-commit.
r? @Mark-Simulacrum

@pietroalbini
Copy link
Member Author

A future improvement would be to check the diff and only run this on push if the changelog-path file is changed, instead of every push.

Copy link
Member

@Mark-Simulacrum Mark-Simulacrum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall.

@Mark-Simulacrum
Copy link
Member

@pietroalbini to confirm -- this should be good to merge, right? No outstanding problems?

@pietroalbini
Copy link
Member Author

There are no outstanding problems I can see, no.

@Mark-Simulacrum Mark-Simulacrum merged commit 87d3faf into rust-lang:master Sep 7, 2020
@pietroalbini pietroalbini deleted the github-releases branch September 8, 2020 08:25
@pietroalbini
Copy link
Member Author

tmandry added a commit to tmandry/rust that referenced this pull request Sep 9, 2020
…k-Simulacrum

Enable GitHub Releases synchronization

This PR enables the triagebot feature to automatically populate [GitHub Releases](https://github.com/rust-lang/rust/releases) for this repository based on the changelog. See rust-lang/triagebot#811 for the implementation of this feature on triagebot's side, and more insights on how it works.

Note: once this lands people subscribed to the ~~firehose~~ rust-lang/rust repository will probably receive a ton of notifications for all the releases being created, but this should be a one-time thing.

r? @Mark-Simulacrum
cc @rust-lang/release
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

Successfully merging this pull request may close these issues.

2 participants