Skip to content

Commit 24679fe

Browse files
authored
chore: add Claude Renovate PR review workflow
chore: add Claude Renovate PR review workflow
2 parents 08fe55e + eadda1c commit 24679fe

2 files changed

Lines changed: 150 additions & 0 deletions

File tree

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# collect-js-react-private Dependency Map
2+
3+
## Project Structure
4+
5+
`@vgs/collect-js-react` is a React wrapper library for VGS Collect.js. It is a
6+
single-package Node.js project (yarn v1) that publishes a compiled library with
7+
no runtime dependencies.
8+
9+
- `src/` — Library source (React components: Fields, Form, Session, provider)
10+
- `src/tests/` — Unit tests (Jest + Testing Library)
11+
- `examples/demo/` — Demo app (Vite + React)
12+
- `examples/compat/` — Cross-version compatibility test fixtures (React 16–19)
13+
- `scripts/` — Build/release scripts
14+
15+
**Key characteristic:** The `dependencies` field is empty — all npm packages are
16+
either `peerDependencies` (react, react-dom) or `devDependencies`. This means
17+
Renovate updates only affect the dev/build/test toolchain, not the published
18+
package's runtime behavior.
19+
20+
## Dependency Categories
21+
22+
### Always Low Risk (Auto-merge Candidates)
23+
24+
| Pattern | Example | Reason |
25+
|---------|---------|--------|
26+
| Type definition packages | `@types/jest`, `@types/node`, `@types/react`, `@types/react-dom` | Type-only, no runtime impact |
27+
| Test-only dependencies | `@testing-library/dom`, `@testing-library/jest-dom`, `@testing-library/react`, `@testing-library/user-event`, `jest`, `ts-jest` | Test scope only, unit tests validate correctness |
28+
| Lint/format tools | `prettier`, `eslint-config-prettier`, `eslint-config-standard`, `eslint-config-standard-react` | Code style only, no runtime impact |
29+
| ESLint plugins (patch/minor) | `eslint-plugin-prettier`, `eslint-plugin-promise`, `eslint-plugin-node`, `eslint-plugin-import`, `eslint-plugin-react` | Lint rules only |
30+
| Build utilities | `cross-env`, `npm-run-all` | Script runners, no build output impact |
31+
| Compat-test React aliases | `react-16`, `react-17`, `react-18`, `react-19`, `react-dom-16`, `react-dom-17`, `react-dom-18`, `react-dom-19` | Only used in compat test fixtures |
32+
33+
### Needs Quick Review
34+
35+
| Pattern | Example | Reason | Expected Test Coverage |
36+
|---------|---------|--------|----------------------|
37+
| Babel plugins | `@babel/eslint-parser`, `@babel/plugin-transform-react-jsx` | Used in ESLint parsing and JSX transform; minor bumps safe | Lint + build tests |
38+
| ESLint core (minor) | `eslint` | Lint engine — minor/patch safe | `test:lint` script |
39+
| TypeScript (patch) | `typescript` | Compiler — patch bumps safe, minor may flag new errors | `build` + `test:unit` |
40+
| Playwright | `playwright-core` | UI compat tests only | `compat:test:ui` scripts |
41+
| Replacement packages | `npm-run-all2`, `eslint-plugin-n` | Drop-in replacements for deprecated packages | Full test suite |
42+
43+
### Needs Deep Review
44+
45+
| Pattern | Example | Reason | Expected Test Coverage |
46+
|---------|---------|--------|----------------------|
47+
| React / React DOM (peer dep range) | `react`, `react-dom` (dev install) | Dev install matches peer dep range; major bumps affect compat testing | Unit + compat build/UI tests |
48+
| VGS Collect.js SDK | `@vgs/collect-js` | Core upstream SDK this library wraps — API changes directly affect library behavior | Unit tests + compat tests |
49+
| TypeScript (major) | `typescript` | Major bumps can break compilation | Build + all tests |
50+
| Build toolchain | `tsdown`, `vite`, `@vitejs/plugin-react` | Produce the published dist artifacts — changes can affect output bundles | `build`, `demo:build`, `compat:build` |
51+
| ESLint core (major) | `eslint`, `@typescript-eslint/*` | Major bumps may require config migration | `test:lint` |
52+
| react-router-dom | `react-router-dom` | Used in demo app; major bumps need migration | `demo:build` |
53+
54+
## Historical Patterns (from PR analysis)
55+
56+
There are currently 10 open Renovate PRs, mostly minor/patch bumps to dev
57+
tooling:
58+
59+
- **Lint plugins**: eslint-plugin-react, eslint-plugin-import (minor bumps)
60+
- **Build tools**: postcss (resolution override), typescript (patch), prettier (patch)
61+
- **Babel**: @babel/plugin-transform-react-jsx (patch)
62+
- **Replacements**: npm-run-all → npm-run-all2, eslint-plugin-node → eslint-plugin-n
63+
- **Pin dependencies**: Two PRs to pin react monorepo and other floating deps
64+
65+
The volume is moderate. Most PRs are low-risk dev tooling updates that have been
66+
open since January 2026, suggesting no active review cadence is in place.
67+
68+
## Renovate Configuration
69+
70+
The `renovate.json` is minimal — it contains only the JSON schema reference and
71+
no custom configuration:
72+
73+
```json
74+
{
75+
"$schema": "https://docs.renovatebot.com/renovate-schema.json"
76+
}
77+
```
78+
79+
This means Renovate uses the default preset with no custom grouping, automerge
80+
rules, package rules, or label configuration. The `renovate` label seen on
81+
existing PRs is likely applied by an org-level Renovate config or default
82+
behavior.
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
---
2+
## Automated Renovate PR review via Claude Code.
3+
## Triggers when a PR receives the renovate label, on an hourly schedule
4+
## (batch triage), or manually via workflow_dispatch. Calls the shared
5+
## claude-renovate-review workflow from cicd-shared which provides the
6+
## review skill and claude-code-action infrastructure.
7+
##
8+
## Manual testing:
9+
## gh workflow run claude-renovate-review.yaml -f pr_number=<PR>
10+
11+
name: claude renovate review
12+
13+
on:
14+
pull_request:
15+
types: [labeled]
16+
schedule:
17+
- cron: '0 */4 * * *'
18+
workflow_dispatch:
19+
inputs:
20+
pr_number:
21+
description: 'PR number to review (for manual testing)'
22+
type: string
23+
required: true
24+
25+
jobs:
26+
resolve-pr:
27+
runs-on: ubuntu-latest
28+
outputs:
29+
pr_number: ${{ steps.resolve.outputs.pr_number }}
30+
should_review: ${{ steps.resolve.outputs.should_review }}
31+
steps:
32+
- name: Resolve PR number and check label
33+
id: resolve
34+
env:
35+
GH_TOKEN: ${{ github.token }}
36+
GH_REPO: ${{ github.repository }}
37+
EVENT_NAME: ${{ github.event_name }}
38+
DISPATCH_PR: ${{ inputs.pr_number }}
39+
PR_LABEL: ${{ github.event.label.name }}
40+
PR_NUMBER: ${{ github.event.pull_request.number }}
41+
run: |
42+
if [[ "$EVENT_NAME" == "workflow_dispatch" ]]; then
43+
echo "pr_number=$DISPATCH_PR" >> "$GITHUB_OUTPUT"
44+
echo "should_review=true" >> "$GITHUB_OUTPUT"
45+
elif [[ "$EVENT_NAME" == "schedule" ]]; then
46+
echo "pr_number=" >> "$GITHUB_OUTPUT"
47+
echo "should_review=true" >> "$GITHUB_OUTPUT"
48+
elif [[ "$PR_LABEL" == "renovate" ]]; then
49+
echo "pr_number=$PR_NUMBER" >> "$GITHUB_OUTPUT"
50+
echo "should_review=true" >> "$GITHUB_OUTPUT"
51+
else
52+
echo "::notice::Label is not renovate -- skipping"
53+
echo "pr_number=" >> "$GITHUB_OUTPUT"
54+
echo "should_review=false" >> "$GITHUB_OUTPUT"
55+
fi
56+
57+
review:
58+
needs: resolve-pr
59+
if: ${{ needs.resolve-pr.outputs.should_review == 'true' }}
60+
uses: >-
61+
verygood-ops/cicd-shared/.github/workflows/claude-renovate-review.yaml@main
62+
with:
63+
pr_number: ${{ needs.resolve-pr.outputs.pr_number }}
64+
secrets:
65+
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
66+
VGS_GITHUB_CI_BOT_APP_ID: ${{ secrets.VGS_GITHUB_CI_BOT_APP_ID }}
67+
VGS_GITHUB_CI_BOT_APP_PEM_FILE: >-
68+
${{ secrets.VGS_GITHUB_CI_BOT_APP_PEM_FILE }}

0 commit comments

Comments
 (0)