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

Manage the changelog automatically #505

Closed
tboerger opened this issue Dec 27, 2016 · 15 comments
Closed

Manage the changelog automatically #505

tboerger opened this issue Dec 27, 2016 · 15 comments
Labels
type/docs This PR mainly updates/creates documentation type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@tboerger
Copy link
Member

tboerger commented Dec 27, 2016

Currently writing the changelog is pretty cumbersome, we should take take the approach of Gitlab to write changelog records in yml format and automatically generate the changelog out of that. Every PR author can write a new yml file into a specific folder so that we can generate the changelog automatically. You can see the records of Gitlab at https://gitlab.com/gitlab-org/gitlab-ce/tree/master/changelogs/unreleased.

Format

I think the format used by Gitlab is already pretty fine, but I would also add a kind flag for grouping:

kind: enhancement # Possible values: breaking, feature, bugfixes, enhancement, misc
title: A short title that explains the change
pull_request: 256
issue: 234
author: tboerger
  • kind: Group the changelog records by this flag as we currently got for v1.0.0 release
  • title: A possibly short title to explain the change
  • pull_request: Optionally the number of the pull request used as a reference
  • issue: Optionally the number of the meta issue for multiple pull requests
  • author: The name of the author who contributed the change

Directories

For entirely new features I would suggest to put the file into changelog/unreleased, if it's already clear which version will be the target for this change we should put it into changelog/v1.1.0, for the filename I would suggest the format YYYYMMDD-short-title.yml.

Scripting

To generate the changelog I would like to write a Go script to scripts/ that generates the CHANGELOG.md file out of the yml files. We can even integrate this into the CI process and add a commit which includes [skip ci] in the commit message to update this on every merge on master and the release branches.

@tboerger tboerger added type/docs This PR mainly updates/creates documentation type/proposal The new feature has not been accepted yet but needs to be discussed first. labels Dec 27, 2016
@tboerger tboerger added this to the 1.1.0 milestone Dec 27, 2016
@bkcsoft
Copy link
Member

bkcsoft commented Dec 27, 2016

I don't think we need to bother with changelog/v1.1.0 etc, just seems cumbersome. For backports this will be fixed anyhow with the separate PR.

As for kind I'd like to have security as well, since those have a higher backport priority :)

As for the rest, 👍

@tboerger
Copy link
Member Author

But if you manage the changelog records within version directories you can always regenerate the entire changelog. I'm OK to put everything into unreleased and move that to a version directory directly before the release.

@bkcsoft
Copy link
Member

bkcsoft commented Dec 27, 2016

(not saying we should copy them right of but) GitLabs changelog-script removes the old files when it's done, so the versioned ones would be m00t ;)

@tboerger
Copy link
Member Author

And I don't like the Gitlab approach to simply dropping the files. You are not easily able to regenerate the changelog.

@bkcsoft
Copy link
Member

bkcsoft commented Dec 29, 2016

@tboerger that's easy, just go back in time 😆

@bkcsoft
Copy link
Member

bkcsoft commented Dec 29, 2016

but sure, lets keep them in versioned folders :)

@bkcsoft
Copy link
Member

bkcsoft commented Dec 29, 2016

for the filename I would suggest the format YYYYMMDD-short-title.yml.

I'd prefer PR#-short-title.yml :)

@bkcsoft
Copy link
Member

bkcsoft commented Dec 29, 2016

write a Go script to scripts/

as in a binary or something you go run scripts/changelog.go ? (I'm partial to the latter)

@lunny
Copy link
Member

lunny commented Dec 30, 2016

I think teabot could detect the PR merged and automatically send a PR to add a new changelog to .yml file. If teabot make a bad changelog we can add some commmits to the PR or close this PR. If we need teabot resend a PR. We can give a "RESEND PR". This will reduce many work and not conflict with above.

@bkcsoft
Copy link
Member

bkcsoft commented Jan 2, 2017

@lunny the idea is to have it done automagically on any tag-event so having the bot send a PR would be counter-productive in this case :)

@tboerger
Copy link
Member Author

I'd prefer PR#-short-title.yml :)

Than you can add it only after opening the PR.

as in a binary or something you go run scripts/changelog.go ? (I'm partial to the latter)

Use go run and add a ignore build tag.

@bkcsoft
Copy link
Member

bkcsoft commented Jan 20, 2017

Than you can add it only after opening the PR.

It usually changes during the course of a PR so it makes sense to add it later on 😉

@lunny
Copy link
Member

lunny commented Feb 5, 2017

Any PR to send for v1.1? Or should I move it to v1.2?

@lunny lunny modified the milestones: 1.2.0, 1.1.0 Feb 11, 2017
@bkcsoft
Copy link
Member

bkcsoft commented Mar 17, 2017

@tboerger I'm currently working on this, saw this one

Than you can add it only after opening the PR.

But your spec includes the PR-number as well :trollface: (I still wanna enforce PR-number on files to avoid collisions...)

@mrsdizzie
Copy link
Member

Closing in favor of #6711

@lunny lunny removed this from the 1.x.x milestone Sep 8, 2020
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/docs This PR mainly updates/creates documentation type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants