@@ -71,7 +71,10 @@ export class PullRequestGenerator {
71
71
72
72
// Separate updates by type
73
73
const packageJsonUpdates = group . updates . filter ( update =>
74
- update . file === 'package.json' || ( ! update . file . includes ( '.yaml' ) && ! update . file . includes ( '.yml' ) && ! update . file . includes ( '.github/workflows/' ) ) ,
74
+ update . file === 'package.json' ,
75
+ )
76
+ const composerUpdates = group . updates . filter ( update =>
77
+ update . file . endsWith ( 'composer.json' ) || update . file . endsWith ( 'composer.lock' ) ,
75
78
)
76
79
const dependencyFileUpdates = group . updates . filter ( update =>
77
80
update . file . includes ( '.yaml' ) || update . file . includes ( '.yml' ) ,
@@ -165,6 +168,32 @@ export class PullRequestGenerator {
165
168
body += `\n`
166
169
}
167
170
171
+ // Composer packages table (simplified, without badges)
172
+ if ( composerUpdates . length > 0 ) {
173
+ body += `### PHP/Composer Dependencies\n\n`
174
+ body += `| Package | Change | File | Status |\n`
175
+ body += `|---|---|---|---|\n`
176
+
177
+ for ( const update of composerUpdates ) {
178
+ // Generate package link to Packagist
179
+ const packageUrl = `https://packagist.org/packages/${ encodeURIComponent ( update . name ) } `
180
+ const packageCell = `[${ update . name } ](${ packageUrl } )`
181
+
182
+ // Simple version change display
183
+ const change = `\`${ update . currentVersion } \` -> \`${ update . newVersion } \``
184
+
185
+ // File reference
186
+ const fileName = update . file . split ( '/' ) . pop ( ) || update . file
187
+
188
+ // Status (simple)
189
+ const status = '✅ Available'
190
+
191
+ body += `| ${ packageCell } | ${ change } | ${ fileName } | ${ status } |\n`
192
+ }
193
+
194
+ body += `\n`
195
+ }
196
+
168
197
// Dependency files table (simplified, without badges)
169
198
if ( dependencyFileUpdates . length > 0 ) {
170
199
body += `### Launchpad/pkgx Dependencies\n\n`
@@ -329,6 +358,15 @@ export class PullRequestGenerator {
329
358
body += `</details>\n\n`
330
359
}
331
360
361
+ // Process Composer updates with simple release notes
362
+ for ( const update of composerUpdates ) {
363
+ body += `<details>\n`
364
+ body += `<summary>${ update . name } </summary>\n\n`
365
+ body += `**${ update . currentVersion } -> ${ update . newVersion } **\n\n`
366
+ body += `Visit [${ update . name } ](https://packagist.org/packages/${ encodeURIComponent ( update . name ) } ) on Packagist for more information.\n\n`
367
+ body += `</details>\n\n`
368
+ }
369
+
332
370
// Process GitHub Actions updates with simple release notes (no duplicates)
333
371
for ( const update of uniqueGithubActionsUpdates ) {
334
372
body += `<details>\n`
@@ -341,7 +379,7 @@ export class PullRequestGenerator {
341
379
body += `---\n\n`
342
380
343
381
// Package statistics section (deduplicated)
344
- if ( packageInfos . size > 0 || dependencyOnlyUpdates . length > 0 || uniqueGithubActionsUpdates . length > 0 ) {
382
+ if ( packageInfos . size > 0 || composerUpdates . length > 0 || dependencyOnlyUpdates . length > 0 || uniqueGithubActionsUpdates . length > 0 ) {
345
383
body += `### 📊 Package Statistics\n\n`
346
384
347
385
// Stats for package.json updates
@@ -353,6 +391,11 @@ export class PullRequestGenerator {
353
391
}
354
392
}
355
393
394
+ // Stats for Composer updates (simplified)
395
+ for ( const update of composerUpdates ) {
396
+ body += `- **${ update . name } **: PHP package available on Packagist\n`
397
+ }
398
+
356
399
// Stats for dependency file updates (simplified, only for those not in package.json)
357
400
for ( const update of dependencyOnlyUpdates ) {
358
401
const displayName = update . name === 'bun.sh' ? 'bun.com' : update . name
0 commit comments