Skip to content

Commit

Permalink
Merge pull request #1633 from input-output-hk/KtorZ/release-template-…
Browse files Browse the repository at this point in the history
…changelog

review RELEASE_TEMPLATE to constuct changelog from PR + labels
  • Loading branch information
KtorZ authored May 7, 2020
2 parents 685d6e2 + 70a8f7e commit a218df2
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 32 deletions.
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

0 comments on commit a218df2

Please sign in to comment.