Skip to content

Commit c705cd2

Browse files
committed
chore: minor adjustments
1 parent 152a2a4 commit c705cd2

File tree

3 files changed

+34
-25
lines changed

3 files changed

+34
-25
lines changed

.github/workflows/buddy-bot.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ jobs:
157157
!.git
158158
key: buddy-bot-workspace-${{ github.sha }}
159159

160-
# Rebase check job (formerly buddy-check.yml)
160+
# Rebase check job
161161
rebase-check:
162162
runs-on: ubuntu-latest
163163
needs: [determine-jobs, setup]
@@ -239,7 +239,7 @@ jobs:
239239
echo "" >> $GITHUB_STEP_SUMMARY
240240
echo "📋 View detailed logs above for rebase results." >> $GITHUB_STEP_SUMMARY
241241
242-
# Dependency update job (formerly buddy-update.yml)
242+
# Dependency update job
243243
dependency-update:
244244
runs-on: ubuntu-latest
245245
needs: [determine-jobs, setup]
@@ -349,7 +349,7 @@ jobs:
349349
echo "" >> $GITHUB_STEP_SUMMARY
350350
echo "📊 View detailed logs above for scan and update results." >> $GITHUB_STEP_SUMMARY
351351
352-
# Dashboard update job (formerly buddy-dashboard.yml)
352+
# Dashboard update job
353353
dashboard-update:
354354
runs-on: ubuntu-latest
355355
needs: [determine-jobs, setup, dependency-update]

src/pr/pr-generator.ts

Lines changed: 28 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -81,21 +81,19 @@ export class PullRequestGenerator {
8181

8282
let body = `This PR contains the following updates:\n\n`
8383

84-
// Add summary table
85-
if (group.updates.length > 1) {
86-
body += `## 📦 Package Updates Summary\n\n`
87-
body += `| Type | Count |\n`
88-
body += `|------|-------|\n`
89-
if (packageJsonCount > 0)
90-
body += `| 📦 NPM Packages | ${packageJsonCount} |\n`
91-
if (dependencyFileCount > 0)
92-
body += `| 🔧 System Dependencies | ${dependencyFileCount} |\n`
93-
if (githubActionsCount > 0)
94-
body += `| 🚀 GitHub Actions | ${githubActionsCount} |\n`
95-
if (composerCount > 0)
96-
body += `| 🎼 Composer Packages | ${composerCount} |\n`
97-
body += `| **Total** | **${group.updates.length}** |\n\n`
98-
}
84+
// Add summary table (always show for clarity)
85+
body += `## 📦 Package Updates Summary\n\n`
86+
body += `| Type | Count |\n`
87+
body += `|------|-------|\n`
88+
if (packageJsonCount > 0)
89+
body += `| 📦 NPM Packages | ${packageJsonCount} |\n`
90+
if (dependencyFileCount > 0)
91+
body += `| 🔧 System Dependencies | ${dependencyFileCount} |\n`
92+
if (githubActionsCount > 0)
93+
body += `| 🚀 GitHub Actions | ${githubActionsCount} |\n`
94+
if (composerCount > 0)
95+
body += `| 🎼 Composer Packages | ${composerCount} |\n`
96+
body += `| **Total** | **${group.updates.length}** |\n\n`
9997

10098
// Separate updates by type
10199
const packageJsonUpdates = group.updates.filter(update =>
@@ -145,7 +143,9 @@ export class PullRequestGenerator {
145143
// Package.json updates table (with full badges)
146144
if (packageJsonUpdates.length > 0) {
147145
body += `## 📦 npm Dependencies\n\n`
148-
if (packageJsonUpdates.length > 1) {
146+
if (packageJsonUpdates.length === 1) {
147+
body += `*${packageJsonUpdates.length} package will be updated*\n\n`
148+
} else if (packageJsonUpdates.length > 1) {
149149
body += `*${packageJsonUpdates.length} packages will be updated*\n\n`
150150
}
151151
body += `| Package | Change | Age | Adoption | Passing | Confidence |\n`
@@ -224,7 +224,12 @@ export class PullRequestGenerator {
224224
}
225225
}
226226

227-
body += `### PHP/Composer Dependencies\n\n`
227+
body += `## 🎼 PHP/Composer Dependencies\n\n`
228+
if (uniqueComposerUpdates.length === 1) {
229+
body += `*${uniqueComposerUpdates.length} package will be updated*\n\n`
230+
} else if (uniqueComposerUpdates.length > 1) {
231+
body += `*${uniqueComposerUpdates.length} packages will be updated*\n\n`
232+
}
228233
body += `| Package | Change | Age | Adoption | Passing | Confidence | Type | Update |\n`
229234
body += `|---|---|---|---|---|---|---|---|\n`
230235

@@ -273,7 +278,9 @@ export class PullRequestGenerator {
273278
body += `## 🔧 System Dependencies\n\n`
274279

275280
const uniqueFiles = [...new Set(dependencyFileUpdates.map(u => u.file))]
276-
if (dependencyFileUpdates.length > 1) {
281+
if (dependencyFileUpdates.length === 1) {
282+
body += `*${dependencyFileUpdates.length} package will be updated in \`${uniqueFiles[0].split('/').pop()}\`*\n\n`
283+
} else if (dependencyFileUpdates.length > 1) {
277284
body += `*${dependencyFileUpdates.length} packages will be updated across ${uniqueFiles.length} file(s): ${uniqueFiles.map(f => `\`${f.split('/').pop()}\``).join(', ')}*\n\n`
278285
}
279286

@@ -318,7 +325,9 @@ export class PullRequestGenerator {
318325
if (uniqueGithubActionsUpdates.length > 0) {
319326
body += `## 🚀 GitHub Actions\n\n`
320327

321-
if (uniqueGithubActionsUpdates.length > 1) {
328+
if (uniqueGithubActionsUpdates.length === 1) {
329+
body += `*${uniqueGithubActionsUpdates.length} action will be updated*\n\n`
330+
} else if (uniqueGithubActionsUpdates.length > 1) {
322331
body += `*${uniqueGithubActionsUpdates.length} actions will be updated*\n\n`
323332
}
324333

src/setup.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1246,7 +1246,7 @@ ${generateComposerSetupSteps()}
12461246
git config --global user.name "github-actions[bot]"
12471247
git config --global user.email "github-actions[bot]@users.noreply.github.com"
12481248
1249-
# Rebase check job (formerly buddy-check.yml)
1249+
# Rebase check job
12501250
rebase-check:
12511251
runs-on: ubuntu-latest
12521252
needs: [determine-jobs, setup]
@@ -1328,7 +1328,7 @@ ${generateComposerSetupSteps()}
13281328
echo "" >> \$GITHUB_STEP_SUMMARY
13291329
echo "📋 View detailed logs above for rebase results." >> \$GITHUB_STEP_SUMMARY
13301330
1331-
# Dependency update job (formerly buddy-update.yml)
1331+
# Dependency update job
13321332
dependency-update:
13331333
runs-on: ubuntu-latest
13341334
needs: [determine-jobs, setup]
@@ -1426,7 +1426,7 @@ ${generateComposerSetupSteps()}
14261426
echo "" >> \$GITHUB_STEP_SUMMARY
14271427
echo "📊 View detailed logs above for scan and update results." >> \$GITHUB_STEP_SUMMARY
14281428
1429-
# Dashboard update job (formerly buddy-dashboard.yml)
1429+
# Dashboard update job
14301430
dashboard-update:
14311431
runs-on: ubuntu-latest
14321432
needs: [determine-jobs, setup, dependency-update]

0 commit comments

Comments
 (0)