Skip to content

Accept conclusions in the list_workflow_runs status filter - #4009

Open
z4forzubair wants to merge 1 commit into
github:mainfrom
z4forzubair:fix/workflow-run-status-conclusions
Open

z4forzubair wants to merge 1 commit into
github:mainfrom
z4forzubair:fix/workflow-run-status-conclusions

Conversation

@z4forzubair

Copy link
Copy Markdown

Summary

actions_list with method: list_workflow_runs now accepts a conclusion such as failure in workflow_runs_filter.status, so "list failed runs" can be expressed with the published schema.

Why

The REST endpoint behind this method ("List workflow runs for a repository") filters status by status or conclusion and documents 14 values: completed, action_required, cancelled, failure, neutral, skipped, stale, success, timed_out, in_progress, queued, requested, waiting, pending. The tool schema only listed 5 of them (queued, in_progress, completed, requested, waiting), so a client or model that follows the schema cannot ask for failed or cancelled runs, even though the handler already passes the value through. The bundled workflow-failure-triage skill works around this ("there is no filter for the outcome").

What changed

  • pkg/github/actions.go: the status enum lists the 14 REST values, and its description says it takes a status or a conclusion. No handler change.
  • pkg/github/actions_test.go: new subtest "filter workflow runs by conclusion". It validates {"workflow_runs_filter":{"status":"failure"}} against the published input schema and checks the mocked GET /repos/owner/repo/actions/runs receives status=failure.
  • pkg/github/typed_actions_outputs_test.go: TestActionsAdvertisedInputMetadata pins the new enum.
  • pkg/github/__toolsnaps__/actions_list.snap: refreshed with UPDATE_TOOLSNAPS=true.
  • pkg/skills/catalog/skills/workflow-failure-triage/SKILL.md: step 1 now says status: failure lists only failed runs.

MCP impact

  • No tool or API changes
  • Tool schema or behavior changed: the workflow_runs_filter.status enum gains 9 values. Existing values are unchanged, so current calls keep working.
  • New tool added

Prompts tested (tool changes only)

  • Not tested with a live model. The new test checks the exact arguments a prompt like "List the failed runs of the CI workflow" would produce (status: failure) against the published schema and the request sent to the API.

Security / limits

  • No security or limits impact

Tool renaming

  • I am renaming tools as part of this PR (e.g. a part of a consolidation effort)
    • I have added the new tool aliases in deprecated_tool_aliases.go
  • I am not renaming tools as part of this PR

Lint & tests

  • Linted locally: golangci-lint v2.14.0 (the version ./script/lint pins, built with go run instead of the install script) and gofmt -s: clean
  • Tested locally with ./script/test (go test -race ./...): all packages pass

Docs

  • Not needed: script/generate-docs produces no change (the README does not list enum values).
  • Updated (README / docs / examples)

Skills

  • Updated relevant skills or confirmed no bundled skill applies: updated workflow-failure-triage.

The REST endpoint filters workflow runs by status or conclusion and
documents 14 values, but the actions_list schema only listed 5
(queued, in_progress, completed, requested, waiting), so clients that
follow the schema could not ask for failed or cancelled runs.

List all 14 values, describe the filter as status or conclusion, and
update the workflow-failure-triage skill, which worked around the gap.
@z4forzubair
z4forzubair requested a review from a team as a code owner December 2, 2026 12:27
Copilot AI adaptive review requested due to automatic review settings December 2, 2026 12:27

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.

🟢 Approval recommended

No active issues are identified, and the enum, schema, documentation, snapshot, and validation/request-forwarding test updates address the requested filtering change.

No open issues 🎉

What changed in this PR

Updates actions_list so workflow-run filters accept GitHub Actions conclusions such as failure.

Changes:

  • Expanded the status enum to all documented values.
  • Added schema and request-forwarding tests.
  • Updated the triage skill and tool snapshot.
File Description
pkg/​skills/​catalog/​skills/​workflow-failure-triage/​SKILL.md Documents using status: failure to list failed workflow runs.
pkg/​github/​typed_actions_outputs_test.go Pins the expanded workflow-run status and conclusion enum.
pkg/​github/​actions.go Expands the workflow-run filter enum and description.
pkg/​github/​actions_test.go Tests schema validation and API query forwarding for conclusion filtering.
pkg/​github/​__toolsnaps__/​actions_list.snap Refreshes the published actions_list tool schema snapshot.

Review effort: Lite (adaptive)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants