Skip to content

Bump next from 15.4.11 to 15.5.14 #213

Bump next from 15.4.11 to 15.5.14

Bump next from 15.4.11 to 15.5.14 #213

Workflow file for this run

name: Claude Code
on:
issue_comment:
types: [created]
issues:
types: [opened, assigned]
jobs:
claude:
if: |
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
issues: write
id-token: write
actions: read
steps:
- name: Check authorization
id: auth-check
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
result-encoding: string
script: |
const username = context.actor;
// Check if user has write (or admin) access to the repo
const { data } = await github.rest.repos.getCollaboratorPermissionLevel({
owner: context.repo.owner,
repo: context.repo.repo,
username,
});
const permission = data.permission;
console.log(`${username} has '${permission}' permission on this repo`);
if (permission === 'admin' || permission === 'write') {
console.log(`✅ ${username} is authorized`);
return 'authorized';
}
console.log(`❌ ${username} is not authorized (needs write or admin access)`);
return 'unauthorized';
- name: Post unauthorized comment
if: steps.auth-check.outputs.result == 'unauthorized'
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const username = context.actor;
const issueNumber = context.issue?.number || context.payload.issue?.number || context.payload.pull_request?.number;
if (issueNumber) {
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issueNumber,
body: `👋 @${username}, you're not currently authorized to use Claude on this repository.\n\nTo use Claude, you need write or admin access to this repository. Please contact a repository administrator if you believe you should have access.`
});
}
core.setFailed(`User ${username} is not authorized to use Claude.`)
- name: Checkout repository
uses: actions/checkout@v5
with:
fetch-depth: 1
- name: Run Claude Code
uses: anthropics/claude-code-action@v1
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
track_progress: true
use_commit_signing: true
# Limit tools to safe operations for this codebase
claude_args: |
--model claude-opus-4-6
--allowedTools "Read,Glob,Grep,Edit,Write,Bash(pnpm prettify),Bash(pnpm tsc),Bash(pnpm lint),Bash(pnpm test),Bash(pnpm test:*),Bash(git status),Bash(git diff),Bash(git add),Bash(git commit),Bash(git checkout -b *),Bash(git push),Bash(gh pr create *),Bash(gh issue comment *),mcp__github_inline_comment__create_inline_comment"
--system-prompt "OVERRIDE: Do NOT provide a manual 'Create a PR' URL link. Instead, after implementing changes for a GitHub issue, you MUST actually create a pull request by running 'gh pr create' via the Bash tool. Always use 'gh pr create' directly — never just provide a compare URL. The PR body must follow the template in .github/PULL_REQUEST_TEMPLATE.md with these sections: Description, Related Issues, Key Changes, How to test, Screenshots / Demo video, Migration Explanation, Future enhancements / Questions. Omit sections that are not applicable (e.g. Screenshots, Migration Explanation). In the Related Issues section, always use the closing keyword 'Closes #<issue_number>' so the issue is automatically closed when the PR is merged. The user who requested this workflow is '${{ github.actor }}'. Always assign them to the PR and request their review using the --assignee and --reviewer flags on gh pr create."