Skip to content

Commit be0202f

Browse files
Debug Agentclaude
andcommitted
test(ci): add temporary workflow_dispatch triggers for GITHUB_TOKEN testing
Add workflow_dispatch to both workflows so we can verify GITHUB_TOKEN works on the feature branch before merging. These triggers will be removed in the final commit. - auto-label-issues.yml: adds issue_number input for dispatch testing - stale.yml: adds workflow_dispatch + explicit permissions block Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 0581c0b commit be0202f

File tree

2 files changed

+25
-3
lines changed

2 files changed

+25
-3
lines changed

.github/workflows/auto-label-issues.yml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ name: Auto-label New Issues
44
on:
55
issues:
66
types: [opened]
7+
workflow_dispatch: # temporary — remove after testing GITHUB_TOKEN
8+
inputs:
9+
issue_number:
10+
description: 'Issue number to test labeling on'
11+
required: true
12+
type: number
713

814
permissions:
915
issues: write
@@ -17,8 +23,19 @@ jobs:
1723
with:
1824
github-token: ${{ secrets.GITHUB_TOKEN }}
1925
script: |
20-
// Get the issue details
21-
const issue = context.payload.issue;
26+
// Get issue number from event payload or workflow_dispatch input
27+
const issueNumber = context.payload.issue?.number || Number('${{ inputs.issue_number }}');
28+
if (!issueNumber) {
29+
core.setFailed('No issue number available');
30+
return;
31+
}
32+
33+
// Fetch issue details (needed for workflow_dispatch where payload.issue is null)
34+
const { data: issue } = await github.rest.issues.get({
35+
owner: context.repo.owner,
36+
repo: context.repo.repo,
37+
issue_number: issueNumber,
38+
});
2239
const labels = issue.labels.map(label => label.name);
2340
2441
// Check if issue has already been triaged
@@ -30,7 +47,7 @@ jobs:
3047
await github.rest.issues.addLabels({
3148
owner: context.repo.owner,
3249
repo: context.repo.repo,
33-
issue_number: context.issue.number,
50+
issue_number: issueNumber,
3451
labels: ['needs-triage']
3552
});
3653
}

.github/workflows/stale.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ name: Close stale issues
66
on:
77
schedule:
88
- cron: 30 1 * * *
9+
workflow_dispatch: # temporary — remove after testing GITHUB_TOKEN
10+
11+
permissions:
12+
issues: write
13+
pull-requests: write
914

1015
jobs:
1116
stale:

0 commit comments

Comments
 (0)