Skip to content

Commit 949fca9

Browse files
removing dry run
1 parent f6eef4d commit 949fca9

File tree

2 files changed

+9
-25
lines changed

2 files changed

+9
-25
lines changed

scripts/tool-annotations/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Applies MCP (Model Context Protocol) annotations to Pipedream action files from
66

77
```bash
88
# Test with first 10 entries
9-
node apply-annotations.js --csv registry-action-changes-2025-09-25_1.csv --limit 10 --dry-run
9+
node apply-annotations.js --csv registry-action-changes-2025-09-25_1.csv --limit 10
1010

1111
# Process in batches
1212
node apply-annotations.js --csv registry-action-changes-2025-09-25_1.csv --offset 0 --limit 100
@@ -25,7 +25,6 @@ node apply-annotations.js --csv registry-action-changes-2025-09-25_1.csv
2525

2626
## Options
2727

28-
- `--dry-run` - Show changes without applying them
2928
- `--verbose` - Detailed logging
3029
- `--limit N` - Process only N entries
3130
- `--offset N` - Skip N entries before processing

scripts/tool-annotations/apply-annotations.js

Lines changed: 8 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ const { execSync } = require('child_process');
1414
class AnnotationApplier {
1515
constructor(options = {}) {
1616
this.csvFile = options.csvFile;
17-
this.dryRun = options.dryRun || false;
1817
this.verbose = options.verbose || false;
1918
this.limit = options.limit || null;
2019
this.offset = options.offset || 0;
@@ -37,8 +36,7 @@ class AnnotationApplier {
3736

3837
log(message, level = 'info') {
3938
const timestamp = new Date().toISOString();
40-
const prefix = this.dryRun ? '[DRY-RUN]' : '[LIVE]';
41-
const logMessage = `${timestamp} ${prefix} ${message}`;
39+
const logMessage = `${timestamp} ${message}`;
4240

4341
switch (level) {
4442
case 'error':
@@ -269,10 +267,7 @@ class AnnotationApplier {
269267

270268
// Apply changes
271269
const modifiedContent = this.applyAnnotations(fileContent, annotations);
272-
273-
if (!this.dryRun) {
274-
fs.writeFileSync(filePath, modifiedContent, 'utf8');
275-
}
270+
fs.writeFileSync(filePath, modifiedContent, 'utf8');
276271

277272
this.recordModification(fileContent, actionKey);
278273
return true;
@@ -301,14 +296,14 @@ class AnnotationApplier {
301296
const currentVersion = currentVersionMatch ? currentVersionMatch[1] : 'unknown';
302297
const newVersion = this.incrementVersion(currentVersion);
303298

304-
this.log(`${this.dryRun ? 'Would modify' : 'Modified'} ${actionKey} (${currentVersion}${newVersion})`, 'debug');
299+
this.log(`Modified ${actionKey} (${currentVersion}${newVersion})`, 'debug');
305300
}
306301

307302
verifyGitStatus() {
308303
try {
309304
const gitStatus = execSync('git status --porcelain', { encoding: 'utf8' });
310-
if (gitStatus.trim() && !this.dryRun) {
311-
throw new Error('Git working directory is not clean. Please commit or stash changes first.');
305+
if (gitStatus.trim()) {
306+
this.log('Git working directory is not clean - changes will be mixed with existing modifications', 'warn');
312307
}
313308
} catch (error) {
314309
this.log(`Git check failed: ${error.message}`, 'warn');
@@ -345,16 +340,11 @@ class AnnotationApplier {
345340
this.log('\n=== ERRORS ===');
346341
this.errors.forEach(error => this.log(error, 'error'));
347342
}
348-
349-
if (this.dryRun) {
350-
this.log('\nThis was a DRY RUN. No files were actually modified.');
351-
this.log('Re-run without --dry-run to apply changes.');
352-
}
353343
}
354344

355345
async run() {
356346
const startTime = Date.now();
357-
this.log(`Starting annotation application${this.dryRun ? ' (DRY RUN)' : ''}`);
347+
this.log('Starting annotation application');
358348

359349
this.verifyGitStatus();
360350
await this.loadCsv();
@@ -373,7 +363,6 @@ class AnnotationApplier {
373363
function parseArgs() {
374364
const args = process.argv.slice(2);
375365
const options = {
376-
dryRun: false,
377366
verbose: false
378367
};
379368

@@ -384,9 +373,6 @@ function parseArgs() {
384373
case '--csv':
385374
options.csvFile = args[++i];
386375
break;
387-
case '--dry-run':
388-
options.dryRun = true;
389-
break;
390376
case '--verbose':
391377
options.verbose = true;
392378
break;
@@ -408,15 +394,14 @@ Usage: node apply-annotations.js --csv <file> [options]
408394
409395
Options:
410396
--csv <file> Path to CSV file with annotations
411-
--dry-run Show what would be changed without making changes
412397
--verbose Show detailed logging
413398
--limit <number> Process only this many entries from CSV
414399
--offset <number> Skip this many entries before processing (default: 0)
415400
--help Show this help message
416401
417402
Batch Processing Examples:
418-
# Test with first 10 entries
419-
node apply-annotations.js --csv file.csv --limit 10 --dry-run
403+
# Process first 10 entries
404+
node apply-annotations.js --csv file.csv --limit 10
420405
421406
# Process entries 11-110 (next 100)
422407
node apply-annotations.js --csv file.csv --offset 10 --limit 100

0 commit comments

Comments
 (0)