Skip to content

Add Claude review workflow (0xsequence#1001)#560

Merged
Dargon789 merged 2 commits into
Dargon789:mainfrom
0xsequence:master
May 19, 2026
Merged

Add Claude review workflow (0xsequence#1001)#560
Dargon789 merged 2 commits into
Dargon789:mainfrom
0xsequence:master

Conversation

@Dargon789
Copy link
Copy Markdown
Owner

@Dargon789 Dargon789 commented May 17, 2026

Summary by Sourcery

Integrate Claude Code as a GitHub workflow and adjust dependency and workspace configuration.

New Features:

  • Add a GitHub Actions workflow that triggers Claude Code on @claude mentions in issues, comments, and pull request reviews.

Build:

  • Relax pnpm minimumReleaseAge from two weeks to one week in the workspace configuration.
  • Bump Next.js dependency to 15.5.16 for the docs and web packages.

CI:

  • Configure the Claude Code GitHub Action with appropriate repository and actions permissions.

@bolt-new-by-stackblitz
Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented May 17, 2026

Reviewer's Guide

Introduces a Claude Code GitHub Actions workflow for AI-assisted code reviews and issue handling, updates Next.js to 15.5.16 in docs and web packages, and relaxes the pnpm minimum release age from two weeks to one week with corresponding lockfile updates.

Sequence diagram for the new Claude Code GitHub Actions workflow

sequenceDiagram
  actor Developer
  participant GitHub
  participant ClaudeWorkflow as Claude_Code_workflow
  participant ClaudeAction as anthropics_claude_code_action_v1
  participant AnthropicAPI

  Developer->>GitHub: issue_comment / review / issue with @claude
  GitHub->>ClaudeWorkflow: issue_comment / pull_request_review / issues event
  ClaudeWorkflow->>ClaudeWorkflow: evaluate if condition
  ClaudeWorkflow->>ClaudeAction: run anthropics/claude-code-action@v1
  ClaudeAction->>AnthropicAPI: call Claude using anthropic_api_key
  AnthropicAPI-->>ClaudeAction: review / suggestions
  ClaudeAction-->>GitHub: update PR / issue via GitHub API
  GitHub-->>Developer: updated comments / reviews from Claude
Loading

File-Level Changes

Change Details Files
Add GitHub Actions workflow to run Claude Code on mentions in issues, comments, and PR reviews.
  • Create a claude.yml workflow triggered by issue comments, pull request review comments, pull request reviews, and issues containing the @claude mention.
  • Configure conditional execution to only run when @claude appears in relevant event bodies or titles.
  • Set job permissions for contents, pull-requests, issues, id-token, and actions to allow Claude to analyze code and CI status.
  • Use anthropics/claude-code-action@v1 with the Anthropic API key from secrets and optional configuration hooks (additional_permissions, prompt, claude_args).
.github/workflows/claude.yml
Update Next.js dependency version for docs and web packages.
  • Bump next from ^15.5.15 to ^15.5.16 in the docs package.
  • Bump next from ^15.5.15 to ^15.5.16 in the web package.
extras/docs/package.json
extras/web/package.json
Relax pnpm workspace release-age restriction and sync lockfile.
  • Lower minimumReleaseAge from 20160 minutes (2 weeks) to 10080 minutes (1 week) to allow newer package versions sooner.
  • Update pnpm-lock.yaml to align with the new dependency and release-age settings.
pnpm-workspace.yaml
pnpm-lock.yaml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@snyk-io
Copy link
Copy Markdown

snyk-io Bot commented May 17, 2026

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@mergify
Copy link
Copy Markdown

mergify Bot commented May 17, 2026

⚠️ The sha of the head commit of this PR conflicts with #559. Mergify cannot evaluate rules on this PR. Once #559 is merged or closed, Mergify will resume processing this PR. ⚠️

Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Hey - I've found 1 issue, and left some high level feedback:

  • The minimumReleaseAge change in pnpm-workspace.yaml contradicts the existing comment # DO NOT REMOVE OR MODIFY ... without approval; if this adjustment is intentional, consider updating the comment or referencing the approval to avoid confusion for future maintainers.
  • The Claude workflow currently listens to multiple events (issue_comment, pull_request_review_comment, issues, pull_request_review) and checks for @claude in several places; you may want to narrow or centralize the trigger conditions (for example, only comments) to reduce accidental invocations and simplify the if expression.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The `minimumReleaseAge` change in `pnpm-workspace.yaml` contradicts the existing comment `# DO NOT REMOVE OR MODIFY ... without approval`; if this adjustment is intentional, consider updating the comment or referencing the approval to avoid confusion for future maintainers.
- The Claude workflow currently listens to multiple events (`issue_comment`, `pull_request_review_comment`, `issues`, `pull_request_review`) and checks for `@claude` in several places; you may want to narrow or centralize the trigger conditions (for example, only comments) to reduce accidental invocations and simplify the `if` expression.

## Individual Comments

### Comment 1
<location path=".github/workflows/claude.yml" line_range="33-35" />
<code_context>
+        with:
+          fetch-depth: 1
+
+      - name: Run Claude Code
+        id: claude
+        uses: anthropics/claude-code-action@v1
+        with:
+          anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY_GITHUB_ACTIONS }}
</code_context>
<issue_to_address>
**🚨 suggestion (security):** Pin the GitHub Action to a specific commit SHA instead of a floating major tag to reduce supply-chain risk.

