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

Support auto gen of the changelog.md #382

Closed
ryaneberly opened this issue Jul 30, 2017 · 12 comments
Closed

Support auto gen of the changelog.md #382

ryaneberly opened this issue Jul 30, 2017 · 12 comments
Assignees

Comments

@ryaneberly
Copy link
Contributor

No description provided.

@ryaneberly ryaneberly self-assigned this Jul 30, 2017
ryaneberly added a commit that referenced this issue Jul 30, 2017
@ryaneberly
Copy link
Contributor Author

gradlew gitChangelogTask
to rebuild the CHANGELOG.MD from the tags on github.

it will be more accurate next release, since we are using github releases (and maven) moving forward.

@TheRealAgentK
Copy link
Collaborator

Can we customise this or have chunks of text in there that allows us to add additional info?

I've just added an "overview blurb" on top of the file and it'd be great if we had a way to combine generated issue lists with more manual content.

@ryaneberly
Copy link
Contributor Author

I agree. I don't' think that is supported with the current one I grabbed.

There's one written in ruby which does:
https://github.com/skywinder/github-changelog-generator

I was trying to keep it simple. But it does need to be useful too

@ryaneberly ryaneberly removed their assignment Aug 9, 2017
@TheRealAgentK TheRealAgentK self-assigned this Aug 9, 2017
@TheRealAgentK TheRealAgentK added this to the 1.3.0 milestone Aug 9, 2017
ryaneberly added a commit that referenced this issue Aug 10, 2017
* Remove dependency copying (#376)

There doesn't seem to be a reason to have this phase. Perhaps there was
one before? All the required dependencies are added to the final JAR by
the `maven-shade-plugin` in the `package` phase anyway. This dependency
copying just seems like a waste of time.

* Add .editorconfig

Provides common whitespace settings for all editors. Supported out of
the box in some IDE's (like IntelliJ IDEA) and all others have
appropriate plugins.

*  Added .cflintrc schema and output schemas for JSON and XML. Tweaked README. (#377)

Added .cflintrc schema and output schemas for JSON and XML. Tweaked README.

* support autochange

* #382

* Align Gradle dependencies with Maven ones (#378)

Define the same set (and scopes) of dependencies for Gradle builds as we
have now in Maven's `pom.xml`.

* Added some context to the changelog for 1.2.0 and removed a lot of "##### no issues" items that were added to the list.

* Changed setting for auto-adding a final new line, that screws up expected files for tests.

* #383 Changed code, test, README with the output sample and JSON schema.

* Update timestamp type in result schemas

* #385 Two small modifications to HTML report

* Changed build versions to 1.2.1-SNAPSHOT in dev branch and change documentation to 1.2.1 in dev branch.

* 390 Add Implementation-Version to MANIFEST

Configures the Maven and Gradle builds to include
`Implementation-Version` in the MANIFEST.MF file, which can then be read
by the application and displayed to the user.

* #385 - Further HTML report improvements

* #390 - Adapting new way to grab version string

* #390 - Hopefully fixing Gradle build

* #390 - Review changes

* #396 fixed

* Update README.md

Explains how to pass multiple arguments in the command line in Windows Powershell and fixes a typo.

Fixes #400

* Update CODE_OF_CONDUCT.md

* #380 fixed

* Added VS Code info. Some cleanup.

* use cfparser 2.4.11

* #408

* #373

* #367

* #367

* add sonatype repo

* merged master

* cfparser 2.5.0

* Added test for #359 showing parsing error gone with cfparser 2.5.0

* #359 use parseCFMLExpression

* fix tests

* test for #346

* #413

* fix test

* fix javadoc
@ryaneberly ryaneberly removed this from the 1.3.0 milestone Dec 24, 2017
@TheRealAgentK
Copy link
Collaborator

Just looking into this now. I'll give this Ruby gem a go and see how it goes. It'd be slightly annoying as it won't be nicely integrated into Gradle.

And option might be to just continue to use the existing plugin and add a few lines of "commentary" - non-generated - to README.

@TheRealAgentK
Copy link
Collaborator

TheRealAgentK commented Dec 30, 2017

Ok, this is possible to do.

After installing the package, updating ruby and gem and whateverelse...

It would need to be run with:

github_changelog_generator -u cflint -p CFLint --token <githubtoken> --output CHANGELOGNEW.md --base CHANGELOG.md --no-unreleased --since-tag <previousTag> --header-label

Essentially it'll then just keep everything from CHANGELOG (including manual additions and overview/summaries for a release) and prepend the file with the new information, write it to CHANGELOGNEW. Then, the manual bits get added to CHANGELOGNEW, rename and put in place, commit etc for release.

Still a manual step involved, but I guess as soon as we'd want to have a more humanised overview instead of just a list of issues fixed, that's unavoidable.

I'm happy to do it for the 1.3 release, let me know what you think. @ryaneberly @KamasamaK

@ryaneberly
Copy link
Contributor Author

ryaneberly commented Dec 30, 2017

@TheRealAgentK
Ideally the changelog gen is just be another step in the (gradle) deploy process.

If github_changelog_generator works well for us, go for it. I like the consistency of something mostly automated.

@TheRealAgentK
Copy link
Collaborator

TheRealAgentK commented Dec 31, 2017

I've got it (somewhat clunky) integrated with Gradle in a feature branch. Because it executes binaries/shell scripts from Gradle, I can't really build/test it for Windows and my OS X solution relies on tools like awk, tail and a proper shell to be there. Not sure what you can do there on the Windows end.

Will bundle it up and push with an initial changelog (containing the "old" manual commentary) in that branch.

The old solution is still there, moved it from "other" into "documentation" group in Gradle, though.

@TheRealAgentK
Copy link
Collaborator

TheRealAgentK commented Dec 31, 2017

This has been (non-destructively) merged into dev - please have a look... Some more commentary in the PR ticket:

#512

And this is an example of the new Changelog file (based on dev branch):

https://github.com/cflint/CFLint/blob/dev/CHANGELOG.md

If we think this is too clunky and too hard, easy enough to remove again.

@ryaneberly
Copy link
Contributor Author

That's pretty high class documentation for a couple of part-timers like us. 👍

@TheRealAgentK
Copy link
Collaborator

@ryaneberly did you just take over the changelog from dev and rename/change the links from 1.3.0-RC2 to 1.3.0 for the first section? I think that's caused a bunch of stuff to be missed because of when I ran the changelog in the 382 branch, it wouldn't have had access to certain thing that happened in the meantime in the master and dev branches.

I think the process has to be:

  1. Decision to "release" a certain master changeset as x.y.z
  2. Be on this changeset with an empty working copy
  3. Run changelog script before creating the x.y.z tag
  4. Commit the new changelog file
  5. Tag with x.y.z.

Currently any deviation from this process will cause inconsistencies. Also - I think tags for releases or betas/rc always should be done on master - I think that's what we've been doing anyway though.

I'm transplanting the 382 changes into master manually now and will re-run the changelog in there.

TheRealAgentK added a commit to TheRealAgentK/CFLint that referenced this issue Jan 1, 2018
TheRealAgentK added a commit that referenced this issue Jan 1, 2018
Fix changelog for 1.3.0 and transplanting #382 work into master
@TheRealAgentK
Copy link
Collaborator

TheRealAgentK commented Jan 1, 2018

The new changelog generator is now independent of hardcoded paths in the code/gradle file and relies on a not-to-be-committed (and already .gitignored in master/dev) user.properties file in the project root.

Content needs to be:

user.githubChanglogGeneratorBinary=<absolute path to github_changelog_generator binary>
user.githubToken=<your github token>

In my case (Using rbenv to manage multiple Ruby/Gem setups on my Mac) this looks like (redacted my Github token for obvious reasons) :

user.githubChanglogGeneratorBinary=/Users/kai/.rbenv/shims/github_changelog_generator
user.githubToken=<kai's token>

All the code and gradle changes are now in master and dev of the main repo and can be used. Until we've worked out the kinks around Win/Mac/Linux and process, you can just let me know to help with a beta/rc/final release :)

@ryaneberly
Copy link
Contributor Author

@TheRealAgentK, you up for generating the changelog for 1.4.0?

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

No branches or pull requests

2 participants