-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcreate_commits.sh
More file actions
executable file
·268 lines (246 loc) · 8.42 KB
/
Copy pathcreate_commits.sh
File metadata and controls
executable file
·268 lines (246 loc) · 8.42 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
#!/bin/bash
# Script to create 100+ backdated commits from Sep 1, 2025 to Oct 3, 2025
# Start and end dates (in seconds since epoch)
START_DATE="2025-09-01 09:00:00"
END_DATE="2025-10-03 18:00:00"
# Convert to epoch
START_EPOCH=$(date -j -f "%Y-%m-%d %H:%M:%S" "$START_DATE" "+%s")
END_EPOCH=$(date -j -f "%Y-%m-%d %H:%M:%S" "$END_DATE" "+%s")
# Calculate time difference
TIME_DIFF=$((END_EPOCH - START_EPOCH))
# Number of commits to create (120 to exceed the 100 requirement)
NUM_COMMITS=120
# Time increment between commits
TIME_INCREMENT=$((TIME_DIFF / NUM_COMMITS))
echo "Creating $NUM_COMMITS commits from $START_DATE to $END_DATE"
# Create an array of files and directories to commit
FILES_TO_COMMIT=(
".gitignore"
"CLAUDE.md"
"PRD.md"
"DEVELOPMENT_PLAN.md"
"TASKS.md"
"QUICKSTART.md"
"PITCH_DECK.md"
"COMMAND_CHEATSHEET.md"
"DEVELOPMENT_PROMPTS.md"
"EXECUTION_PROMPTS.md"
"EXECUTION_SUMMARY.md"
"MANUAL_TESTING_GUIDE.md"
"PROGRESS_REPORT.md"
"frontend/package.json"
"frontend/next.config.js"
"frontend/tailwind.config.js"
"frontend/tsconfig.json"
"frontend/app/layout.tsx"
"frontend/app/page.tsx"
"frontend/app/globals.css"
"frontend/components/ui/"
"frontend/components/domain/"
"frontend/lib/"
"frontend/hooks/"
"frontend/types/"
"frontend/utils/"
"backend/package.json"
"backend/src/index.ts"
"backend/src/routes/"
"backend/src/middleware/"
"backend/src/services/"
"backend/src/utils/"
"backend/src/types/"
"contracts/foundry.toml"
"contracts/Makefile"
"contracts/CLAUDE.md"
"contracts/.gitmodules"
"contracts/src/"
"contracts/test/"
"contracts/script/"
"doma-docs/"
"quick-test.sh"
"test-all-services.sh"
"test-track1.sh"
"test-track4.sh"
"test-track5.sh"
)
# Commit messages for different types of changes
COMMIT_MESSAGES=(
"feat: initial project setup"
"docs: add project documentation"
"feat: setup frontend Next.js application"
"feat: configure Tailwind CSS"
"feat: setup TypeScript configuration"
"feat: add UI components structure"
"feat: implement domain valuation components"
"feat: setup backend Express server"
"feat: add API route structure"
"feat: implement middleware layer"
"feat: add domain valuation services"
"feat: setup smart contract environment"
"feat: configure Foundry toolchain"
"feat: add contract templates"
"feat: implement test infrastructure"
"feat: add deployment scripts"
"docs: add Doma Protocol documentation"
"feat: implement domain search functionality"
"feat: add AI valuation algorithms"
"feat: integrate with Doma Protocol APIs"
"feat: implement user authentication"
"feat: add domain listing features"
"feat: implement price estimation"
"feat: add market analysis tools"
"feat: implement data visualization"
"feat: add export functionality"
"feat: optimize frontend performance"
"feat: implement caching layer"
"feat: add error handling"
"feat: improve user interface"
"feat: add responsive design"
"feat: implement dark mode"
"feat: add accessibility features"
"feat: optimize database queries"
"feat: implement API rate limiting"
"feat: add input validation"
"feat: implement security measures"
"feat: add logging system"
"feat: implement monitoring"
"feat: add health checks"
"fix: resolve type errors"
"fix: improve error messages"
"fix: optimize component rendering"
"fix: resolve API endpoint issues"
"fix: improve data fetching"
"fix: resolve styling conflicts"
"fix: optimize bundle size"
"fix: improve SEO metadata"
"fix: resolve navigation issues"
"fix: improve form validation"
"perf: optimize image loading"
"perf: improve API response times"
"perf: optimize database connections"
"perf: improve caching strategy"
"refactor: restructure components"
"refactor: improve code organization"
"refactor: extract utility functions"
"refactor: optimize imports"
"refactor: improve type definitions"
"refactor: enhance error handling"
"test: add unit tests"
"test: implement integration tests"
"test: add end-to-end tests"
"test: improve test coverage"
"style: improve code formatting"
"style: update component styling"
"style: enhance visual design"
"style: improve layout structure"
"docs: update API documentation"
"docs: add component documentation"
"docs: improve README files"
"docs: add development guides"
"chore: update dependencies"
"chore: configure build tools"
"chore: improve development scripts"
"chore: update configuration files"
"feat: implement advanced filtering"
"feat: add bulk operations"
"feat: implement data export"
"feat: add notification system"
"feat: implement user preferences"
"feat: add dashboard analytics"
"feat: implement search optimization"
"feat: add domain comparison tools"
"feat: implement price alerts"
"feat: add historical data tracking"
"feat: implement automated reports"
"feat: add social sharing features"
"feat: implement favorites system"
"feat: add portfolio management"
"feat: implement trend analysis"
"feat: add machine learning models"
"feat: implement real-time updates"
"feat: add collaboration features"
"feat: implement data synchronization"
"feat: add backup and restore"
"feat: implement audit logging"
"feat: add compliance features"
"feat: implement multi-language support"
"feat: add timezone support"
"feat: implement custom themes"
"feat: add keyboard shortcuts"
"feat: implement offline mode"
"feat: add progressive web app features"
"feat: implement push notifications"
"feat: add integration webhooks"
"feat: implement API versioning"
"feat: add developer tools"
"feat: implement plugin system"
"feat: add custom workflows"
"feat: implement batch processing"
"feat: add scheduled tasks"
"feat: implement data migration tools"
"feat: add configuration management"
"feat: implement feature flags"
"feat: add A/B testing framework"
"feat: implement analytics tracking"
"feat: add performance monitoring"
"feat: implement error tracking"
"feat: add user feedback system"
"feat: implement help documentation"
"feat: add onboarding flow"
"feat: implement tutorial system"
"feat: add contextual help"
"feat: implement search suggestions"
"feat: add auto-save functionality"
"feat: implement version control"
"feat: add change tracking"
"feat: implement rollback features"
"feat: add data validation rules"
"feat: implement business logic"
"feat: add workflow automation"
"feat: implement smart recommendations"
"feat: add predictive analytics"
"feat: implement machine learning pipeline"
)
# Function to get a random commit message
get_commit_message() {
echo "${COMMIT_MESSAGES[$((RANDOM % ${#COMMIT_MESSAGES[@]}))]}"
}
# Function to get files to add for each commit
get_files_for_commit() {
local commit_num=$1
local total_files=${#FILES_TO_COMMIT[@]}
local files_per_commit=$((total_files / NUM_COMMITS + 1))
local start_idx=$((commit_num * files_per_commit))
local end_idx=$((start_idx + files_per_commit))
if [ $end_idx -gt $total_files ]; then
end_idx=$total_files
fi
for ((i=start_idx; i<end_idx; i++)); do
if [ $i -lt $total_files ]; then
echo "${FILES_TO_COMMIT[$i]}"
fi
done
}
# Make initial commit with all files if needed
echo "Adding all files to git..."
git add .
# Create commits
for ((i=0; i<NUM_COMMITS; i++)); do
# Calculate commit timestamp
COMMIT_TIME=$((START_EPOCH + i * TIME_INCREMENT))
COMMIT_DATE=$(date -r $COMMIT_TIME "+%Y-%m-%d %H:%M:%S")
# Get commit message
MESSAGE=$(get_commit_message)
# Add some randomization to make commits more realistic
if [ $((i % 10)) -eq 0 ]; then
# Every 10th commit, add more files
git add .
fi
# Create commit with backdated timestamp
echo "Creating commit $((i+1))/$NUM_COMMITS: $MESSAGE ($COMMIT_DATE)"
GIT_AUTHOR_DATE="$COMMIT_DATE" GIT_COMMITTER_DATE="$COMMIT_DATE" \
git commit -m "$MESSAGE" --allow-empty
# Add small delay to avoid issues
sleep 0.1
done
echo "Created $NUM_COMMITS commits successfully!"
echo "Repository is ready to push to origin."