Skip to content

Commit 206020b

Browse files
authored
Merge pull request #1735 from codeflash-ai/chore/limit-claude-workflow-triggers
chore: limit claude workflow triggers to reduce spam
2 parents ed8991a + 12b18de commit 206020b

1 file changed

Lines changed: 26 additions & 1 deletion

File tree

.github/workflows/claude.yml

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@ on:
44
workflow_dispatch:
55
pull_request:
66
types: [opened, synchronize, ready_for_review, reopened]
7+
paths-ignore:
8+
- '.github/workflows/**'
9+
- '*.md'
10+
- 'docs/**'
11+
- 'demos/**'
12+
- 'experiments/**'
13+
- 'LICENSE'
14+
- '.tessl/**'
15+
- 'code_to_optimize/**'
16+
- 'codeflash.code-workspace'
17+
- 'uv.lock'
718
issue_comment:
819
types: [created]
920
pull_request_review_comment:
@@ -23,7 +34,7 @@ jobs:
2334
if: |
2435
(
2536
github.event_name == 'pull_request' &&
26-
github.actor != 'claude[bot]' &&
37+
github.event.sender.login != 'claude[bot]' &&
2738
github.event.pull_request.head.repo.full_name == github.repository
2839
) ||
2940
github.event_name == 'workflow_dispatch'
@@ -77,6 +88,20 @@ jobs:
7788
Post all review findings in a single summary comment only — never as inline PR review comments.
7889
</commitment>
7990
91+
<step name="triage">
92+
Before doing any work, assess the PR scope:
93+
94+
1. Run `gh pr diff ${{ github.event.pull_request.number }} --name-only` to get changed files.
95+
2. Classify as TRIVIAL if ALL changed files are:
96+
- Config/CI files (.github/, .tessl/, *.toml, *.lock, *.json, *.yml, *.yaml)
97+
- Documentation (*.md, docs/)
98+
- Non-production code (demos/, experiments/, code_to_optimize/)
99+
- Only whitespace, formatting, or comment changes
100+
101+
If TRIVIAL: post a single comment "No substantive code changes to review." and stop — do not execute any further steps.
102+
Otherwise: continue with the full review below.
103+
</step>
104+
80105
<step name="lint_and_typecheck">
81106
Run checks on files changed in this PR and auto-fix what you can.
82107

0 commit comments

Comments
 (0)