Skip to content

Switch to Claude CLI #9

Closed
Closed

Description

@ondrejmirtes

@phpstan-bot In the org-wide workflow, I want to switch to Claude CLI instead of the Claude GitHub Action. Install the CLI with npm install -g @anthropic-ai/claude-code and built a prompt similar to the action - "You're in repository X, blablabla, make this change, send a PR..."

Send a PR with the change.

Activity

  1. ondrejmirtes commented on Feb 19, 2026

    @ondrejmirtes
    MemberAuthor

    @phpstan-bot In the org-wide workflow, I want to switch to Claude CLI instead of the Claude GitHub Action. Install the CLI with npm install -g @anthropic-ai/claude-code and built a prompt similar to the action - "You're in repository X, blablabla, make this change, send a PR..."

    Send a PR with the change.

    Also I want to fix the react-on-comment workflow so that it works properly on issue.opened. Apparently the github.event.comment.body || github.event.review.body is empty in that case and the issue description is in a different field.

  2. phpstan-bot commented on Feb 19, 2026

    @phpstan-bot
    Contributor

    Claude finished @ondrejmirtes's task in 3m 34s —— View job • claude/issue-9-20260219-0720 • Create PR ➔


    Changes completed

    • Read current workflow files and understand the setup
    • Switch org-wide workflow to Claude CLI instead of GitHub Action
    • Fix issue.opened event handling for empty comment body
    • Commit, push, and create PR

    Summary

    claude-org-wide.yml — Replaced anthropics/claude-code-action@v1 with direct Claude CLI usage:

    • Added Node.js setup (actions/setup-node@v4)
    • Installs CLI via npm install -g @anthropic-ai/claude-code
    • Configures git identity for phpstan-bot[bot]
    • Runs claude -p with a prompt that includes the repository name and the issue comment body, using --model claude-opus-4-6 and --dangerously-skip-permissions
    • Authentication via CLAUDE_CODE_OAUTH_TOKEN env var, GitHub operations via GH_TOKEN

    claude-react-on-comment.yml — Fixed issue.opened trigger:

    • Added github.event.issue.body to the COMMENT_BODY fallback chain (github.event.comment.body || github.event.review.body || github.event.issue.body || '') so the trigger phrase is correctly detected when an issue is opened

    |

  3. added a commit that references this issue on Feb 19, 2026
    eaffced
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions