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

Create release notes script to grab changes #545

Merged
merged 3 commits into from Nov 10, 2017

Conversation

djzager
Copy link
Member

@djzager djzager commented Nov 9, 2017

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

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
```
@djzager djzager requested a review from jmrodri November 9, 2017 19:39
@openshift-ci-robot openshift-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 9, 2017
generate_notes $1


###
Copy link
Member Author

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.

@djzager
Copy link
Member Author

djzager commented Nov 9, 2017

An example generated release notes: https://gist.github.com/djzager/a361f6cf302d7adce62533a1433179e9

Copy link
Contributor

@jmrodri jmrodri left a 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.

fi

if [ ! -n "$1" ]; then
echo "Must provide arg"
Copy link
Contributor

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"

rm $notes_file
}

generate_notes $1
Copy link
Contributor

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.

Copy link
Member Author

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.

GH_CURL="curl -u $GH_USER:$GH_TOKEN"
GIST_API="https://api.github.com/gists"

create_gist () {
Copy link
Contributor

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.

Copy link
Member Author

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"
Copy link
Contributor

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 :)

@djzager
Copy link
Member Author

djzager commented Nov 10, 2017

@djzager djzager added the docs label Nov 10, 2017
@jmrodri jmrodri merged commit 2dbf23d into openshift:master Nov 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants