Skip to content

Update kernel 6.1.182 -> 6.1.186 #1534

Update kernel 6.1.182 -> 6.1.186

Update kernel 6.1.182 -> 6.1.186 #1534

Workflow file for this run

name: Claude Code Review
on:
pull_request:
branches: [main, cloud, devel]
types: [opened, synchronize, reopened, labeled]
concurrency:
group: claude-review-${{ github.event.pull_request.number }}
cancel-in-progress: true
env:
CLAUDE_MODEL: claude-opus-5
CLAUDE_MAX_TURNS: 64
jobs:
claude-review:
name: Claude Code Review
runs-on: ubuntu-22.04
if: contains(github.event.pull_request.labels.*.name, 'claude')
permissions:
contents: read
pull-requests: write
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
persist-credentials: false
- name: Fetch base branch
env:
PR_BASE_REF: ${{ github.event.pull_request.base.ref }}
run: |
git fetch origin "$PR_BASE_REF:$PR_BASE_REF"
- name: Set up Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: "24"
- name: Install Claude Code CLI
run: npm install -g @anthropic-ai/claude-code
- name: Run Claude Code Review
id: review
env:
CLAUDE_CODE_OAUTH_TOKEN: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
PR_BASE_REF: ${{ github.event.pull_request.base.ref }}
run: |
claude -p "Review the changes in this pull request. Use git diff $PR_BASE_REF...HEAD to see the changes. Focus on:
- Code quality and best practices
- Potential bugs or issues
- Security concerns
- Performance implications
- Compliance with the project standards outlined in AGENTS.md
Provide a concise review in markdown format." \
--max-turns "${{ env.CLAUDE_MAX_TURNS }}" \
--model "${{ env.CLAUDE_MODEL }}" \
--allowedTools "Bash(git diff *),Bash(git log *),Bash(git show *),Read,Grep,Glob" \
> /tmp/review_output.md 2>&1 || {
echo "Claude Code review encountered an error" > /tmp/review_output.md
echo "" >> /tmp/review_output.md
echo "⚠️ The automated review encountered an error. Please review manually." >> /tmp/review_output.md
}
continue-on-error: true
- name: Post review as PR comment
uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7.1.0
env:
PR_NUMBER: ${{ github.event.pull_request.number }}
PR_BASE_REF: ${{ github.event.pull_request.base.ref }}
PR_HEAD_REF: ${{ github.event.pull_request.head.ref }}
PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const fs = require('fs');
let review = '';
try {
review = fs.readFileSync('/tmp/review_output.md', 'utf8');
} catch (error) {
review = '⚠️ Unable to read review output. The review may have failed.';
}
// Marker to identify our comment
const COMMENT_MARKER = '<!-- claude-code-review -->';
// Add header and metadata
const body = `${COMMENT_MARKER}
## 🤖 Claude Code Review
**PR**: #${process.env.PR_NUMBER}
**Base**: \`${process.env.PR_BASE_REF}\`
**Head**: \`${process.env.PR_HEAD_REF}\`
**Commit**: \`${process.env.PR_HEAD_SHA}\`
---
${review}
---
<sub>Model: ${process.env.CLAUDE_MODEL}</sub>`;
// Find existing comment
const { data: comments } = await github.rest.issues.listComments({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number
});
const existingComment = comments.find(c => c.body.includes(COMMENT_MARKER));
if (existingComment) {
await github.rest.issues.updateComment({
owner: context.repo.owner,
repo: context.repo.repo,
comment_id: existingComment.id,
body
});
} else {
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body
});
}