ci: add code-quality workflow for required status checks#73
ci: add code-quality workflow for required status checks#73
Conversation
Adds the Code Quality CI workflow providing the status check jobs required by the code-quality repository ruleset: - Type check - Lint - Format check - Tests (with coverage) Closes #46 Co-authored-by: don-petry <don-petry@users.noreply.github.com>
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 4 minutes and 17 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
npm run format runs 'prettier --write .' which writes files. Passing '--check' after '--' would conflict with '--write'. Using 'npx prettier --check .' directly is safer and avoids this format script ambiguity. Co-authored-by: don-petry <don-petry@users.noreply.github.com>
|
@don-petry — this PR is ready for your review. It adds the One manual step remains after merge: create the repository ruleset via GitHub API or Settings UI (requires |
|
There was a problem hiding this comment.
Pull request overview
Adds a new GitHub Actions workflow to provide the required code-quality status check contexts (Type check, Lint, Format check, Tests) on PRs and pushes to main, addressing the compliance finding in #46.
Changes:
- Introduces
.github/workflows/code-quality.ymlwith four separate jobs: typecheck, lint, format check, and tests - Configures the workflow to run on
pull_requestandpushevents targetingmain
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | ||
| with: | ||
| node-version: '24' | ||
| cache: 'npm' | ||
| - run: npm ci | ||
| - run: npm run typecheck |
There was a problem hiding this comment.
npm ci requires a package-lock.json (or other npm lockfile) to exist; this repository currently has no package-lock.json, so this step will fail and make the required status check permanently red. Either commit the lockfile(s) or change the workflow to (a) detect the Node project/lockfile and skip cleanly when absent, or (b) use npm install until a lockfile is added.
| - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | ||
| with: | ||
| node-version: '24' | ||
| cache: 'npm' | ||
| - run: npm ci | ||
| - run: npm run lint |
There was a problem hiding this comment.
Same issue as above: npm ci will fail without a package-lock.json, and the repo currently doesn't contain one. This will break the Lint required check unless you add a lockfile or make the job conditional / switch to npm install.
| - run: npm ci | ||
| - run: npx prettier --check . |
There was a problem hiding this comment.
npm run format -- --check relies on the format script being compatible with --check. In this repo's documented conventions, npm run format maps to prettier --write ., so appending --check will run Prettier with both --write and --check and fail. Prefer running prettier --check . directly (or add a dedicated format:check script) for CI.
| - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | ||
| with: | ||
| node-version: '24' | ||
| cache: 'npm' | ||
| - run: npm ci | ||
| - run: npm run test -- --coverage |
There was a problem hiding this comment.
Same issue as above: npm ci will fail without a package-lock.json (none exists in the repo today), which will break the Tests required check. Either commit the lockfile or make the job conditional / switch to npm install.
| - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | ||
| with: | ||
| node-version: '24' | ||
| cache: 'npm' | ||
| - run: npm ci |
There was a problem hiding this comment.
npm ci will fail without a package-lock.json (none exists in the repo today), so this job will fail immediately and keep the required check red. Either commit the lockfile(s) or make the job conditional / switch to npm install until a lockfile is added.
|
Closing as stale — predates the standards PR. This PR was generated by Claude during the original bulk-toggle yesterday, before petry-projects/.github#86 landed. That standards PR added prompt rules that:
Re-toggling the underlying issue will let Claude regenerate this fix using the new rules. The next run should produce a workflow that is byte-identical to the standard template (verified with the canary on TalkTerm#51 → PR #78 yesterday). |


Summary
.github/workflows/code-quality.ymlwith four jobs: Type check, Lint, Format check, and Testscode-qualityrepository ruleset per the standardmainRemaining manual step
After merging, create the
code-qualityrepository ruleset requiring these status checks to pass. Run the following with a token that hasadministration:write:gh api repos/petry-projects/TalkTerm/rulesets --method POST \ --header "Accept: application/vnd.github+json" \ --input /tmp/ruleset.jsonWhere
/tmp/ruleset.jsoncontains the ruleset definition from the previous Claude comment.Closes #46
Generated with Claude Code