Skip to content

Commit e58b229

Browse files
Merge branch 'main' into docs/cache-getorset-comments
2 parents ff762dd + 2e604a1 commit e58b229

227 files changed

Lines changed: 19719 additions & 1640 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env.local.example

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@
2020
# Generate new token (classic)
2121
# Required scope: read:user
2222
# ------------------------------------------------------------
23-
GITHUB_TOKEN=ghp_your_personal_access_token_here
24-
23+
GITHUB_TOKEN=
2524

2625
# ------------------------------------------------------------
2726
# REQUIRED — Public site URL
@@ -48,3 +47,19 @@ NEXT_PUBLIC_SITE_URL=http://localhost:3000
4847
# 4. Replace <password> with your DB user's password
4948
# ------------------------------------------------------------
5049
# MONGODB_URI=mongodb+srv://<username>:<password>@cluster.mongodb.net/commitpulse?retryWrites=true&w=majority
50+
51+
# ------------------------------------------------------------
52+
# OPTIONAL — Upstash Redis / Vercel KV (Distributed Rate Limiting)
53+
# ------------------------------------------------------------
54+
# Enables distributed rate limiting across all serverless instances.
55+
# Without these, rate limiting is per-instance (each Vercel function
56+
# gets its own counter), which allows N× the intended limit under load.
57+
#
58+
# How to get one (free):
59+
# 1. Create a free Upstash Redis database at https://console.upstash.com
60+
# 2. Copy the REST API URL and token
61+
# 3. If using Vercel KV, link it to your project in the Vercel dashboard
62+
# — it sets KV_REST_API_URL and KV_REST_API_TOKEN automatically.
63+
# ------------------------------------------------------------
64+
# KV_REST_API_URL=https://<your-db>.upstash.io
65+
# KV_REST_API_TOKEN=<your-token>

.github/scripts/issue-management/assign-handler.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ async function findExistingAssignments(github, owner, repo, username, currentIss
1010
return issues.filter((issue) => !issue.pull_request && issue.number !== currentIssueNumber);
1111
}
1212

13-
const MAX_ASSIGNED_ISSUES = 3;
13+
const MAX_ASSIGNED_ISSUES = 5;
1414

