summaryrefslogtreecommitdiff
path: root/script/release/contributors
blob: 1e69b143fe9a28ea6cacaf0711884db44380df3c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
set -e


function usage() {
    >&2 cat << EOM
Print the list of github contributors for the release

Usage:

    $0 <previous release tag>
EOM
    exit 1
}

[[ -n "$1" ]] || usage
PREV_RELEASE=$1
VERSION=HEAD
URL="https://api.github.com/repos/docker/compose/compare"

contribs=$(curl -sf "$URL/$PREV_RELEASE...$VERSION" | \
    jq -r '.commits[].author.login' | \
    sort | \
    uniq -c | \
    sort -nr)

echo "Contributions by user: "
echo "$contribs"
echo
echo "$contribs" | awk '{print "@"$2","}' | xargs