2 Commits
Author SHA1 Message Date
Djeex c94da17686 Link each commit in the release changelog to its own commit page
CI / build-and-scan (pull_request) Successful in 2m11s
COMMIT_LIST only rendered the bare subject line per commit, with no
way to jump to that specific commit — only the triggering commit
(Source:) had a link. Each line now reads
"- [<short-sha>](<repo>/commit/<sha>) <subject>", matching the same
link style already used for Source.
2026-08-23 23:22:44 +02:00
Djeex 4903484aa4 Release notes: list commits instead of changed files 2026-08-23 23:22:44 +02:00
+9 -6
View File
@@ -51,10 +51,11 @@ jobs:
run: | run: |
BEFORE="${{ github.event.before }}" BEFORE="${{ github.event.before }}"
if [ -n "$BEFORE" ] && [ "$BEFORE" != "0000000000000000000000000000000000000000" ] && git cat-file -e "$BEFORE" 2>/dev/null; then if [ -n "$BEFORE" ] && [ "$BEFORE" != "0000000000000000000000000000000000000000" ] && git cat-file -e "$BEFORE" 2>/dev/null; then
CHANGED=$(git diff --name-only "$BEFORE" "${{ github.sha }}") BASE_REF="$BEFORE"
else else
CHANGED=$(git diff --name-only HEAD~1 HEAD) BASE_REF="HEAD~1"
fi fi
CHANGED=$(git diff --name-only "$BASE_REF" "${{ github.sha }}")
echo "Changed files:" echo "Changed files:"
echo "$CHANGED" echo "$CHANGED"
@@ -127,9 +128,9 @@ jobs:
fi fi
fi fi
CHANGED_LIST=$(echo "$CHANGED" | sed 's/^/- /')
REPO_URL="https://git.djeex.fr/Djeex/socat-proxy" REPO_URL="https://git.djeex.fr/Djeex/socat-proxy"
COMMIT_LIST=$(git log --no-merges --format="- [%h](${REPO_URL}/commit/%H) %s" "$BASE_REF".."${{ github.sha }}")
SHORT_SHA=$(echo "${{ github.sha }}" | cut -c1-7) SHORT_SHA=$(echo "${{ github.sha }}" | cut -c1-7)
SOURCE_LINE="[${SHORT_SHA}](${REPO_URL}/commit/${{ github.sha }})" SOURCE_LINE="[${SHORT_SHA}](${REPO_URL}/commit/${{ github.sha }})"
if [ -n "$PR_NUM" ]; then if [ -n "$PR_NUM" ]; then
@@ -138,15 +139,17 @@ jobs:
BODY=$(cat <<EOF BODY=$(cat <<EOF
## Changelog ## Changelog
---
### ${CATEGORY} ### ${CATEGORY}
---
${CHANGE_TITLE} ${CHANGE_TITLE}
**Source:** ${SOURCE_LINE} **Source:** ${SOURCE_LINE}
**Image:** \`${IMAGE}:${VERSION}\` **Image:** \`${IMAGE}:${VERSION}\`
**Changed files:** **Commits:**
${CHANGED_LIST} ${COMMIT_LIST}
EOF EOF
) )