Skip to content

ci(claude): install pnpm deps and allow build commands for Claude - #31

Merged
dragon-fish merged 1 commit into
masterfrom
ci/claude-allow-pnpm
Oct 7, 2026
Merged

dragon-fish merged 1 commit into
masterfrom
ci/claude-allow-pnpm

Conversation

@dragon-fish

@dragon-fish dragon-fish commented Oct 7, 2026 •

Copy link
Copy Markdown
Member

Sourcery 总结

支持 Claude Code CI 运行安装项目依赖,并执行已批准的构建和验证命令。

增强功能:

  • 在执行前,为 Claude Code 工作流准备 Node.js 和 pnpm 依赖。
  • 允许 Claude Code 运行基于 pnpm 的依赖管理、构建、脚本和 TypeScript 命令。

CI:

  • 更新 Claude CI 工作流,为其配置 JavaScript 依赖,并授权所需的构建命令。
Original summary in English

Summary by Sourcery

Enable Claude Code CI runs to install project dependencies and execute approved build and validation commands.

Enhancements:

  • Prepare the Claude Code workflow with Node.js and pnpm dependencies before execution.
  • Permit Claude Code to run pnpm-based dependency, build, script, and TypeScript commands.

CI:

  • Update the Claude CI workflow to provision its JavaScript dependencies and authorize required build commands.

@sourcery-ai

sourcery-ai Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
审阅者指南(小型 PR 中折叠显示)

审阅者指南

Claude CI 工作流现在会配置 LTS Node.js/pnpm 环境,并在运行 Claude Code 前安装项目依赖;同时扩展其允许使用的工具,以支持依赖管理、构建、脚本和 TypeScript 命令。

Claude CI 环境设置流程图

flowchart TD
    Checkout[Checkout repository] --> Node[Setup LTS Node.js]
    Node --> Pnpm[Install pnpm globally]
    Pnpm --> Dependencies[Install project dependencies with pnpm i]
    Dependencies --> Claude[Run Claude Code]
    Claude --> Commands[Allow dependency, build, script, and TypeScript commands]
Loading

文件级变更

变更 详细信息 文件
在调用 Claude Code 之前,为 Claude 工作流准备 Node/pnpm 项目环境。
  • 使用 setup-node action 设置最新的 LTS Node.js 运行时。
  • 全局安装 pnpm,并使用 pnpm 安装项目依赖。
.github/workflows/claude.yml
扩展 Claude Code 允许执行的 Shell 命令,以支持依赖管理、构建、脚本和 TypeScript 检查。
  • 允许使用 pnpm install 的各种变体、安装软件包、构建、脚本和 pnpm exec。
  • 允许调用 npx TypeScript 编译器。
.github/workflows/claude.yml

提示和命令

与 Sourcery 互动

  • 触发新的审阅: 在拉取请求中评论 @sourcery-ai review。
  • 继续讨论: 直接回复 Sourcery 的审阅评论。
  • 根据审阅评论生成 GitHub issue: 回复审阅评论,请 Sourcery 根据该评论创建 issue。你也可以回复审阅评论 @sourcery-ai issue,根据该评论创建 issue。
  • 生成拉取请求标题: 在拉取请求标题的任意位置写入 @sourcery-ai,即可随时生成标题。你也可以在拉取请求中评论 @sourcery-ai title,随时生成或重新生成标题。
  • 生成拉取请求摘要: 在拉取请求正文中需要摘要显示的位置写入 @sourcery-ai summary,即可随时在指定位置生成 PR 摘要。你也可以在拉取请求中评论 @sourcery-ai summary,随时生成或重新生成摘要。
  • 生成审阅者指南: 在拉取请求中评论 @sourcery-ai guide,即可随时生成或重新生成审阅者指南。
  • 解决所有 Sourcery 评论: 在拉取请求中评论 @sourcery-ai resolve,即可解决所有 Sourcery 评论。如果你已经处理完所有评论且不想再看到它们,这项功能会很有用。
  • 忽略所有 Sourcery 审阅: 在拉取请求中评论 @sourcery-ai dismiss,即可忽略所有现有的 Sourcery 审阅。如果你想从头开始新的审阅,这项功能尤其有用——别忘了评论 @sourcery-ai review 以触发新的审阅!

自定义你的体验

访问你的控制面板以:

  • 启用或禁用审阅功能,例如 Sourcery 生成的拉取请求摘要、审阅者指南等。
  • 更改审阅语言。
  • 添加、移除或编辑自定义审阅说明。
  • 调整其他审阅设置。

获取帮助

Original review guide in English
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

The Claude CI workflow now provisions an LTS Node.js/pnpm environment and installs project dependencies before running Claude Code, while expanding its allowed tools to support dependency, build, script, and TypeScript commands.

Flow diagram for Claude CI environment setup

flowchart TD
    Checkout[Checkout repository] --> Node[Setup LTS Node.js]
    Node --> Pnpm[Install pnpm globally]
    Pnpm --> Dependencies[Install project dependencies with pnpm i]
    Dependencies --> Claude[Run Claude Code]
    Claude --> Commands[Allow dependency, build, script, and TypeScript commands]
Loading

File-Level Changes

Change Details Files
Prepare the Claude workflow with a Node/pnpm project environment before invoking Claude Code.
  • Set up the latest LTS Node.js runtime using the setup-node action.
  • Install pnpm globally and install project dependencies with pnpm.
.github/workflows/claude.yml
Expand Claude Code’s permitted shell commands for dependency management, builds, scripts, and TypeScript checks.
  • Allow pnpm install variants, package installation, builds, scripts, and pnpm exec.
  • Allow npx TypeScript compiler invocations.
.github/workflows/claude.yml

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

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying ipe-plugin-registry with  Cloudflare Pages  Cloudflare Pages

Latest commit: 709922b
Status: ✅  Deploy successful!
Preview URL: https://7ca9695d.plugin-registry.pages.dev
Branch Preview URL: https://ci-claude-allow-pnpm.plugin-registry.pages.dev

View logs

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

嘿——我已经审查了你的更改,整体看起来很棒!

Sourcery 评估

需要人工审查。 此更改修改了 Claude 工作流的执行策略,并授予代理安装软件包、运行软件包脚本以及执行任意 pnpm exec 命令的能力。如果这一信任边界过于宽泛,提示词或由仓库控制的脚本可能会执行非预期代码,或暴露 CI 凭据;回滚可以移除后续运行的权限,但无法撤销已经执行的任何操作。


Sourcery 对开源项目免费——如果您喜欢我们的审查,请考虑分享一下 ✨
Original comment in English

Hey - I've reviewed your changes and they look great!

Sourcery assessment

Needs a human reviewer. This changes the Claude workflow's execution policy and grants the agent package-install, package-script, and arbitrary pnpm exec capabilities. If that trust boundary is too broad, a prompt or repository-controlled script could execute unintended code or expose CI credentials; reverting removes the permission for future runs, but cannot undo anything already executed.


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

@dragon-fish
dragon-fish merged commit 29631c5 into master Oct 7, 2026
4 checks passed
@dragon-fish
dragon-fish deleted the ci/claude-allow-pnpm branch October 7, 2026 14:42
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.

1 participant