Skip to content

Commit 5a6d2a3

Browse files
committed
tweaks
1 parent d036bf9 commit 5a6d2a3

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

.github/workflows/rust-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,9 +189,9 @@ jobs:
189189
190190
# Generate unified changelog for PR body
191191
if [ -z "$COMMIT_RANGE" ]; then
192-
CHANGELOG=$(./rust/scripts/generate-workspace-changelog.sh)
192+
CHANGELOG=$(./rust/scripts/generate-workspace-changelog.sh --no-header)
193193
else
194-
CHANGELOG=$(./rust/scripts/generate-workspace-changelog.sh "$COMMIT_RANGE")
194+
CHANGELOG=$(./rust/scripts/generate-workspace-changelog.sh "$COMMIT_RANGE" --no-header)
195195
fi
196196
197197
# Save changelog to file for PR body

rust/scripts/generate-workspace-changelog.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,11 +143,14 @@ done
143143
# Function to generate changelog for a specific workspace
144144
generate_workspace_changelog() {
145145
local workspace="$1"
146+
local include_header="${2:-true}" # Default to including header
146147
local workspace_file=$(echo "$workspace" | tr '/' '_')
147148

148149
if [ -f "$TEMP_DIR/$workspace_file" ]; then
149-
echo "### $workspace"
150-
echo ""
150+
if [ "$include_header" = "true" ]; then
151+
echo "### $workspace"
152+
echo ""
153+
fi
151154
sort -u "$TEMP_DIR/$workspace_file" | while IFS='|' read -r ws msg hash; do
152155
echo "* $msg (#$hash)"
153156
done
@@ -178,7 +181,7 @@ if [ "$UPDATE_CHANGELOGS" = true ]; then
178181
fi
179182

180183
# Generate changelog content for this workspace (no header)
181-
WORKSPACE_CHANGELOG=$(generate_workspace_changelog "$workspace")
184+
WORKSPACE_CHANGELOG=$(generate_workspace_changelog "$workspace" false)
182185

183186
if [ -z "$WORKSPACE_CHANGELOG" ]; then
184187
continue

0 commit comments

Comments
 (0)