Skip to content

Commit 2d78d21

Browse files
committed
refactor: simplify fuzzer-fix-automation triggers
- Remove on:issues trigger (no longer needed) - Only accept inputs from workflow_call and workflow_dispatch - Simplify all references to use inputs.issue_number directly - Remove conditional logic for github.event.issue handling
1 parent a41db7a commit 2d78d21

File tree

1 file changed

+12
-25
lines changed

1 file changed

+12
-25
lines changed

.github/workflows/fuzzer-fix-automation.yml

Lines changed: 12 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
name: Fuzzer Fix Automation
22

33
on:
4-
issues:
5-
types: [opened, labeled]
64
workflow_dispatch:
75
inputs:
86
issue_number:
@@ -20,15 +18,11 @@ jobs:
2018
attempt-fix:
2119
name: "Attempt to Fix Fuzzer Crash"
2220
# Only run when:
23-
# 1. Issue is opened with 'fuzzer' label, OR
24-
# 2. 'fuzzer' label is added to existing issue, OR
25-
# 3. Manually triggered via workflow_dispatch, OR
26-
# 4. Called from another workflow (workflow_call)
21+
# 1. Manually triggered via workflow_dispatch, OR
22+
# 2. Called from another workflow (workflow_call)
2723
if: |
2824
github.event_name == 'workflow_call' ||
29-
github.event_name == 'workflow_dispatch' ||
30-
(github.event.action == 'opened' && contains(github.event.issue.labels.*.name, 'fuzzer')) ||
31-
(github.event.action == 'labeled' && github.event.label.name == 'fuzzer')
25+
github.event_name == 'workflow_dispatch'
3226
3327
runs-on: ubuntu-latest
3428
timeout-minutes: 90
@@ -43,8 +37,7 @@ jobs:
4337
- name: Checkout repository
4438
uses: actions/checkout@v5
4539

46-
- name: Fetch issue details (for workflow_dispatch/workflow_call)
47-
if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call'
40+
- name: Fetch issue details
4841
id: fetch_issue
4942
env:
5043
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -74,16 +67,10 @@ jobs:
7467
id: extract
7568
shell: bash
7669
run: |
77-
# Use fetched issue body for workflow_dispatch/workflow_call, otherwise use event issue body
78-
if [ "${{ github.event_name }}" = "workflow_dispatch" ] || [ "${{ github.event_name }}" = "workflow_call" ]; then
79-
cat > issue_body.txt <<'ISSUE_EOF'
70+
# Extract crash details from the fetched issue body
71+
cat > issue_body.txt <<'ISSUE_EOF'
8072
${{ steps.fetch_issue.outputs.issue_body }}
8173
ISSUE_EOF
82-
else
83-
cat > issue_body.txt <<'ISSUE_EOF'
84-
${{ github.event.issue.body }}
85-
ISSUE_EOF
86-
fi
8774
8875
# Extract target name from issue body
8976
TARGET=$(grep -oP '(?<=\*\*Target\*\*: `)[^`]+' issue_body.txt || echo "file_io")
@@ -105,7 +92,7 @@ jobs:
10592
env:
10693
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
10794
run: |
108-
ISSUE_NUM="${{ (github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call') && inputs.issue_number || github.event.issue.number }}"
95+
ISSUE_NUM="${{ inputs.issue_number }}"
10996
11097
# Check if issue exists and has fuzzer label
11198
ISSUE_LABELS=$(gh issue view "$ISSUE_NUM" --repo ${{ github.repository }} --json labels --jq '.labels[].name')
@@ -213,7 +200,7 @@ jobs:
213200
env:
214201
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
215202
run: |
216-
ISSUE_NUM="${{ (github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call') && inputs.issue_number || github.event.issue.number }}"
203+
ISSUE_NUM="${{ inputs.issue_number }}"
217204
218205
gh issue comment "$ISSUE_NUM" --repo ${{ github.repository }} --body "## 🤖 Automated Analysis
219206
@@ -242,9 +229,9 @@ jobs:
242229
- name: Attempt to fix crash with Claude
243230
if: steps.reproduce.outputs.crash_reproduced == 'true'
244231
env:
245-
ISSUE_NUMBER: ${{ (github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call') && inputs.issue_number || github.event.issue.number }}
246-
ISSUE_TITLE: ${{ (github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call') && steps.fetch_issue.outputs.issue_title || github.event.issue.title }}
247-
ISSUE_BODY: ${{ (github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call') && steps.fetch_issue.outputs.issue_body || github.event.issue.body }}
232+
ISSUE_NUMBER: ${{ inputs.issue_number }}
233+
ISSUE_TITLE: ${{ steps.fetch_issue.outputs.issue_title }}
234+
ISSUE_BODY: ${{ steps.fetch_issue.outputs.issue_body }}
248235
TARGET: ${{ steps.extract.outputs.target }}
249236
CRASH_FILE: ${{ steps.extract.outputs.crash_file }}
250237
CRASH_FILE_PATH: ${{ steps.download.outputs.crash_file_path }}
@@ -379,7 +366,7 @@ jobs:
379366
env:
380367
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
381368
run: |
382-
ISSUE_NUM="${{ (github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call') && inputs.issue_number || github.event.issue.number }}"
369+
ISSUE_NUM="${{ inputs.issue_number }}"
383370
384371
# Check for comments from claude-code[bot]
385372
COMMENT_COUNT=$(gh api "repos/${{ github.repository }}/issues/$ISSUE_NUM/comments" \

0 commit comments

Comments
 (0)