Skip to content

Commit 315bbd7

Browse files
committed
fix: include HTML marker on all summary comment paths
The early-exit path for empty lockfiles was missing the <!-- dependency-validation --> marker, causing the bot to create duplicate comments instead of updating the existing one. Made-with: Cursor
1 parent 14bd2fc commit 315bbd7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/dependency-validation.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,13 +204,14 @@ jobs:
204204
const fs = require('fs');
205205
const path = require('path');
206206
const dirs = JSON.parse(process.env.CHANGED_DIRS || '[]');
207+
const marker = '<!-- dependency-validation -->';
207208
208209
const lockfiles = dirs
209210
.map(d => d === '.' ? 'package-lock.json' : path.join(d, 'package-lock.json'))
210211
.filter(f => fs.existsSync(f) && fs.existsSync(path.join('base', f)));
211212
212213
if (lockfiles.length === 0) {
213-
fs.writeFileSync('dep-summary.md', 'No dependency version changes detected.\n');
214+
fs.writeFileSync('dep-summary.md', marker + '\nNo dependency version changes detected.\n');
214215
process.exit(0);
215216
}
216217
@@ -240,7 +241,6 @@ jobs:
240241
}
241242
}
242243
243-
const marker = '<!-- dependency-validation -->';
244244
if (changes.length === 0) {
245245
fs.writeFileSync('dep-summary.md', marker + '\nNo dependency version changes detected.\n');
246246
} else {

0 commit comments

Comments
 (0)