File: makechangelog.sh

package info (click to toggle)
rust-ndarray 0.16.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,028 kB
  • sloc: sh: 30; makefile: 2
file content (16 lines) | stat: -rwxr-xr-x 540 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash

# Usage: makechangelog <git commit range>
#
# This script depends on and uses the github `gh` binary
# which needs to be authenticated to use.
#
# Will produce some duplicates for PRs integrated using rebase,
# but those will not occur with current merge queue.

git log --first-parent --pretty="tformat:%H" "$@" | while IFS= read -r commit_sha
do
    gh api "/repos/:owner/:repo/commits/${commit_sha}/pulls" \
        -q ".[] | \"- \(.title) by [@\(.user.login)](\(.user.html_url)) [#\(.number)](\(.html_url))\""
done | uniq