File: generate-changelog.sh

package info (click to toggle)
easymock 4.0.2-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,732 kB
  • sloc: java: 14,510; xml: 2,129; sh: 144; makefile: 6
file content (17 lines) | stat: -rwxr-xr-x 442 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash

if [ "$#" -ne 2 ]; then
    echo "Usage: ./generate-changelog.sh user/repo <milestone>"
    exit 1
fi

repository=$1
milestone=$2

IFS=$'\n'
echo "Change log"
echo "----------"

for i in $(curl -s "https://api.github.com/repos/${repository}/issues?milestone=${milestone}&state=closed" | jq -c '.[] | [.html_url, .number, .title]'); do
    echo $i | sed 's/\["\(.*\)",\(.*\),\"\(.*\)\"\]/* \3 ([#\2](\1))/' | sed 's/\\"/"/g'
done