Skip to content

Commit c311b6d

Browse files
committed
- update summary for @since tag replacements
1 parent 1a8a4b8 commit c311b6d

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

.github/workflows/release-management.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,7 @@ jobs:
103103
# Read the summary file
104104
SINCE_SUMMARY=$(cat /tmp/since-tags-summary.md)
105105
106-
# Replace @ with ` to prevent GitHub from interpreting as user mentions
107-
SINCE_SUMMARY=$(echo "$SINCE_SUMMARY" | sed 's/@since/`@since`/g')
106+
# No need to modify the summary here as it's already properly formatted from the script
108107
109108
# Set the output without any encoding (we'll handle that in the release notes step)
110109
echo "has_updates=true" >> $GITHUB_OUTPUT

scripts/update-since-tags.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const chalk = require('chalk');
66
/**
77
* Find files containing @since todo tags
88
*/
9-
async function findSinceTodoFiles(pattern = 'src/**/*.php') {
9+
async function findSinceTodoFiles(pattern) {
1010
try {
1111
console.log(chalk.blue('\nScanning for @since placeholder tags...'));
1212
console.log(chalk.gray('Looking for files matching pattern:', pattern));
@@ -26,7 +26,8 @@ async function findSinceTodoFiles(pattern = 'src/**/*.php') {
2626
'docs/**'
2727
],
2828
dot: false,
29-
cwd: process.cwd()
29+
cwd: process.cwd(),
30+
absolute: true // Get absolute paths
3031
});
3132

3233
console.log(chalk.gray(`Found ${files.length} PHP files to scan`));
@@ -107,6 +108,7 @@ async function updateAllSinceTags(version, pattern = '**/*.php') {
107108
}
108109

109110
const files = await findSinceTodoFiles(pattern);
111+
console.log(chalk.gray('Files to process:', files));
110112

111113
for (const file of files) {
112114
try {
@@ -140,13 +142,16 @@ function generateReleaseNotesSummary(results) {
140142
summary += ' in the following files:\n\n';
141143

142144
results.updated.forEach(({ file, count }) => {
143-
summary += `- \`${file}\` (${count} update${count === 1 ? '' : 's'})\n`;
145+
// Get the relative path from the project root
146+
const relativePath = path.relative(process.cwd(), file);
147+
summary += `- \`${relativePath}\` (${count} update${count === 1 ? '' : 's'})\n`;
144148
});
145149

146150
if (results.errors.length > 0) {
147151
summary += '\n#### Errors\n\n';
148152
results.errors.forEach(({ file, error }) => {
149-
summary += `- Failed to update \`${file}\`: ${error}\n`;
153+
const relativePath = path.relative(process.cwd(), file);
154+
summary += `- Failed to update \`${relativePath}\`: ${error}\n`;
150155
});
151156
}
152157

0 commit comments

Comments
 (0)