-
Notifications
You must be signed in to change notification settings - Fork 0
fix: Claude CI 自己キャンセル防止・enforce_admins 修正・ヘルスチェック追加 #619
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| name: Claude Code Health Check | ||
|
|
||
| on: | ||
| schedule: | ||
| - cron: '0 0 * * 1' # Every Monday 00:00 UTC | ||
| workflow_dispatch: | ||
|
|
||
| permissions: {} | ||
|
|
||
| jobs: | ||
| health-check: | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 5 | ||
| permissions: | ||
| issues: write | ||
| steps: | ||
| - name: Check Claude Code token validity | ||
| id: check | ||
| uses: anthropics/claude-code-action@d59651bd82c48d81756854675ce4fa4d69722200 # v1 | ||
| with: | ||
| claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} | ||
| direct_prompt: 'Reply with only: OK' | ||
| timeout_minutes: 2 | ||
| continue-on-error: true | ||
|
|
||
| - name: Create issue on failure | ||
| if: steps.check.outcome == 'failure' | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| run: | | ||
| EXISTING=$(gh issue list --label "claude-health" --state open --json number --jq 'length') | ||
| if [ "$EXISTING" -gt 0 ]; then | ||
| echo "Open health check issue already exists. Skipping." | ||
| exit 0 | ||
| fi | ||
|
|
||
| gh issue create \ | ||
| --title "fix: Claude Code OAuth トークンが無効です" \ | ||
| --label "claude-health,bug" \ | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The failure handler always passes Useful? React with 👍 / 👎. |
||
| --body "$(cat <<'BODY' | ||
| ## 問題 | ||
|
|
||
| Claude Code Health Check が失敗しました。 | ||
| `CLAUDE_CODE_OAUTH_TOKEN` が期限切れまたは無効になっている可能性があります。 | ||
|
|
||
| ## 対応手順 | ||
|
|
||
| 1. [Claude Code OAuth](https://console.anthropic.com/) でトークンを再発行 | ||
| 2. GitHub Settings → Secrets → `CLAUDE_CODE_OAUTH_TOKEN` を更新 | ||
| 3. このワークフローを手動実行して復旧を確認 | ||
|
|
||
| ## 影響 | ||
|
|
||
| - `claude.yml` (`@claude` メンション) が機能停止 | ||
| - `claude-code-review.yml` (AI コードレビュー) が機能停止 | ||
|
|
||
| --- | ||
| *このIssueは Claude Code Health Check ワークフローにより自動作成されました。* | ||
| BODY | ||
| )" | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
main|masterbranch defaults now unconditionally setenforce_admins=false, which overrides an explicit--enforce-adminsinvocation (ENFORCE_ADMINS=true). In the default non---uniformpath, an operator can request admin enforcement and still end up with admins exempt from protection on the default branch, which weakens branch protection contrary to the CLI option contract.Useful? React with 👍 / 👎.