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

CHANGELOG.md Update Script #255

Closed
jaysonesmith opened this Issue Aug 22, 2017 · 9 comments

Comments

Projects
None yet
4 participants
@jaysonesmith
Member

jaysonesmith commented Aug 22, 2017

Summary

To ease the task of updating CHANGELOG.md files across the project, a script should be created that can be run to automatically add the needed updates.

Desired Behavior/Requirements (WIP)

  1. BASH script
  2. Follow formatting guidelines found in #251
  3. Newest first: Always insert lines at beginning of section.
  4. Utilize the current repo's directory to determine which file to update
  5. Take in change type of Removed, Added, Changed, or Fixed to match where to input line.
  6. Take in a list of at least one issue or pull request.
    • Comma delineated?
  7. Take in a list of contributor Github usernames/first & last names.
    • Optional?
    • Comma delineated?
    • Create link if not a first and last name?
  8. Add to mono repo's /scripts folder and provide instructions on how to access

Context & Motivation

Have a script across the project to use for updating would remove any formatting questions and make this task much easier/faster.

@aslakhellesoy

This comment has been minimized.

Contributor

aslakhellesoy commented Aug 22, 2017

Sounds good to me!

@mlvandijk

This comment has been minimized.

Member

mlvandijk commented Aug 22, 2017

Love this idea! (If I knew how, I'd implement it right away)
Ad 7: username would at least be available (full names might not?), a link to user would be nice
cucumber-jvm uses comma's between users (if multiple users)

@jaysonesmith

This comment has been minimized.

Member

jaysonesmith commented Aug 22, 2017

In checking at least one existing log, there have been notes like, 'credit @{username}' or just a first and last name given. (Check out the earlier section of the Aruba CHANGELOG

However, in looking at the Ruby update script, we could possibly just grab the PR data as done here, but in the bash equivalent.

@mattwynne

This comment has been minimized.

Member

mattwynne commented Aug 22, 2017

+1 for link to user @mlvandijk, and crediting multiple users would also be nice.

@jaysonesmith

This comment has been minimized.

Member

jaysonesmith commented Aug 22, 2017

@mattwynne If I utilized the data collection similar to what you've got in the Ruby script, I'll definitely include a link to the user. What's a recommended way for handling multiple? Also, what's your input on @brasmusson's comments on #251? Seems like there are a few different ways to cross this bridge.

@aslakhellesoy

This comment has been minimized.

Contributor

aslakhellesoy commented Aug 22, 2017

My suggestions:

  • Don't make use of github token mandatory, but allow users to specify it in case they get throttled. Here is how:
    https://github.com/cucumber/github-issue-stats/blob/ffd85e93651a7604aea4d55db473ad314966994c/scripts/functions.sh#L21
    Explained here: https://github.com/cucumber/github-issue-stats/blob/master/README.md
  • It's ok if the script doesn't modify the CHANGELOG.md - I'm quite happy to run chlog --message "Fixed a bad bug" --issue 224,432 --attribution aslakhellesoy,jaysonesmith | pbcopy to get a nice string on my clipboard that I can paste. That way you can ignore 3) 4) and 5) for now.
  • If --message is omitted, get the description from the first issue's title (error if --issue not specified)
  • If --issue not specified, that's ok. Some fixes don't have issues (trunk based development)
  • If --attribution is omitted, get it from the PR author(s) if specified, otherwise assume it's you (get it with git config user.username - and if that's not set - suggest setting it with git config --global user.username yourgithubuser)

So in the simplest case I can do this:

chlog -i 456 | pbcopy

And I'll get the title, the link to the issue, and attribution links to contributors

@mattwynne

This comment has been minimized.

Member

mattwynne commented Aug 23, 2017

@aslakhellesoy personally I really like the flow of having the changelog file updated automatically for me, based on tags. I guess we could have two scripts - one that generated the line, and another one that calls that first script then puts it in the correct place in the changelog.

@stale

This comment has been minimized.

stale bot commented Jan 4, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week if no further activity occurs.

@stale stale bot added the Stale label Jan 4, 2018

@stale

This comment has been minimized.

stale bot commented Jan 11, 2018

This issue has been automatically closed because of inactivity. You can support the Cucumber core team on opencollective.

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