Skip to content

Instantly share code, notes, and snippets.

@drench
Created January 17, 2017 20:35
Show Gist options
  • Save drench/5bec9926fc4c3591ad73f5cb51dc8ec5 to your computer and use it in GitHub Desktop.
Save drench/5bec9926fc4c3591ad73f5cb51dc8ec5 to your computer and use it in GitHub Desktop.
This generate a list of PR merges between `develop` and the current branch in markdown, suitable for pasting into a PR
#!/bin/sh
git log develop.. | egrep '\(#\d+\)$' | while read LINE; do
pr=$(echo $LINE | sed -E 's/^.+\(#//' | sed -E 's/\)$//')
desc=$(echo $LINE | sed -E 's/ *\(#[0-9]+\)$//')
echo "$pr\t$desc"
done | sort -n |
while read LINE; do
pr=$(echo $LINE | cut -d' ' -f1)
desc=$(echo $LINE | cut -d' ' -f2-)
echo '*' https://github.com/tablexi/nucore-open/pull/$pr
echo $desc
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment