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
Copy file name to clipboardExpand all lines: AGENTS.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ This repo is a Next.js 16 + TypeScript app-router project.
12
12
-`hooks/`: reusable React hooks.
13
13
-`public/`: static assets.
14
14
-`drizzle/`: generated Drizzle SQL migrations and metadata.
15
-
-`tests/`: test suites (`tests/unit/*` for Vitest, `tests/e2e/*` for Playwright).
15
+
-`tests/`: test suites (`tests/unit/*` for Vitest unit tests, `tests/integration/*` for Vitest API integration tests, `tests/e2e/*` for Playwright UI tests).
16
16
-`styles/` and `app/globals.css`: global styling.
17
17
18
18
## Coding Style & Naming Conventions
@@ -25,7 +25,8 @@ This repo is a Next.js 16 + TypeScript app-router project.
25
25
## Testing Guidelines
26
26
When adding behavior:
27
27
- Add/update unit tests in `tests/unit/` where possible.
28
-
- Add/update integration scenarios in `tests/e2e/api-suite.spec.ts` and supporting helpers in `tests/utils/` when flow-level behavior changes.
28
+
- Add/update API integration scenarios in `tests/integration/api-suite.test.ts` and supporting helpers in `tests/utils/` when flow-level behavior changes.
29
+
- Add/update browser/page checks in `tests/e2e/pages-reference.spec.ts` when UI behavior changes.
29
30
- Validate with `pnpm test` locally (see `README.md` command table).
Copy file name to clipboardExpand all lines: README.md
+22-12Lines changed: 22 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# CLA Bot
2
2
3
-
CLA Bot is a Next.js app that automates Contributor License Agreement (CLA) workflows for GitHub organizations.
3
+
CLA Bot is a Next.js app that automates Contributor License Agreement (CLA) workflows for GitHub organizations and personal accounts.
4
4
5
5
It gives org admins a place to manage CLA text and signing history, and gives contributors a place to review/sign/re-sign agreements. A GitHub webhook handler enforces CLA status on pull requests by creating checks/comments.
6
6
@@ -15,7 +15,7 @@ It gives org admins a place to manage CLA text and signing history, and gives co
15
15
16
16
## What The App Is For
17
17
18
-
- Keep legal contributor agreements tied to each GitHub organization.
18
+
- Keep legal contributor agreements tied to each installed GitHub account.
19
19
- Automatically block/allow PRs based on CLA status.
20
20
- Reduce maintainer overhead by automating "please sign the CLA" comments/checks.
21
21
- Let contributors re-sign when CLA text changes (versioned by SHA-256 hash).
@@ -179,13 +188,14 @@ This section amends your scenario list and adds missing scenarios.
179
188
180
189
### 12) Installation lifecycle scenarios
181
190
182
-
- Installation `created` or `unsuspend`: org is created/reactivated, installation ID refreshed.
183
-
- Installation `deleted` or `suspend`: org is deactivated and installation ID cleared.
191
+
- Installation `created` or `unsuspend`: account row is created/reactivated, installation ID refreshed, and installation target metadata (`organization` vs `user`) is persisted.
192
+
- Installation `deleted` or `suspend`: account is deactivated and installation ID cleared.
- In production, org-admin APIs require live GitHub org-admin verification.
197
+
- In production, org installs require live GitHub org-admin verification.
198
+
- In production, personal-account installs are authorized when the signed-in GitHub user matches the installation target account.
189
199
- In local dev/test, org-admin verification is relaxed to keep tests deterministic.
190
200
-`/admin/[orgSlug]` and `/sign/[orgSlug]` handle unknown orgs with explicit not-found states.
191
201
@@ -217,7 +227,7 @@ Reference UI coverage:
217
227
218
228
Reference API/flow coverage:
219
229
220
-
-`tests/e2e/api-suite.spec.ts`
230
+
-`tests/integration/api-suite.test.ts`
221
231
- Broad integration flow coverage for auth/session APIs, org management, signing/re-signing, webhook checks/comments, install/uninstall/suspend lifecycle, and `/recheck` authorization.
222
232
- Includes edge cases like stale-signature recheck on open PRs, proactive recheck sweep after CLA update, non-PR `/recheck` handling, malformed webhook payload rejection, and duplicate webhook delivery de-duplication.
223
233
@@ -226,5 +236,5 @@ Reference API/flow coverage:
226
236
When behavior changes:
227
237
228
238
1. Update this README page/spec sections.
229
-
2. Update or add Playwright coverage in `tests/e2e/pages-reference.spec.ts` and/or `tests/e2e/api-suite.spec.ts`.
230
-
3. Run `pnpm test` and `pnpm build` before merging.
239
+
2. Update or add coverage in `tests/integration/api-suite.test.ts` and/or `tests/e2e/pages-reference.spec.ts` as appropriate.
240
+
3. Run `pnpm test` and `pnpm build` before merging. Run `pnpm test:all` when UI/browser behavior changes.
0 commit comments