Using a floating tag like `@v1` means future (including potentially breaking or compromised) changes are picked up automatically. For security-sensitive workflows, especially those with PR/issue access, reference a specific commit SHA instead (e.g., `anthropics/claude-code-action@<commit-sha>`) and update it deliberately when you want to adopt changes.

Suggested implementation:

```
      - name: Run Claude Code
        id: claude
        # Pin to a specific commit SHA to avoid floating tags and reduce supply-chain risk
        # Replace <commit-sha> with a vetted commit from https://github.com/anthropics/claude-code-action/commits/main
        uses: anthropics/claude-code-action@<commit-sha>
        with:

```

1. Go to https://github.com/anthropics/claude-code-action/commits/main and copy the full commit SHA of the version you want to pin.
2. Replace `<commit-sha>` in the `uses: anthropics/claude-code-action@<commit-sha>` line with that exact SHA (e.g., `uses: anthropics/claude-code-action@abcdef1234567890...`).
3. Optionally add a comment noting the pinned version (e.g., tag or date) to make future updates easier.
</issue_to_address>

Fix all in Cursor


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread .github/workflows/claude.yml
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the next dependency from version 15.5.15 to 15.5.16 across the documentation and web packages, with the lockfile resolving to 15.5.18. It also adds libc platform metadata to several packages in the lockfile. A critical feedback point was raised regarding the modification of minimumReleaseAge in pnpm-workspace.yaml, which reduces the safety buffer for new package releases and violates the stated project policy against modifying this setting without explicit approval.

Comment thread pnpm-workspace.yaml
@@ -1,4 +1,4 @@
minimumReleaseAge: 20160 # 60 * 24 * 7 * 2 = do not install package releases that are not at least 2 weeks old
minimumReleaseAge: 10080 # 60 * 24 * 7 = do not install package releases that are not at least 1 week old
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The modification of minimumReleaseAge from 2 weeks to 1 week violates the project policy stated on line 2, which explicitly forbids changes to this setting without approval. Reducing this value decreases the safety buffer against potentially malicious or broken recent package releases. This configuration should only be adjusted with explicit approval from the appropriate stakeholders.

minimumReleaseAge: 20160 # 60 * 24 * 7 * 2 = do not install package releases that are not at least 2 weeks old

@Dargon789 Dargon789 linked an issue May 17, 2026 that may be closed by this pull request
@Dargon789 Dargon789 merged commit 0088d8a into Dargon789:main May 19, 2026
9 of 13 checks passed
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.

Sequence diagram for the new Claude Code GitHub Actions workflow

2 participants