This repository was archived by the owner on Aug 7, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmanual-commit.js
More file actions
51 lines (40 loc) · 1.64 KB
/
Copy pathmanual-commit.js
File metadata and controls
51 lines (40 loc) · 1.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/**
* Manual GitHub Commit Script for HyperDAG
* Creates a commit summary of changes without interactive prompts
*/
import { execSync } from 'child_process';
import fs from 'fs';
console.log('=== HyperDAG Manual Commit Summary ===');
// Check git status
try {
console.log('\n--- Git Status ---');
const status = execSync('git status --porcelain', { encoding: 'utf8' });
if (status) {
console.log('Modified files:');
console.log(status);
} else {
console.log('No changes detected.');
}
// Add all changes
console.log('\n--- Adding Changes ---');
execSync('git add .', { stdio: 'inherit' });
// Create commit message
const commitMessage = `HyperDAG Security Update: Fixed critical XSS vulnerabilities, added authentication guards, and resolved JSX syntax errors
Security Fixes:
- Removed dangerous dangerouslySetInnerHTML usage
- Fixed JSX syntax errors in documentation page
- Implemented authentication middleware
- Added proper null checking for user authentication
- Applied security guards to all protected routes
Ready for production deployment with enterprise-grade security.`;
console.log('\n--- Creating Commit ---');
execSync(`git commit -m "${commitMessage}"`, { stdio: 'inherit' });
console.log('\n--- Commit Summary ---');
execSync('git log --oneline -1', { stdio: 'inherit' });
console.log('\n✅ Local commit completed successfully!');
console.log('\nTo push to GitHub, you can:');
console.log('1. Set up a GitHub token as GITHUB_TOKEN environment variable');
console.log('2. Or manually push using: git push origin main');
} catch (error) {
console.error('Error during commit:', error.message);
}