Skip to content

Commit

Permalink
Merge pull request #4983 from input-output-hk/newhoggy/script-to-gene…
Browse files Browse the repository at this point in the history
…rate-merge-summary

Script to generate merge summary
  • Loading branch information
newhoggy committed Mar 15, 2023
2 parents 418aa1c + 80c328d commit 95aa2a2
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions scripts/gen-merge-summary.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env bash

since="$1"
until="$(date -d "$since +7 days" +%Y-%m-%d)"

echo "# Merge summary for $since to $until"

git log --merges --since $since --until $until --format=fuller \
| jc --git-log -p \
| jq -r '
.[]
| select(.author != "iohk-bors[bot]")
| (.subject = (.message | split("\n"))[0])
| (.body = (.message | split("\n") | del(.[0]) | del(.[0]) | join("\n")))
| select(.subject | startswith("Merge pull request #"))
| (.subject |= sub("^.*#"; ""))
| ("- [" + (.body | gsub("\n.*"; "")) + "](https://github.com/input-output-hk/cardano-node/pull/" + .subject + ") (" + .author + ")")
'

0 comments on commit 95aa2a2

Please sign in to comment.