Skip to content

Commit e01fd6b

Browse files
committed
chore(ci): improve release body
1 parent c473714 commit e01fd6b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.github/workflows/build.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,13 @@ jobs:
7070
delta=$(echo "$NEW_COMMIT_N - $OLD_COMMIT_N" | bc)
7171
echo -en "# Short summary\n\n" > body.md
7272
echo -en "Check [upstream](https://github.com//flatwhatson/emacs/commits) for more details.\n\n" >> body.md
73-
curl -s "$UPSTREAM_GH"/commits?per_page="$delta" | jq -r '.[].commit.message | capture("(?<id>.+)\n").id' | sed '/^Merge/,+1 d' | sed -r s'/(.*)/- \1/' >> body.md
73+
# What is going on here?
74+
# 1. We get the list of commits since last release
75+
# 2. We use jq to parse and retain only the commit message + its url
76+
# 3. First sed to remove "Merge" commits
77+
# 4. Second sed to remove any special char at the beginning of the message
78+
# 5. Third sed to prepend the message with "- "
79+
curl -s "$UPSTREAM_GH"/commits?per_page="$delta" | jq -r '.[].commit | (.message | capture("(?<id>.+)\n").id) + " [commit](" + .url + ")"' | sed '/^Merge/,+1 d' | sed 's/^[^[:alnum:]]*//' | sed -r 's/(.*)/- \1/' >> body.md
7480
- name: Create Release
7581
id: create_release
7682
uses: actions/create-release@v1

0 commit comments

Comments
 (0)