Skip to content

Commit 1a8a4b8

Browse files
committed
Merge branch 'main' into develop
2 parents 26ede25 + ece2a73 commit 1a8a4b8

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

.github/workflows/release-management.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,10 @@ jobs:
103103
# Read the summary file
104104
SINCE_SUMMARY=$(cat /tmp/since-tags-summary.md)
105105
106-
# Properly escape the content for GitHub Actions
107-
SINCE_SUMMARY="${SINCE_SUMMARY//'%'/'%25'}"
108-
SINCE_SUMMARY="${SINCE_SUMMARY//$'\n'/'%0A'}"
109-
SINCE_SUMMARY="${SINCE_SUMMARY//$'\r'/'%0D'}"
106+
# Replace @ with ` to prevent GitHub from interpreting as user mentions
107+
SINCE_SUMMARY=$(echo "$SINCE_SUMMARY" | sed 's/@since/`@since`/g')
110108
111-
# Set the output
109+
# Set the output without any encoding (we'll handle that in the release notes step)
112110
echo "has_updates=true" >> $GITHUB_OUTPUT
113111
echo "summary<<EOF" >> $GITHUB_OUTPUT
114112
echo "$SINCE_SUMMARY" >> $GITHUB_OUTPUT
@@ -177,10 +175,14 @@ jobs:
177175
# Set the content for GitHub Actions output
178176
# Properly escape the content for GitHub Actions
179177
RELEASE_NOTES=$(cat /tmp/release-notes/release_notes.md)
178+
179+
# First escape GitHub Actions special characters
180180
RELEASE_NOTES="${RELEASE_NOTES//'%'/'%25'}"
181-
RELEASE_NOTES="${RELEASE_NOTES//$'\n'/'%0A'}"
182181
RELEASE_NOTES="${RELEASE_NOTES//$'\r'/'%0D'}"
183182
183+
# Then handle newlines last to prevent double-escaping
184+
RELEASE_NOTES="${RELEASE_NOTES//$'\n'/'%0A'}"
185+
184186
echo "content<<EOF" >> $GITHUB_OUTPUT
185187
echo "$RELEASE_NOTES" >> $GITHUB_OUTPUT
186188
echo "EOF" >> $GITHUB_OUTPUT

scripts/update-since-tags.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@ function generateReleaseNotesSummary(results) {
134134
return '';
135135
}
136136

137-
let summary = '### @since Tag Updates\n\n';
138-
summary += `Updated ${results.totalUpdated} @since placeholder`;
137+
let summary = '### Since Tag Updates\n\n';
138+
summary += `Updated ${results.totalUpdated} \`@since\` placeholder`;
139139
summary += results.totalUpdated === 1 ? '' : 's';
140140
summary += ' in the following files:\n\n';
141141

0 commit comments

Comments
 (0)