@@ -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