Skip to content

chore: add Claude Code and code review workflows - #6165

Merged
Artur- merged 2 commits into
mainfrom
chore/claude-github-workflows
Sep 4, 2026
Merged

Artur- merged 2 commits into
mainfrom
chore/claude-github-workflows

Conversation

@sissbruecker

@sissbruecker sissbruecker commented Sep 4, 2026 •

Copy link
Copy Markdown
Member

Description

Adds the Claude Code (@claude) and code review workflows, using the shared actions from vaadin/github-actions with the same triggers and eligibility rules as in flow-components and web-components.

Repo-specific parts:

  • claude.yml reuses .github/actions/setup for the toolchain, provides Chrome for the browser-based Vitest tests (CHROME_BIN, as in validation.yml), and installs the TestBench license. Allowed tools on top of the base list: mvn, npm ci / npm install, npm run / npm test, npx nx|vitest|tsc|eslint|prettier, and the Gradle wrappers. Nothing is prebuilt; the injected instructions tell Claude that cross-package TypeScript tests need npm run build first and to avoid running the integration test suites wholesale.
  • code-review.yml also reviews PRs opened by the totally-not-ai app. The app is not an org member, so the check job allows it explicitly.
  • Both clone vaadin/flow as a read-only reference checkout.
  • The review job drops id-token: write, which the code-review action does not use.

Requires the ANTHROPIC_API_KEY secret and the org secret VAADIN_REVIEW_BOT to be shared with this repository.

Type of change

  • Chore

Adds two GitHub Actions workflows based on the shared actions in
vaadin/github-actions, following the setup in flow, flow-components and
web-components:

- claude.yml runs Claude Code when a maintainer tags @claude in an issue
  or PR comment or review. It reuses the repository's setup action for
  Node, JDK and dependencies, provides Chrome for the browser-based
  Vitest tests, and allows the Maven, npm, npx and Gradle commands
  needed to build and test this repository.
- code-review.yml reviews pull requests when they are opened or marked
  ready for review, on a /code-review comment, or on a review request
  for vaadin-review-bot. PRs opened by the totally-not-ai app are
  reviewed as well.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@cla-assistant

cla-assistant Bot commented Sep 4, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@codecov

codecov Bot commented Sep 4, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.27%. Comparing base (48716c0) to head (54eac3e).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6165   +/-   ##
=======================================
  Coverage   86.27%   86.27%           
=======================================
  Files         129      129           
  Lines        8875     8875           
  Branches     1369     1369           
=======================================
  Hits         7657     7657           
  Misses       1194     1194           
  Partials       24       24           
Flag Coverage Δ
unittests 86.27% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

…n actions (#6166)

Follow-up fixes to the Claude GitHub workflows added on the base branch.

## TestBench license guard never worked

The `Install TestBench license` step was guarded with `if:
env.TB_LICENSE != ''`, which can never be true: a step condition sees
neither the `secrets` context nor the step's own `env`, so the
expression always evaluated to an empty string and the step was silently
skipped — the `~/.vaadin/proKey` file was never written, even when the
secret was set.

The guard now lives inside the script, where the step `env` is actually
available, and logs a message when the secret is absent.

## Don't persist credentials when checking out untrusted PR code

`code-review.yml` checks out `refs/pull/<n>/head`, i.e. code from an
arbitrary contributor, while the job token has write access to issues
and pull requests. `actions/checkout` leaves that token in the local git
config by default, so anything running in the tree can use it. The
checkout now uses `persist-credentials: false`; the review action
receives its own token through the `github-token` input, so nothing is
lost.

## Pin actions to full commit SHAs

SonarQube flags actions referenced by a mutable tag or branch (rule
S7637, security vulnerability), which failed the quality gate on the PR
that introduced these workflows. `browser-actions/setup-chrome` and the
two shared `vaadin/github-actions` actions are now pinned to full commit
SHAs, with the readable version kept in a trailing comment — the same
convention `codecov-action` already uses in `validation.yml`.

---------

Co-authored-by: totally-not-ai[bot] <290682512+totally-not-ai[bot]@users.noreply.github.com>
@sonarqubecloud

sonarqubecloud Bot commented Sep 4, 2026

Copy link
Copy Markdown

@Artur-
Artur- enabled auto-merge (squash) September 4, 2026 07:55
@Artur-
Artur- merged commit 8e5689c into main Sep 4, 2026
12 checks passed
@Artur-
Artur- deleted the chore/claude-github-workflows branch September 4, 2026 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants