Configure CI workflow and use published @listee packages#9
Conversation
WalkthroughAdds a new reusable GitHub Actions CI workflow, updates two package dependencies from local links to semantic versions, reformats an auth command file (no behavior change), and makes tests generate JWT payloads dynamically instead of using a fixed token. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Dev as Developer (push/pr)
participant GH as GitHub Actions
participant Reuse as listee-dev/listee-ci (reusable workflows)
Dev->>GH: push to main / open PR
GH->>GH: trigger .github/workflows/ci.yml
note right of GH #DDEBF7: CI workflow composes three jobs\nby reusing external workflows
GH->>Reuse: call lint workflow (.github/workflows/lint.yml@main)
Reuse-->>GH: lint result (success/failure)
GH->>Reuse: call typecheck workflow (.github/workflows/typecheck.yml@main)
Reuse-->>GH: typecheck result (success/failure)
GH->>Reuse: call test workflow (.github/workflows/test.yml@main)
Reuse-->>GH: test result (success/failure)
GH-->>Dev: workflow conclusion (aggregate result)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
.github/workflows/ci.yml (1)
1-16: CI workflow relies entirely on external listee-dev/listee-ci repository; consider version pinning for stability.The reusable workflow composition is clean and follows the DRY principle, but using
@maincreates a tight coupling to the external repository's main branch. Changes or failures upstream will immediately break CI without warning.Consider pinning to a specific workflow version/tag (e.g.,
@v1.0.0) instead of@mainto avoid unexpected CI breakage:- uses: listee-dev/listee-ci/.github/workflows/lint.yml@main + uses: listee-dev/listee-ci/.github/workflows/lint.yml@v1.0.0Apply the same change to
typecheck.ymlandtest.ymljobs.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
bun.lockis excluded by!**/*.lock
📒 Files selected for processing (2)
.github/workflows/ci.yml(1 hunks)package.json(1 hunks)
🔇 Additional comments (2)
.github/workflows/ci.yml (1)
3-6: Workflow trigger configuration is appropriate.The workflow runs on pushes to
mainand all pull requests, which is a sensible baseline for CI coverage.package.json (1)
17-18: Dependency verification passed — both packages are published on npm.The shell script confirms
@listee/auth@0.2.3and@listee/types@0.2.3both exist on the npm registry. The switch from locallink:dependencies to npm versioning is valid and can be merged safely.
0ac12c1 to
260bd0e
Compare
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/services/auth-service.test.ts (1)
70-79: LGTM! Dynamic JWT payload generation improves test realism.The refactor from a static payload to a dynamic
payloadSegment()function with epoch-based timestamps makes the test tokens more realistic and aligns with the updated dependencies.Consider adding test assertions for the new JWT fields if
parseSignupFragmentor downstream code validates token expiration:it("validates JWT expiration", () => { const accessToken = `${header}.${payloadSegment()}.${signature}`; const fragment = `#access_token=${accessToken}&refresh_token=refresh123&expires_in=3600&token_type=bearer&type=signup`; const result = parseSignupFragment(fragment); // Verify JWT fields are parsed correctly const [, payloadB64] = accessToken.split("."); const payload = JSON.parse(Buffer.from(payloadB64, "base64url").toString()); expect(payload.exp).toBeGreaterThan(Math.floor(Date.now() / 1000)); });
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
bun.lockis excluded by!**/*.lock
📒 Files selected for processing (4)
.github/workflows/ci.yml(1 hunks)package.json(1 hunks)src/commands/auth.ts(4 hunks)src/services/auth-service.test.ts(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- src/commands/auth.ts
🚧 Files skipped from review as they are similar to previous changes (2)
- .github/workflows/ci.yml
- package.json
🧰 Additional context used
📓 Path-based instructions (3)
src/services/**/*.ts
📄 CodeRabbit inference engine (AGENTS.md)
src/services/**/*.ts: Place Supabase-facing logic under src/services/
Read SUPABASE_URL and SUPABASE_ANON_KEY from environment variables or .env; never hardcode credentials
Default Keytar service name to "listee-cli"; allow overrides via env vars or CLI flags
Files:
src/services/auth-service.test.ts
**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{ts,tsx}: Use TypeScript strict practices: forbid any, forbid as assertions, no implicit any; implement type guards for narrowing
Use two-space indentation and LF line endings
Use camelCase for identifiers
Keep comments purposeful; add brief context only for non-trivial flows
Maintain ASCII in files unless the file already uses Unicode
Files:
src/services/auth-service.test.ts
src/**/[a-z0-9-]*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Use kebab-case filenames for modules under src/
Files:
src/services/auth-service.test.ts
🔇 Additional comments (1)
src/services/auth-service.test.ts (1)
83-83: LGTM! Proper usage of dynamic payload generation.The access token now uses the dynamic
payloadSegment()function, ensuring each test run generates realistic JWT timestamps while maintaining test reliability.
Summary
Testing
Summary by CodeRabbit
Chores
Style
Tests