Skip to content

refactor: single home for block-execution env assembly, fixing BlockLimits drift #1328

refactor: single home for block-execution env assembly, fixing BlockLimits drift

refactor: single home for block-execution env assembly, fixing BlockLimits drift #1328

Workflow file for this run

name: Claude Code
on:
issue_comment:
types: [created]
pull_request_review_comment:
types: [created]
pull_request_review:
types: [submitted]
pull_request:
types: [opened, synchronize, ready_for_review, reopened, labeled, unlabeled]
issues:
types: [opened]
jobs:
interactive:
if: |
(github.event_name == 'issue_comment' &&
contains(github.event.comment.body, '@claude') &&
(github.event.comment.author_association == 'MEMBER' ||
github.event.comment.author_association == 'COLLABORATOR' ||
github.event.comment.author_association == 'OWNER')) ||
(github.event_name == 'pull_request_review_comment' &&
contains(github.event.comment.body, '@claude') &&
(github.event.comment.author_association == 'MEMBER' ||
github.event.comment.author_association == 'COLLABORATOR' ||
github.event.comment.author_association == 'OWNER')) ||
(github.event_name == 'pull_request_review' &&
contains(github.event.review.body, '@claude') &&
(github.event.review.author_association == 'MEMBER' ||
github.event.review.author_association == 'COLLABORATOR' ||
github.event.review.author_association == 'OWNER'))
runs-on: ubuntu-24.04
timeout-minutes: 45
permissions:
contents: write
pull-requests: write
issues: write
id-token: write
actions: read
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 1
- uses: megaeth-labs/.github/.github/actions/claude-interactive@main
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
allowed_bots: "mega-putin"
extra_allowed_tools: "Bash(cargo:*)"
pr-review:
# Serialize reviews per PR: a new push queues behind an in-flight review
# rather than cancelling it, so a partial run never leaves comments/threads
# in an inconsistent state.
concurrency:
group: claude-pr-review-${{ github.event.pull_request.number || github.event.issue.number }}
cancel-in-progress: false
if: |
(github.event_name == 'pull_request' &&
(github.event.action == 'opened' ||
github.event.action == 'synchronize' ||
github.event.action == 'ready_for_review' ||
github.event.action == 'reopened')) ||
(github.event_name == 'issue_comment' &&
github.event.issue.pull_request != null &&
github.event.comment.user.login != 'mega-maxwell[bot]')
runs-on: ubuntu-24.04
timeout-minutes: 30
permissions:
contents: read
pull-requests: write
id-token: write
actions: read
steps:
# Review under the CI app identity rather than the job token: it is what
# lets the action resolve stale review threads (the shared action gates
# --resolve-threads on github_identity_token being non-empty).
- uses: actions/create-github-app-token@v3
id: app-token
with:
app-id: ${{ vars.CI_APP_ID }}
private-key: ${{ secrets.MEGA_CI_APP_PK }}
owner: megaeth-labs
repositories: stateless-validator
- uses: actions/checkout@v4
with:
ref: ${{ github.event_name == 'issue_comment' && format('refs/pull/{0}/head', github.event.issue.number) || '' }}
token: ${{ steps.app-token.outputs.token }}
persist-credentials: false
submodules: recursive
fetch-depth: 1
- uses: megaeth-labs/.github/.github/actions/claude-pr-review@main
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
github_identity_token: ${{ steps.app-token.outputs.token }}
allowed_bots: "mega-putin"
label-check:
if: |
github.event_name == 'pull_request' &&
(github.event.action == 'opened' ||
github.event.action == 'reopened' ||
github.event.action == 'labeled' ||
github.event.action == 'unlabeled') &&
github.actor != 'github-actions[bot]'
runs-on: ubuntu-24.04
timeout-minutes: 10
permissions:
contents: read
pull-requests: write
id-token: write
steps:
- name: Debounce
run: sleep 15
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 1
- uses: megaeth-labs/.github/.github/actions/claude-label-check@main
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
allowed_bots: "mega-putin"
issue-triage:
if: github.event_name == 'issues'
runs-on: ubuntu-24.04
timeout-minutes: 10
permissions:
contents: read
issues: write
id-token: write
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 1
- uses: megaeth-labs/.github/.github/actions/claude-issue-triage@main
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
allowed_bots: "mega-putin"