-
Notifications
You must be signed in to change notification settings - Fork 0
fix: claude ワークフローの bot 自己トリガーループを防止 #642
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 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -13,15 +13,35 @@ on: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| permissions: {} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| concurrency: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <<<<<<< Updated upstream | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| group: claude-${{ github.repository }}-${{ github.event.issue.number || github.event.pull_request.number || github.run_id }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ======= | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # イベント種別 + トリガーのコメント/レビューIDを含めることで、 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # 同一 PR/Issue 内でも異なるメンションが互いをキャンセルしない | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| group: >- | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| claude-${{ github.repository }}-${{ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| github.event.issue.number | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| || github.event.pull_request.number | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| || github.run_id | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }}-${{ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| github.event.comment.id | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| || github.event.review.id | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| || github.run_id | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| >>>>>>> Stashed changes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+16
to
+31
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. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
rg -n '^(<<<<<<<|=======|>>>>>>>)' .github/workflows/claude.ymlRepository: keito4/config Length of output: 1772 Resolve merge-conflict markers to restore workflow validity. The file contains unresolved merge-conflict markers at lines 16-31 and 38-44 that make the YAML invalid. YAMLlint cannot parse Line 17 due to the syntax errors introduced by these markers. Remove the markers and keep the stashed changes as shown below: Suggested resolution concurrency:
-<<<<<<< Updated upstream
- group: claude-${{ github.repository }}-${{ github.event.issue.number || github.event.pull_request.number || github.run_id }}
-=======
# イベント種別 + トリガーのコメント/レビューIDを含めることで、
# 同一 PR/Issue 内でも異なるメンションが互いをキャンセルしない
group: >-
claude-${{ github.repository }}-${{
github.event.issue.number
|| github.event.pull_request.number
|| github.run_id
}}-${{
github.event.comment.id
|| github.event.review.id
|| github.run_id
}}
->>>>>>> Stashed changes
cancel-in-progress: false claude:
# Bot 全般を除外(sender.type で判定するため、Bot 名のハードコードが不要)
if: |
-<<<<<<< Updated upstream
- github.actor != 'github-actions[bot]' &&
- github.actor != 'dependabot[bot]' &&
- github.actor != 'claude[bot]' &&
-=======
github.event.sender.type != 'Bot' &&
->>>>>>> Stashed changes
(📝 Committable suggestion
Suggested change
🧰 Tools🪛 YAMLlint (1.38.0)[error] 17-17: syntax error: could not find expected ':' (syntax) 🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| cancel-in-progress: false | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| jobs: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| claude: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Bot 全般を除外(sender.type で判定するため、Bot 名のハードコードが不要) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <<<<<<< Updated upstream | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| github.actor != 'github-actions[bot]' && | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| github.actor != 'dependabot[bot]' && | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| github.actor != 'claude[bot]' && | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ======= | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| github.event.sender.type != 'Bot' && | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| >>>>>>> Stashed changes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| (github.event_name == 'issue_comment' && contains(github.event.comment.body || '', '@claude') && | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| !(github.event.issue.pull_request && github.event.issue.pull_request.url && github.event.issue.draft == true)) || | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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.
This commit leaves Git conflict markers (for example
<<<<<<< Updated upstream) inclaude.yml, which makes the workflow file invalid YAML. In this state, GitHub Actions cannot parse the workflow, so the Claude Code automation will fail to trigger on all configured events until the markers are removed and one branch of the conflict is resolved.Useful? React with 👍 / 👎.