You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
body: `❌ You already have **${existingIssues.length}/${MAX_ASSIGNED_ISSUES}** active assigned issues (the maximum allowed).\nPlease complete or unassign one of your current issues before claiming another.\n\n${issueList}`,
77
+
body: `❌ You already have **${existingIssues.length}/${MAX_ASSIGNED_ISSUES}** active assigned issues (the maximum allowed).\nPlease complete or \`/unclaim\` one of your current issues before claiming another.\n\n${issueList}`,
Copy file name to clipboardExpand all lines: .github/workflows/assign-request-reminder.yml
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -42,7 +42,7 @@ jobs:
42
42
contains(github.event.comment.body, 'can i be assigned') ||
43
43
contains(github.event.comment.body, 'assign me to this') ||
44
44
contains(github.event.comment.body, 'assign me this') ||
45
-
contains(github.event.comment.body, 'i will work on this') ||
45
+
contains(github.event.comment.body, 'work on this') ||
46
46
contains(github.event.comment.body, 'i''ll work on this') ||
47
47
contains(github.event.comment.body, 'ill work on this') ||
48
48
contains(github.event.comment.body, 'i can work on this') ||
@@ -94,7 +94,7 @@ jobs:
94
94
`## 📋 A Few Things to Know`,
95
95
``,
96
96
`- You can hold a **maximum of 3 open issues** at a time.`,
97
-
`- If there's **no activity for 2 days**, the assignment will automatically expire so others can pick it up.`,
97
+
`- If there's **no activity for 3 days**, the assignment will automatically expire so others can pick it up.`,
98
98
`- 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.`,
This section covers everything you need to verify your changes work correctly **before opening a PR**. There are two layers of testing: visual browser preview and the automated test suite.
95
+
96
+
### 1. Visual Browser Preview
97
+
98
+
With your dev server running (`npm run dev`), open your browser and visit these URLs to preview the SVG output directly:
> **⚠️ Browser XML error warning:** If your browser shows an `EntityRef: expecting ';'` error instead of rendering the SVG, it means an unescaped `&` character exists somewhere in the SVG output. All `&` characters inside SVG `<style>` blocks (e.g. in Google Fonts `@import` URLs) must be written as `&`. Check `lib/svg/generator.ts` for any raw `&` in template literals.
131
+
132
+
> **💡 Tip:** For a cleaner SVG preview, open the URL in **Firefox** — it renders SVG directly in the browser with no wrapper page. Chrome wraps it in an XML viewer which can show false parse warnings.
133
+
134
+
### 2. Running the Vitest Test Suite
135
+
136
+
CommitPulse uses **Vitest** for unit and integration tests. Run the full test suite with:
137
+
138
+
```bash
139
+
npm run test
140
+
```
141
+
142
+
To run tests in watch mode while you develop (reruns on every file save):
143
+
144
+
```bash
145
+
npm run test -- --watch
146
+
```
147
+
148
+
To run only a specific test file:
149
+
150
+
```bash
151
+
npm run test -- lib/calculate.test.ts
152
+
```
153
+
154
+
**What a passing run looks like:**
155
+
156
+
```
157
+
✓ lib/calculate.test.ts (12 tests)
158
+
✓ lib/svg/generator.test.ts (8 tests)
159
+
✓ app/api/streak/route.test.ts (6 tests)
160
+
161
+
Test Files 3 passed (3)
162
+
Tests 26 passed (26)
163
+
```
164
+
165
+
> **🚨 All tests must pass before you open a PR.** The CI pipeline runs `npm run test` automatically on every pull request and will block merging if any test fails.
166
+
167
+
### 3. Interpreting SVG Output in the Browser
168
+
169
+
When you open a badge URL in your browser, here is what each response means:
|`/claim`|**Issue Author (or Anyone if authored by jhasourav07)**| Self-assigns the issue to you. |
341
+
|`/unclaim`|**Assigned Contributor**| Removes the assignment from yourself (opens it back up). |
236
342
|`/addlabel <label1> <label2>`|**Anyone**| Adds labels to the issue (e.g. `/addlabel frontend bug`). |
237
343
|`/unassign @username`|**Maintainers Only**| Removes the assignee from an issue. |
238
344
|`/assign @username`|**Maintainers Only**| Manually assigns someone to an issue. |
@@ -258,7 +364,7 @@ To keep the project moving, assignments are not permanent.
258
364
If the bot rejects your command, check these common scenarios:
259
365
260
366
-**"Commands cannot be used on closed issues"**: You cannot claim, assign, or unassign on closed issues. Find an open one!
261
-
-**"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, ask a maintainer to `/unassign` you from one.
367
+
-**"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.
262
368
-**"This issue is already assigned to @username"**: Be faster next time! Look for issues without assignees.
263
369
-**"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).
264
370
-**"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.
0 commit comments