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
Create release notes script to grab changes #545
Conversation
First iteration on the idea of automatically generating release notes emails that we may or may not want to send out. Example usage: ``` ./scripts/release_notes.sh ansible-service-broker-1.0.5-1 ```
scripts/release_notes.sh
Outdated
| generate_notes $1 | ||
|
|
||
|
|
||
| ### |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left this because it was kind of a pain to learn how to use curl to make requests to the GitHub API and I don't want anyone, including myself to have to go through that again if we decide we want more of this.
|
An example generated release notes: https://gist.github.com/djzager/a361f6cf302d7adce62533a1433179e9 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor changes to make it a bit more zeus friendly.
scripts/release_notes.sh
Outdated
| fi | ||
|
|
||
| if [ ! -n "$1" ]; then | ||
| echo "Must provide arg" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd say what the arg is. I.e. "Must provide start commit sha" or something more explicit. Otherwise I'll just enter "fu"
scripts/release_notes.sh
Outdated
| rm $notes_file | ||
| } | ||
|
|
||
| generate_notes $1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a comment above so it is easy to know this is the main :)
#
# MAIN
#there are some checks at the top, and if you read it top down, it's easy to forget that the main is at the bottom, etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that was a poor decision on my part.
scripts/release_notes.sh
Outdated
| GH_CURL="curl -u $GH_USER:$GH_TOKEN" | ||
| GIST_API="https://api.github.com/gists" | ||
|
|
||
| create_gist () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would probably add a comment up here to suggest these are the methods or functions for the script:
#
# FUNCTIONS
#If it looks weird leave it out, but definitely include the one for MAIN.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm skipping this in favor of moving all of the pre-checks down into main for readability.
| echo "* $detailed_commit" >> $other_file | ||
| fi | ||
| fi | ||
| done <<< "$commits" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work parsing the pr numbers and bug numbers :)
First iteration on the idea of automatically generating release notes
emails that we may or may not want to send out.
Example usage: