Skip to content

chore: add lint workflow for PRs - #1200

Merged
brendan-kellam merged 2 commits into
mainfrom
brendan/ci-lint-workflow
May 13, 2026
Merged

brendan-kellam merged 2 commits into
mainfrom
brendan/ci-lint-workflow

Conversation

@brendan-kellam

@brendan-kellam brendan-kellam commented May 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Adds .github/workflows/lint.yml that runs on PRs to main and executes yarn lint.
  • Adds a root lint script (yarn workspaces foreach --all --topological run lint) mirroring the existing test script — only @sourcebot/web defines a lint script today, but new packages with a lint script will be picked up automatically.
  • Fixes the 11 pre-existing @typescript-eslint/no-explicit-any errors in review-agent test files so the new workflow lands green. Replaces as any casts on mock Octokit / Gitlab clients with as unknown as Octokit / as unknown as GitlabClient.

Test plan

  • yarn lint exits 0 locally (0 errors, 7 pre-existing warnings remain)
  • The new Lint check appears and passes on this PR

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Set up automated linting workflow to run on pull requests
    • Added a root workspace lint script to run lint across all packages
    • Improved type safety in test infrastructure by replacing loose casts with concrete client typings

Review Change Stack

Review Change Stack

Adds a Lint workflow that fans out via a new root `lint` script
(mirroring the existing `test` script's foreach pattern) and fixes
the existing no-explicit-any errors in the review-agent test files
so the workflow lands green.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

@brendan-kellam your pull request is missing a changelog!

@coderabbitai

coderabbitai Bot commented May 13, 2026 •

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ad2fc3ed-0d1d-4260-87b5-f965093f83dc

📥 Commits

Reviewing files that changed from the base of the PR and between 3889335 and fd3efee.

📒 Files selected for processing (1)
  • .github/workflows/lint.yml
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/lint.yml

Walkthrough

Adds a GitHub Actions lint workflow (PRs to main) and a root lint script; updates review-agent tests to cast mocked GitHub and GitLab clients using Octokit and GitlabClient types instead of any.

Changes

Lint workflow and test type safety

Layer / File(s) Summary
Lint workflow and root script
.github/workflows/lint.yml, package.json
New GitHub Actions workflow runs yarn lint on pull requests to main, with root scripts.lint to invoke linting across all Yarn workspaces.
GitHub test typing improvements
packages/web/src/features/agents/review-agent/nodes/githubPrParser.test.ts, packages/web/src/features/agents/review-agent/nodes/githubPushPrReviews.test.ts
Imports Octokit and updates mock helpers and in-test mocks to cast mocked instances as Octokit instead of any.
GitLab test typing improvements
packages/web/src/features/agents/review-agent/nodes/gitlabMrParser.test.ts, packages/web/src/features/agents/review-agent/nodes/gitlabPushMrReviews.test.ts
Imports Gitlab, defines GitlabClient alias, and updates mock helpers and in-test mocks to cast mocked instances as GitlabClient instead of any.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding a lint workflow for pull requests. It is concise, clear, and specific to the primary purpose of the changeset.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch brendan/ci-lint-workflow

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
.github/workflows/lint.yml (1)

18-21: ⚡ Quick win

Consider enabling dependency caching for faster CI runs.

The setup-node action supports built-in caching for Yarn dependencies. Adding caching would significantly speed up subsequent workflow runs by reusing installed dependencies.

⚡ Proposed enhancement to enable Yarn caching
       - name: Use Node.js
         uses: actions/setup-node@v4
         with:
           node-version: '20.x'
+          cache: 'yarn'
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/lint.yml around lines 18 - 21, Update the GitHub Actions
step that uses actions/setup-node@v4 (the block containing node-version: '20.x')
to enable built-in dependency caching for Yarn by adding the cache option
(cache: 'yarn') and set cache-dependency-path to point at yarn.lock (e.g.,
cache-dependency-path: '**/yarn.lock'); this will allow setup-node to restore
and persist Yarn dependencies across runs and speed up CI.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In @.github/workflows/lint.yml:
- Around line 18-21: Update the GitHub Actions step that uses
actions/setup-node@v4 (the block containing node-version: '20.x') to enable
built-in dependency caching for Yarn by adding the cache option (cache: 'yarn')
and set cache-dependency-path to point at yarn.lock (e.g.,
cache-dependency-path: '**/yarn.lock'); this will allow setup-node to restore
and persist Yarn dependencies across runs and speed up CI.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 3ff5a45e-4d37-467f-afa7-0b1f34521512

📥 Commits

Reviewing files that changed from the base of the PR and between 70b8c70 and 3889335.

📒 Files selected for processing (6)
  • .github/workflows/lint.yml
  • package.json
  • packages/web/src/features/agents/review-agent/nodes/githubPrParser.test.ts
  • packages/web/src/features/agents/review-agent/nodes/githubPushPrReviews.test.ts
  • packages/web/src/features/agents/review-agent/nodes/gitlabMrParser.test.ts
  • packages/web/src/features/agents/review-agent/nodes/gitlabPushMrReviews.test.ts
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented May 13, 2026 •

Copy link
Copy Markdown
Contributor

License Audit

⚠️ Status: PASS

Metric Count
Total packages 2067
Resolved (non-standard) 20
Unresolved 0
Strong copyleft 0
Weak copyleft 38

Weak Copyleft Packages (informational)

Package Version License
@img/sharp-libvips-darwin-arm64 1.0.4 LGPL-3.0-or-later
@img/sharp-libvips-darwin-arm64 1.2.4 LGPL-3.0-or-later
@img/sharp-libvips-darwin-x64 1.0.4 LGPL-3.0-or-later
@img/sharp-libvips-darwin-x64 1.2.4 LGPL-3.0-or-later
@img/sharp-libvips-linux-arm 1.0.5 LGPL-3.0-or-later
@img/sharp-libvips-linux-arm 1.2.4 LGPL-3.0-or-later
@img/sharp-libvips-linux-arm64 1.0.4 LGPL-3.0-or-later
@img/sharp-libvips-linux-arm64 1.2.4 LGPL-3.0-or-later
@img/sharp-libvips-linux-ppc64 1.2.4 LGPL-3.0-or-later
@img/sharp-libvips-linux-riscv64 1.2.4 LGPL-3.0-or-later
@img/sharp-libvips-linux-s390x 1.0.4 LGPL-3.0-or-later
@img/sharp-libvips-linux-s390x 1.2.4 LGPL-3.0-or-later
@img/sharp-libvips-linux-x64 1.0.4 LGPL-3.0-or-later
@img/sharp-libvips-linux-x64 1.2.4 LGPL-3.0-or-later
@img/sharp-libvips-linuxmusl-arm64 1.0.4 LGPL-3.0-or-later
@img/sharp-libvips-linuxmusl-arm64 1.2.4 LGPL-3.0-or-later
@img/sharp-libvips-linuxmusl-x64 1.0.4 LGPL-3.0-or-later
@img/sharp-libvips-linuxmusl-x64 1.2.4 LGPL-3.0-or-later
@img/sharp-wasm32 0.33.5 Apache-2.0 AND LGPL-3.0-or-later AND MIT
@img/sharp-wasm32 0.34.5 Apache-2.0 AND LGPL-3.0-or-later AND MIT
@img/sharp-win32-arm64 0.34.5 Apache-2.0 AND LGPL-3.0-or-later
@img/sharp-win32-ia32 0.33.5 Apache-2.0 AND LGPL-3.0-or-later
@img/sharp-win32-ia32 0.34.5 Apache-2.0 AND LGPL-3.0-or-later
@img/sharp-win32-x64 0.33.5 Apache-2.0 AND LGPL-3.0-or-later
@img/sharp-win32-x64 0.34.5 Apache-2.0 AND LGPL-3.0-or-later
axe-core 4.10.3 MPL-2.0
lightningcss 1.32.0 MPL-2.0
lightningcss-android-arm64 1.32.0 MPL-2.0
lightningcss-darwin-arm64 1.32.0 MPL-2.0
lightningcss-darwin-x64 1.32.0 MPL-2.0
lightningcss-freebsd-x64 1.32.0 MPL-2.0
lightningcss-linux-arm-gnueabihf 1.32.0 MPL-2.0
lightningcss-linux-arm64-gnu 1.32.0 MPL-2.0
lightningcss-linux-arm64-musl 1.32.0 MPL-2.0
lightningcss-linux-x64-gnu 1.32.0 MPL-2.0
lightningcss-linux-x64-musl 1.32.0 MPL-2.0
lightningcss-win32-arm64-msvc 1.32.0 MPL-2.0
lightningcss-win32-x64-msvc 1.32.0 MPL-2.0
Resolved Packages (20)
Package Version Original Resolved Source
@react-grab/cli 0.1.23 UNKNOWN MIT GitHub repo aidenybai/react-grab (LICENSE file = MIT, same maintainer email aiden.bai05@gmail.com on npm)
@react-grab/cli 0.1.29 UNKNOWN MIT GitHub repo aidenybai/react-grab (LICENSE file = MIT, same maintainer email aiden.bai05@gmail.com on npm)
@react-grab/mcp 0.1.29 UNKNOWN MIT GitHub repo aidenybai/react-grab (LICENSE file = MIT, same maintainer email aiden.bai05@gmail.com on npm)
@sentry/cli 2.58.5 FSL-1.1-MIT FSL-1.1-MIT Functional Source License (Sentry) — well-known source-available license; identifier used as-is (not on SPDX list)
@sentry/cli-darwin 2.58.5 FSL-1.1-MIT FSL-1.1-MIT Functional Source License (Sentry) — well-known source-available license; identifier used as-is (not on SPDX list)
@sentry/cli-linux-arm 2.58.5 FSL-1.1-MIT FSL-1.1-MIT Functional Source License (Sentry) — well-known source-available license; identifier used as-is (not on SPDX list)
@sentry/cli-linux-arm64 2.58.5 FSL-1.1-MIT FSL-1.1-MIT Functional Source License (Sentry) — well-known source-available license; identifier used as-is (not on SPDX list)
@sentry/cli-linux-i686 2.58.5 FSL-1.1-MIT FSL-1.1-MIT Functional Source License (Sentry) — well-known source-available license; identifier used as-is (not on SPDX list)
@sentry/cli-linux-x64 2.58.5 FSL-1.1-MIT FSL-1.1-MIT Functional Source License (Sentry) — well-known source-available license; identifier used as-is (not on SPDX list)
@sentry/cli-win32-arm64 2.58.5 FSL-1.1-MIT FSL-1.1-MIT Functional Source License (Sentry) — well-known source-available license; identifier used as-is (not on SPDX list)
@sentry/cli-win32-i686 2.58.5 FSL-1.1-MIT FSL-1.1-MIT Functional Source License (Sentry) — well-known source-available license; identifier used as-is (not on SPDX list)
@sentry/cli-win32-x64 2.58.5 FSL-1.1-MIT FSL-1.1-MIT Functional Source License (Sentry) — well-known source-available license; identifier used as-is (not on SPDX list)
codemirror-lang-elixir 4.0.0 UNKNOWN Apache-2.0 GitHub repo livebook-dev/codemirror-lang-elixir (GitHub License API: Apache-2.0); npm registry latest version reports Apache-2.0
element-source 0.0.3 UNKNOWN MIT GitHub repo aidenybai/element-source (GitHub License API: MIT)
lezer-elixir 1.1.2 UNKNOWN Apache-2.0 GitHub repo livebook-dev/lezer-elixir (GitHub License API: Apache-2.0); npm registry latest version reports Apache-2.0
map-stream 0.1.0 UNKNOWN MIT GitHub repo dominictarr/map-stream (GitHub License API: MIT); npm registry latest version reports MIT
memorystream 0.3.1 UNKNOWN MIT Extracted from package.json "licenses" array object: {type: "MIT", url: ".../LICENSE"}
pause-stream 0.0.11 MIT,Apache2 MIT OR Apache-2.0 Extracted from legacy license array ["MIT", "Apache2"] in package.json — dual licensed
posthog-js 1.369.0 SEE LICENSE IN LICENSE Apache-2.0 Inspected LICENSE file in PostHog/posthog-js repo: "Licensed under the Apache License, Version 2.0"
valid-url 1.0.9 UNKNOWN MIT Inspected LICENSE file in ogt/valid-url repo: "This software is released under the MIT license"
@brendan-kellam
brendan-kellam merged commit 7e589fc into main May 13, 2026
9 checks passed
@brendan-kellam
brendan-kellam deleted the brendan/ci-lint-workflow branch May 13, 2026 03:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant