Skip to content

Conversation

@mattdholloway
Copy link
Contributor

@mattdholloway mattdholloway commented Dec 24, 2025

Summary

This pull request improves the flexibility of the workflow list method by making the resource_id parameter optional for the list_workflow_runs method. This allows users to list all workflow runs in a repository without specifying a workflow ID or file name.

Why

Fixes #

What changed

  • Made resource_id optional for the list_workflow_runs method; if omitted, all workflow runs in the repository are listed. This is reflected in both the schema and the code logic. [1] [2]
  • Updated validation so that missing resource_id is no longer treated as an error for list_workflow_runs.
  • Modified tests to verify that listing workflow runs without a resource_id returns all runs and does not produce an error. [1] [2]

MCP impact

  • No tool or API changes
  • Tool schema or behavior changed
  • New tool added

Prompts tested (tool changes only)

Security / limits

  • No security or limits impact
  • Auth / permissions considered
  • Data exposure, filtering, or token/size limits considered

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

Note: if you're renaming tools, you must add the tool aliases. For more information on how to do so, please refer to the official docs.

Lint & tests

  • Linted locally with ./script/lint
  • Tested locally with ./script/test

Docs

  • Not needed
  • Updated (README / docs / examples)

@mattdholloway mattdholloway marked this pull request as ready for review December 24, 2025 11:02
@mattdholloway mattdholloway requested a review from a team as a code owner December 24, 2025 11:02
Copilot AI review requested due to automatic review settings December 24, 2025 11:02
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR enhances the actions_list tool by making the resource_id parameter optional for the list_workflow_runs method. When resource_id is omitted, all workflow runs in the repository are listed instead of being limited to a specific workflow.

  • Added support for listing all workflow runs in a repository without specifying a workflow ID or filename
  • Updated validation logic to allow empty resource_id for list_workflow_runs while maintaining required validation for other methods
  • Enhanced test coverage to verify the new optional parameter behavior

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
pkg/github/actions.go Updated validation logic to allow empty resource_id for list_workflow_runs and added conditional logic to call ListRepositoryWorkflowRuns when resource_id is not provided
pkg/github/actions_test.go Converted the error-checking test to a success test that verifies listing all workflow runs without resource_id works correctly
pkg/github/toolsnaps/actions_list.snap Updated tool schema to remove resource_id from required fields and updated its description to document the new optional behavior
README.md Updated documentation to reflect that resource_id can be omitted for list_workflow_runs to list all runs

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.

3 participants