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

review RELEASE_TEMPLATE to constuct changelog from PR + labels #1633

Merged
merged 1 commit into from
May 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 9 additions & 21 deletions .github/RELEASE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,20 @@

Compatible with [`jormungandr@{{JORM_TAG}}`](https://github.com/input-output-hk/jormungandr/releases/tag/{{JORM_TAG}}) and [`cardano-node@{{CARDANO_NODE_TAG}}`](https://github.com/input-output-hk/cardano-node/releases/tag/{{CARDANO_NODE_TAG}}).

<!-- A CHANGELOG, organized in three sections:
- New Features
- Improvements
- Resolved Issues
## New Features
-->

## Improvements

## Resolved Issues

<!-- Fixes included in this release that were present in the previous release -->
{{CHANGELOG}}

## Known Issues

<!-- Bugs known at the moment of the release, or discovered after and not fixed -->

## Changelog


<!-- A CHANGELOG, organized in milestones. Ideally, we put it within
some <details></details> elements to avoid cluttering the release notes -->

{{CHANGELOG}}


## Weekly Reports

- [Week 12 - 2020-03-20](https://github.com/input-output-hk/cardano-wallet/tree/weekly-reports/2020-03-20)

## Documentation

<!-- A snapshot of the documentation at the time of releasing. -->
Expand Down Expand Up @@ -57,7 +45,7 @@ the moment of releasing. -->

#### Docker

Pull from DockerHub and verify version.
Pull from DockerHub and verify the version matches {{CABAL_VERSION}}

```
$ docker pull inputoutput/cardano-wallet:{{CABAL_VERSION}}-jormungandr
Expand All @@ -76,7 +64,7 @@ $ docker run --rm inputoutput/cardano-wallet:{{CABAL_VERSION}}-jormungandr versi

#### Docker

Pull from DockerHub and verify version.
Pull from DockerHub and verify the version matches {{CABAL_VERSION}}.

```
$ docker pull inputoutput/cardano-wallet:{{CABAL_VERSION}}-byron
Expand Down
32 changes: 21 additions & 11 deletions scripts/make_changelog
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,36 @@ REPO="input-output-hk/cardano-wallet"
: ${GITHUB_API_TOKEN?"Please provide a Github Api Token for fetching pull requests"}

PULL_REQUESTS=$(curl -X GET \
-H "Authorization: token $GITHUB_API_TOKEN" \
-H "Authorization: token $API_TOKEN" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/search/issues?per_page=500\&q=repo:$REPO+is:pr+is:merged+merged:%3E$1)

PULL_REQUESTS=$(echo $PULL_REQUESTS | jq '.items | map({number:.number,title:.title,milestone:.milestone.title}) | group_by(.milestone)')
PULL_REQUESTS=$(echo $PULL_REQUESTS | jq '.items | map({number:.number,title:.title,label:.labels[0].name}) | group_by(.label)')
ITEMS=$(echo $PULL_REQUESTS | jq 'map(map("#\(.number) | \(.title)"))')
MILESTONES=$(echo $PULL_REQUESTS | jq 'map(map("\(.milestone)") | unique) | flatten')
I=($(echo $MILESTONES | jq 'length - 1'))
LABELS=$(echo $PULL_REQUESTS | jq 'map(map("\(.label)") | unique) | flatten')
I=($(echo $LABELS | jq 'length - 1'))

for i in $(seq 0 $I); do
MILESTONE=$(echo $MILESTONES | jq -r ".[$i]")
echo "<details>"
echo " <summary>$MILESTONE</summary>"
LABEL=$(echo $LABELS | jq -r ".[$i]")
case $LABEL in
"null")
echo "## Unclassified"
;;
"ADDING FEATURE")
echo "## New Features"
;;
"IMPROVING CODE")
echo "## Improvements"
;;
"RESOLVING ISSUE")
echo "## Resolved Issues"
;;
esac
echo ""
echo "PR | Description"
echo "-- | --"
J=($(echo $ITEMS | jq ".[$i] | length - 1"))
for j in $(seq 0 $J); do
LINE=$(echo $ITEMS | jq -r ".[$i] | .[$j]")
echo "$LINE"
echo "- $LINE"
done
echo "</details>"
echo ""
done