1515
async function handleAssign({ github, context, username, hasWriteAccess }) {
1616
const { owner, repo } = context.repo;

.github/scripts/issue-management/claim-handler.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ async function findExistingAssignments(github, owner, repo, username, currentIss
1010
return issues.filter((issue) => !issue.pull_request && issue.number !== currentIssueNumber);
1111
}
1212

13-
const MAX_ASSIGNED_ISSUES = 3;
13+
const MAX_ASSIGNED_ISSUES = 5;
1414

1515
async function handleClaim({ github, context }) {
1616
const { owner, repo } = context.repo;

.github/workflows/assign-request-reminder.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ jobs:
9393
``,
9494
`## 📋 A Few Things to Know`,
9595
``,
96-
`- You can hold a **maximum of 3 open issues** at a time.`,
96+
`- You can hold a **maximum of 5 open issues** at a time.`,
9797
`- If there's **no activity for 3 days**, the assignment will automatically expire so others can pick it up.`,
9898
`- Make sure to read our **[CONTRIBUTING.md](https://github.com/${owner}/${repo}/blob/main/CONTRIBUTING.md)** before you start — it covers code style, commit conventions, and the PR checklist.`,
9999
``,

.github/workflows/conflict-notifier.yml

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -79,35 +79,8 @@ jobs:
7979
issue_number: pr.number,
8080
labels: [label],
8181
});
82-
}
83-
84-
// Check existing comments to enforce a 24-hour notification gap
85-
const { data: comments } = await github.rest.issues.listComments({
86-
owner: context.repo.owner,
87-
repo: context.repo.repo,
88-
issue_number: pr.number,
89-
per_page: 100,
90-
});
91-
92-
const conflictComments = comments.filter(c =>
93-
c.user?.login === 'github-actions[bot]' &&
94-
c.body?.includes('merge conflicts with the main branch')
95-
);
96-
97-
let shouldComment = false;
98-
if (conflictComments.length === 0) {
99-
shouldComment = true;
100-
} else {
101-
const lastComment = conflictComments[conflictComments.length - 1];
102-
const lastCommentTime = new Date(lastComment.created_at).getTime();
103-
const nowTime = new Date().getTime();
104-
const TWENTY_FOUR_HOURS_MS = 24 * 60 * 60 * 1000;
105-
if (nowTime - lastCommentTime >= TWENTY_FOUR_HOURS_MS) {
106-
shouldComment = true;
107-
}
108-
}
10982
110-
if (shouldComment) {
83+
// Post notification comment ONLY ONCE (when the label is first applied)
11184
await github.rest.issues.createComment({
11285
owner: context.repo.owner,
11386
repo: context.repo.repo,

.github/workflows/pr-issue-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ jobs:
182182
2. **Wait for confirmation** — The bot will confirm your assignment with a ✅ reply.
183183
3. **Then open your PR** — Link the issue with \`Fixes #${issueNumber}\` in your description.
184184
185-
> 💡 You can be assigned to up to **3** open issues at a time. Check your current assignments before claiming a new one.
185+
> 💡 You can be assigned to up to **5** open issues at a time. Check your current assignments before claiming a new one.
186186
187187
We look forward to your contribution once you're assigned! 🚀`,
188188
});

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ The accuracy engine lives in `utils/time.ts` and `lib/calculate.ts`.
401401
CommitPulse uses a custom, lightweight **GitHub Actions** automation system to manage issues fairly. This ensures that everyone (especially during events like **GSSoC**) gets a chance to contribute and prevents "issue hoarding".
402402

403403
> [!IMPORTANT]
404-
> **The Golden Rule:** You can be assigned to a maximum of **3** open issues at a time. Complete or unassign yourself from one before claiming more.
404+
> **The Golden Rule:** You can be assigned to a maximum of **5** open issues at a time. Complete or unassign yourself from one before claiming more.
405405
406406
### 📋 Structured Issue Templates
407407

@@ -454,7 +454,7 @@ To keep the project moving, assignments are not permanent.
454454
If the bot rejects your command, check these common scenarios:
455455

456456
- **"Commands cannot be used on closed issues"**: You cannot claim, assign, or unassign on closed issues. Find an open one!
457-
- **"You already have X/3 active assigned issues"**: You have reached the maximum of 3 concurrent assignments. Finish one of your current tasks before claiming a new issue. If you're stuck, use the `/unclaim` command to unassign yourself from an issue, or ask a maintainer to `/unassign` you.
457+
- **"You already have X/5 active assigned issues"**: You have reached the maximum of 5 concurrent assignments. Finish one of your current tasks before claiming a new issue. If you're stuck, use the `/unclaim` command to unassign yourself from an issue, or ask a maintainer to `/unassign` you.
458458
- **"This issue is already assigned to @username"**: Be faster next time! Look for issues without assignees.
459459
- **"Only the author of this issue can claim it"**: You tried to `/claim` an issue you did not create. You can only claim issues that you authored (unless the issue was authored by `jhasourav07`, which anyone can claim).
460460
- **"The following label(s) do not exist"**: You can only add existing repo labels. The bot will reply with a list of valid labels you can use.

THEMES.md

Lines changed: 52 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# 🎨 CommitPulse Themes
1+
# CommitPulse Themes
22

33
All 20 available themes for your CommitPulse badge. Use the `?theme=<slug>` query parameter to apply a theme.
44

@@ -32,12 +32,14 @@ https://commitpulse.vercel.app/api/streak?user=YOUR_USERNAME&theme=<slug>
3232
| nord_light | `#eceff4` | `#2e3440` | `#5e81ac` |
3333
| obsidian | `#1a1a2e` | `#e2e8f0` | `#f59e0b` |
3434
| cyber-pulse | `#000000` | `#ffffff` | `#00ffee` |
35+
| tokyonight | `#1a1b26` | `#c0caf5` | `#f7768e` |
36+
| cyberpunk | `#fce22a` | `#111111` | `#ff003c` |
3537

3638
---
3739

3840
## Preview Gallery
3941

40-
### 🌑 Dark (default)
42+
### Dark (default)
4143

4244
![dark](https://commitpulse.vercel.app/api/streak?user=jhasourav07&theme=dark)
4345

@@ -49,7 +51,7 @@ https://commitpulse.vercel.app/api/streak?user=YOUR_USERNAME&theme=<slug>
4951

5052
---
5153

52-
### ☀️ Light
54+
### Light
5355

5456
![light](https://commitpulse.vercel.app/api/streak?user=jhasourav07&theme=light)
5557

@@ -61,7 +63,7 @@ https://commitpulse.vercel.app/api/streak?user=YOUR_USERNAME&theme=<slug>
6163

6264
---
6365

64-
### Neon
66+
### Neon
6567

6668
![neon](https://commitpulse.vercel.app/api/streak?user=jhasourav07&theme=neon)
6769

@@ -73,7 +75,7 @@ https://commitpulse.vercel.app/api/streak?user=YOUR_USERNAME&theme=<slug>
7375

7476
---
7577

76-
### 🐙 GitHub
78+
### GitHub
7779

7880
![github](https://commitpulse.vercel.app/api/streak?user=jhasourav07&theme=github)
7981

@@ -85,7 +87,7 @@ https://commitpulse.vercel.app/api/streak?user=YOUR_USERNAME&theme=<slug>
8587

8688
---
8789

88-
### 🧛 Dracula
90+
### Dracula
8991

9092
![dracula](https://commitpulse.vercel.app/api/streak?user=jhasourav07&theme=dracula)
9193

@@ -97,7 +99,7 @@ https://commitpulse.vercel.app/api/streak?user=YOUR_USERNAME&theme=<slug>
9799

98100
---
99101

100-
### 🌊 Ocean
102+
### Ocean
101103

102104
![ocean](https://commitpulse.vercel.app/api/streak?user=jhasourav07&theme=ocean)
103105

@@ -109,7 +111,7 @@ https://commitpulse.vercel.app/api/streak?user=YOUR_USERNAME&theme=<slug>
109111

110112
---
111113

112-
### 🌅 Sunset
114+
### Sunset
113115

114116
![sunset](https://commitpulse.vercel.app/api/streak?user=jhasourav07&theme=sunset)
115117

@@ -121,7 +123,7 @@ https://commitpulse.vercel.app/api/streak?user=YOUR_USERNAME&theme=<slug>
121123

122124
---
123125

124-
### 🌲 Forest
126+
### Forest
125127

126128
![forest](https://commitpulse.vercel.app/api/streak?user=jhasourav07&theme=forest)
127129

@@ -133,7 +135,7 @@ https://commitpulse.vercel.app/api/streak?user=YOUR_USERNAME&theme=<slug>
133135

134136
---
135137

136-
### 🌸 Rose
138+
### Rose
137139

138140
![rose](https://commitpulse.vercel.app/api/streak?user=jhasourav07&theme=rose)
139141

@@ -145,7 +147,7 @@ https://commitpulse.vercel.app/api/streak?user=YOUR_USERNAME&theme=<slug>
145147

146148
---
147149

148-
### ❄️ Nord
150+
### Nord
149151

150152
![nord](https://commitpulse.vercel.app/api/streak?user=jhasourav07&theme=nord)
151153

@@ -157,7 +159,7 @@ https://commitpulse.vercel.app/api/streak?user=YOUR_USERNAME&theme=<slug>
157159

158160
---
159161

160-
### 🎵 Synthwave
162+
### Synthwave
161163

162164
![synthwave](https://commitpulse.vercel.app/api/streak?user=jhasourav07&theme=synthwave)
163165

@@ -169,7 +171,7 @@ https://commitpulse.vercel.app/api/streak?user=YOUR_USERNAME&theme=<slug>
169171

170172
---
171173

172-
### 🪵 Gruvbox
174+
### Gruvbox
173175

174176
![gruvbox](https://commitpulse.vercel.app/api/streak?user=jhasourav07&theme=gruvbox)
175177

@@ -181,7 +183,7 @@ https://commitpulse.vercel.app/api/streak?user=YOUR_USERNAME&theme=<slug>
181183

182184
---
183185

184-
### 🔮 Aurora Cyberpunk
186+
### Aurora Cyberpunk
185187

186188
![aurora_cyberpunk](https://commitpulse.vercel.app/api/streak?user=jhasourav07&theme=aurora_cyberpunk)
187189

@@ -193,7 +195,7 @@ https://commitpulse.vercel.app/api/streak?user=YOUR_USERNAME&theme=<slug>
193195

194196
---
195197

196-
### 🔦 High Contrast
198+
### High Contrast
197199

198200
![highcontrast](https://commitpulse.vercel.app/api/streak?user=jhasourav07&theme=highcontrast)
199201

@@ -205,7 +207,7 @@ https://commitpulse.vercel.app/api/streak?user=YOUR_USERNAME&theme=<slug>
205207

206208
---
207209

208-
### 🐱 Catppuccin Latte
210+
### Catppuccin Latte
209211

210212
![catppuccin_latte](https://commitpulse.vercel.app/api/streak?user=jhasourav07&theme=catppuccin_latte)
211213

@@ -217,7 +219,7 @@ https://commitpulse.vercel.app/api/streak?user=YOUR_USERNAME&theme=<slug>
217219

218220
---
219221

220-
### 🌞 Solarized Light
222+
### Solarized Light
221223

222224
![solarized_light](https://commitpulse.vercel.app/api/streak?user=jhasourav07&theme=solarized_light)
223225

@@ -229,7 +231,7 @@ https://commitpulse.vercel.app/api/streak?user=YOUR_USERNAME&theme=<slug>
229231

230232
---
231233

232-
### 🌻 Gruvbox Light
234+
### Gruvbox Light
233235

234236
![gruvbox_light](https://commitpulse.vercel.app/api/streak?user=jhasourav07&theme=gruvbox_light)
235237

@@ -241,7 +243,7 @@ https://commitpulse.vercel.app/api/streak?user=YOUR_USERNAME&theme=<slug>
241243

242244
---
243245

244-
### 🏔️ Nord Light
246+
### Nord Light
245247

246248
![nord_light](https://commitpulse.vercel.app/api/streak?user=jhasourav07&theme=nord_light)
247249

@@ -253,7 +255,7 @@ https://commitpulse.vercel.app/api/streak?user=YOUR_USERNAME&theme=<slug>
253255

254256
---
255257

256-
### 💠 Cyber Pulse
258+
### Cyber Pulse
257259

258260
![cyber-pulse](https://commitpulse.vercel.app/api/streak?user=jhasourav07&theme=cyber-pulse)
259261

@@ -265,7 +267,7 @@ https://commitpulse.vercel.app/api/streak?user=YOUR_USERNAME&theme=<slug>
265267

266268
---
267269

268-
### 🪨 Obsidian
270+
### Obsidian
269271

270272
![obsidian](https://commitpulse.vercel.app/api/streak?user=jhasourav07&theme=obsidian)
271273

@@ -277,22 +279,46 @@ https://commitpulse.vercel.app/api/streak?user=YOUR_USERNAME&theme=<slug>
277279

278280
---
279281

280-
## 🎛️ Custom Theme
282+
### Tokyo Night
281283

282-
Not finding what you want? Build your own using raw color parameters — all values are hex codes **without** the `#` prefix:
284+
![tokyonight](https://commitpulse.vercel.app/api/streak?user=jhasourav07&theme=tokyonight)
285+
286+
| Parameter | Value |
287+
| --------- | ------ |
288+
| `bg` | 1a1b26 |
289+
| `text` | c0caf5 |
290+
| `accent` | f7768e |
291+
292+
---
293+
294+
### Cyberpunk
295+
296+
![cyberpunk](https://commitpulse.vercel.app/api/streak?user=jhasourav07&theme=cyberpunk)
297+
298+
| Parameter | Value |
299+
| --------- | ------ |
300+
| `bg` | fce22a |
301+
| `text` | 111111 |
302+
| `accent` | ff003c |
303+
304+
---
305+
306+
## Custom Theme
307+
308+
Not finding what you want? Build your own using raw color parameters - all values are hex codes **without** the `#` prefix:
283309

284310
```
285311
https://commitpulse.vercel.app/api/streak?user=YOUR_USERNAME&bg=1a1b27&text=a9b1d6&accent=7aa2f7
286312
```
287313

288314
---
289315

290-
## 🔄 Auto Theme
316+
## Auto Theme
291317

292-
Automatically switches between light and dark based on the viewer's OS setting no hex values needed:
318+
Automatically switches between light and dark based on the viewer's OS setting - no hex values needed:
293319

294320
```
295321
https://commitpulse.vercel.app/api/streak?user=YOUR_USERNAME&theme=auto
296322
```
297323

298-
> 💡 **Tip:** You can combine `theme=` with individual overrides. For example, `theme=dracula&accent=ff79c6` applies the Dracula theme but swaps only the accent color.
324+
> **Tip:** You can combine `theme=` with individual overrides. For example, `theme=dracula&accent=ff79c6` applies the Dracula theme but swaps only the accent color.

0 commit comments

Comments
 (0)