Skip to content

feat: anthropic setup#27

Merged
frank-mendez merged 3 commits into
mainfrom
feature/anthropic-setup
Mar 23, 2026
Merged

feat: anthropic setup#27
frank-mendez merged 3 commits into
mainfrom
feature/anthropic-setup

Conversation

@frank-mendez

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings March 23, 2026 15:27
@vercel

vercel Bot commented Mar 23, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
react-typescript-spotify Ready Ready Preview, Comment Mar 23, 2026 3:34pm

Copilot AI 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.

Pull request overview

Adds a GitHub Actions workflow to run the Anthropic Claude Code action in response to @claude mentions on issues and issue comments, enabling automated assistance directly from GitHub events.

Changes:

  • Introduces .github/workflows/claude.yml workflow triggered on issue creation/assignment and new comments containing @claude.
  • Runs anthropics/claude-code-action with an API key from secrets.ANTHROPIC_TOKEN.

Comment thread .github/workflows/claude.yml Outdated
Comment on lines +12 to +13
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
(github.event_name == 'issues' && contains(github.event.issue.body, '@claude'))

Copilot AI Mar 23, 2026

Copy link

Choose a reason for hiding this comment

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

The workflow can be triggered by any user who opens an issue or comments with @claude. For issues/issue_comment events, secrets are available to the workflow in the base repo context, which makes this a privilege-escalation risk (untrusted users can trigger runs that have access to secrets.ANTHROPIC_TOKEN). Add an allowlist check (e.g., author_association in OWNER/MEMBER/COLLABORATOR) and/or restrict to trusted actors before running the job.

Suggested change
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
(github.event_name == 'issues' && contains(github.event.issue.body, '@claude'))
(
github.event_name == 'issue_comment' &&
contains(github.event.comment.body, '@claude') &&
(
github.event.comment.author_association == 'OWNER' ||
github.event.comment.author_association == 'MEMBER' ||
github.event.comment.author_association == 'COLLABORATOR'
)
) || (
github.event_name == 'issues' &&
contains(github.event.issue.body, '@claude') &&
(
github.event.issue.author_association == 'OWNER' ||
github.event.issue.author_association == 'MEMBER' ||
github.event.issue.author_association == 'COLLABORATOR'
)
)

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/claude.yml Outdated
(github.event_name == 'issues' && contains(github.event.issue.body, '@claude'))
runs-on: ubuntu-latest
permissions:
contents: write

Copilot AI Mar 23, 2026

Copy link

Choose a reason for hiding this comment

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

Job permissions are very broad (contents: write, issues: write). If Claude only needs to comment on PRs/issues, prefer least-privilege permissions (e.g., contents: read and only the specific write scopes needed). Keeping contents: write enables pushing commits/tags if this workflow is ever abused.

Suggested change
contents: write
contents: read

Copilot uses AI. Check for mistakes.
fetch-depth: 1

- name: Run Claude Code
uses: anthropics/claude-code-action@28f83620103c48a57093dcc2837eec89e036bb9f

Copilot AI Mar 23, 2026

Copy link

Choose a reason for hiding this comment

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

anthropics/claude-code-action@beta is a moving ref and can change without notice. For supply-chain safety and reproducible runs, pin this to an immutable commit SHA or at least a stable, versioned release tag.

Suggested change
uses: anthropics/claude-code-action@28f83620103c48a57093dcc2837eec89e036bb9f
uses: anthropics/claude-code-action@v1

Copilot uses AI. Check for mistakes.
@github-actions

github-actions Bot commented Mar 23, 2026

Copy link
Copy Markdown

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 70.51% (🎯 60%) 2946 / 4178
🔵 Statements 70.51% (🎯 60%) 2946 / 4178
🔵 Functions 66.14% (🎯 60%) 213 / 322
🔵 Branches 80.55% (🎯 60%) 518 / 643
File CoverageNo changed files found.
Generated in workflow #56 for commit 667464e by the Vitest Coverage Report Action

@sonarqubecloud

Copy link
Copy Markdown

@frank-mendez frank-mendez merged commit 8d36580 into main Mar 23, 2026
10 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.

2 participants