Skip to content

Commit

Permalink
release: add closed tickets section to changelog
Browse files Browse the repository at this point in the history
Include a list of closed tickets in the generated changelog. Fetch the
ticket titles using hut. GraphQL via raw curl is too rough for a shell
script.

Signed-off-by: Robin Jarry <[email protected]>
  • Loading branch information
rjarry committed Jan 14, 2025
1 parent b5bfc0f commit e2fef9c
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions contrib/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,23 @@ changelog() {
$wrap
fi
done
format="%(trailers:key=Fixes,key=Closes,key=Implements,unfold,valueonly)"
if git log --format="$format" $prev_tag.. | grep -q "^https://todo.sr.ht"; then
if [ "$first" = true ]; then
first=false
else
echo
fi
echo "$title_prefix Closed Tickets"
echo
git log --format="$format" $prev_tag.. |
grep "^https://todo.sr.ht" | sort -u |
while read -r url; do
title=$(hut todo ticket show "$url" | head -n1) &&
id=$(basename "$url") &&
echo "- [#$id: $title]($url)"
done
fi
}

echo "======= Determining next version..."
Expand Down

0 comments on commit e2fef9c

Please sign in to comment.