Skip to content

Read the dispatched item number from the workflow input - #283

Merged
swissspidy merged 1 commit into
mainfrom
claude/triage-single-item-dispatch-fix
Aug 13, 2026
Merged

Read the dispatched item number from the workflow input#283
swissspidy merged 1 commit into
mainfrom
claude/triage-single-item-dispatch-fix

Conversation

@swissspidy

Copy link
Copy Markdown
Member

triage-single-item has failed on every dispatch since a482e38 (Apr 22). It is the last of the three bugs that stood between the triage workflow and working end to end; #280 fixed the other two.

The bug

The job is gated to workflow_dispatch:

if: |
  github.event_name == 'workflow_dispatch' &&
  inputs.issue_number != ''

but its "Get item details" step looked the item up with context.issue.number. github-script derives that from the event payload — payload.issue, else payload.pull_request, else payload — and a workflow_dispatch payload has none of the three. It resolves to undefined, and issues.get 404s.

Because the job is dispatch-only, this is not an edge case: the lookup could never have succeeded. Every run of the single-item path failed at step two, which includes every run the unlabeled sweep dispatches — so the sweep would have gone on producing nothing even after #280 taught it to find pull requests.

The fix

The number is already passed as the issue_number workflow input, and the apply job downstream reads it from the environment. This step now does the same, so both halves of the job agree on where the number comes from.

Scope

The other context.issue.number in this file, in apply-new-item-labels, is correct and is left alone: that job needs: triage-new-item, which runs only on issues and pull_request_target, and those payloads do carry a number. I checked every use in the file rather than only the one that failed.

Verification

actionlint passes. The behavioural check needs this on main first, since issue-triage.yml resolves the reusable workflow at @main regardless of the ref it is dispatched from — dispatch with an issue_number and the run should reach the model and apply labels, rather than failing at "Get item details".

Note that the repository currently has no open unlabeled items, so an empty-issue_number sweep will legitimately report Found 0 and is not a useful test of this. Dispatch with an explicit number instead.


Generated by Claude Code

`triage-single-item` only runs on `workflow_dispatch`, but its "Get item
details" step looked the item up with `context.issue.number`. A
`workflow_dispatch` payload has no issue, no pull request and no number,
so github-script resolved that to `undefined` and the lookup 404'd. The
job has therefore failed on every dispatch since a482e38, taking the
whole single-item path with it - including every run the unlabeled sweep
dispatches.

The number is already available as the `issue_number` workflow input,
which the apply job downstream reads. This step now reads the same input
through the environment, matching that job.

The one remaining `context.issue.number` is in `apply-new-item-labels`,
where it is correct: that job needs `triage-new-item`, which runs only on
`issues` and `pull_request_target`, and those payloads do carry a number.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RdDrWtq6hWWuDDQDxQx94G
@swissspidy
swissspidy requested a review from a team as a code owner August 13, 2026 14:44
Copilot AI lite review requested due to automatic review settings August 13, 2026 14:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@swissspidy, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 54 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 098422d5-9760-4a7e-a585-fbd377ec64fc

📥 Commits

Reviewing files that changed from the base of the PR and between c125b7b and c7c5ac7.

📒 Files selected for processing (1)
  • .github/workflows/reusable-issue-triage.yml

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@swissspidy
swissspidy merged commit ad5db7a into main Aug 13, 2026
16 checks passed
@swissspidy
swissspidy deleted the claude/triage-single-item-dispatch-fix branch August 13, 2026 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants