-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreate-pr.js
More file actions
76 lines (67 loc) · 2.54 KB
/
Copy pathcreate-pr.js
File metadata and controls
76 lines (67 loc) · 2.54 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#!/usr/bin/env node
const https = require('https');
// GitHub API configuration
const apiOptions = {
hostname: 'api.github.com',
port: 443,
path: '/repos/anshul23102/cashclock/pulls',
method: 'POST',
headers: {
'User-Agent': 'CashClock-PR-Creator',
'Accept': 'application/vnd.github+json',
'Authorization': `token ${process.env.GITHUB_TOKEN || ''}`,
'Content-Type': 'application/json'
}
};
const prData = {
title: 'feat: Light theme conversion, login authentication, and rupee currency localization',
body: `## Changes
- ✨ Converted dark theme to light theme with purple header and teal accents
- 🔐 Added login page for business owner authentication (password: 1234)
- 🪙 Localized currency from British Pounds (£) to Indian Rupees (₹)
- 🎨 Updated all components with light theme styling
- ❌ Removed business switching dropdown from customer dashboard
- 🔢 Applied Indian number formatting (en-IN locale) across all monetary displays
## Components Modified
- CustomerDashboard, Dashboard, LoginPage (new), LoanOfferPage/Card
- CashBalanceForecastChart, CashCalendar, WhatIfPanel, PatternDrivers
- ManagerBusinessPage, AnomalyBandMini, CustomerView
## Testing
Test login with business name and password: 1234
## Files Changed
- 15+ React components updated with light theme
- LoginPage component created
- App.jsx updated with authentication flow
- Tailwind config with dashboard color palette
- All currency formatting functions localized to ₹ with en-IN locale`,
head: 'feature/light-theme-auth-rupee',
base: 'master'
};
const req = https.request(apiOptions, (res) => {
let data = '';
res.on('data', (chunk) => { data += chunk; });
res.on('end', () => {
if (res.statusCode >= 200 && res.statusCode < 300) {
const response = JSON.parse(data);
console.log('✅ Pull Request Created Successfully!');
console.log(`PR URL: ${response.html_url}`);
console.log(`PR #${response.number}`);
} else {
console.error('❌ Failed to create PR');
console.error(`Status: ${res.statusCode}`);
console.error(data);
}
});
});
req.on('error', (err) => {
console.error('❌ Error:', err.message);
process.exit(1);
});
if (!process.env.GITHUB_TOKEN) {
console.error('❌ Error: GITHUB_TOKEN environment variable not set');
console.error('Please set your GitHub Personal Access Token:');
console.error(' export GITHUB_TOKEN="your_token_here"');
process.exit(1);
}
req.write(JSON.stringify(prData));
req.end();