Skip to content

Commit 219c3bb

Browse files
committed
feat: add GitHub Actions tools for workflow management
- Introduced new tools for managing GitHub Actions workflows, including listing workflows, running workflows, canceling workflow runs, and retrieving workflow run logs. - Updated README.md to include new `actions` toolset and detailed descriptions of the new tools. - Added comprehensive tests for the new functionality to ensure reliability and correctness.
1 parent 853323d commit 219c3bb

3 files changed

Lines changed: 1783 additions & 3 deletions

File tree

README.md

Lines changed: 104 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,12 +210,12 @@ To specify toolsets you want available to the LLM, you can pass an allow-list in
210210
1. **Using Command Line Argument**:
211211

212212
```bash
213-
github-mcp-server --toolsets repos,issues,pull_requests,code_security
213+
github-mcp-server --toolsets repos,issues,pull_requests,actions,code_security
214214
```
215215

216216
2. **Using Environment Variable**:
217217
```bash
218-
GITHUB_TOOLSETS="repos,issues,pull_requests,code_security" ./github-mcp-server
218+
GITHUB_TOOLSETS="repos,issues,pull_requests,actions,code_security" ./github-mcp-server
219219
```
220220

221221
The environment variable `GITHUB_TOOLSETS` takes precedence over the command line argument if both are provided.
@@ -227,7 +227,7 @@ When using Docker, you can pass the toolsets as environment variables:
227227
```bash
228228
docker run -i --rm \
229229
-e GITHUB_PERSONAL_ACCESS_TOKEN=<your-token> \
230-
-e GITHUB_TOOLSETS="repos,issues,pull_requests,code_security,experiments" \
230+
-e GITHUB_TOOLSETS="repos,issues,pull_requests,actions,code_security,experiments" \
231231
ghcr.io/github/github-mcp-server
232232
```
233233

@@ -617,6 +617,107 @@ export GITHUB_MCP_TOOL_ADD_ISSUE_COMMENT_DESCRIPTION="an alternative description
617617
- `page`: Page number (number, optional)
618618
- `perPage`: Results per page (number, optional)
619619

620+
### Actions
621+
622+
- **list_workflows** - List workflows in a repository
623+
624+
- `owner`: Repository owner (string, required)
625+
- `repo`: Repository name (string, required)
626+
- `page`: Page number (number, optional)
627+
- `perPage`: Results per page (number, optional)
628+
629+
- **list_workflow_runs** - List workflow runs for a specific workflow
630+
631+
- `owner`: Repository owner (string, required)
632+
- `repo`: Repository name (string, required)
633+
- `workflow_id`: Workflow ID or filename (string, required)
634+
- `branch`: Filter by branch name (string, optional)
635+
- `event`: Filter by event type (string, optional)
636+
- `status`: Filter by run status (string, optional)
637+
- `page`: Page number (number, optional)
638+
- `perPage`: Results per page (number, optional)
639+
640+
- **run_workflow** - Trigger a workflow via workflow_dispatch event
641+
642+
- `owner`: Repository owner (string, required)
643+
- `repo`: Repository name (string, required)
644+
- `workflow_id`: Workflow ID or filename (string, required)
645+
- `ref`: Git reference (branch, tag, or SHA) (string, required)
646+
- `inputs`: Input parameters for the workflow (object, optional)
647+
648+
- **get_workflow_run** - Get details of a specific workflow run
649+
650+
- `owner`: Repository owner (string, required)
651+
- `repo`: Repository name (string, required)
652+
- `run_id`: Workflow run ID (number, required)
653+
654+
- **get_workflow_run_logs** - Download logs for a workflow run
655+
656+
- `owner`: Repository owner (string, required)
657+
- `repo`: Repository name (string, required)
658+
- `run_id`: Workflow run ID (number, required)
659+
660+
- **list_workflow_jobs** - List jobs for a workflow run
661+
662+
- `owner`: Repository owner (string, required)
663+
- `repo`: Repository name (string, required)
664+
- `run_id`: Workflow run ID (number, required)
665+
- `filter`: Filter by job status (string, optional)
666+
- `page`: Page number (number, optional)
667+
- `perPage`: Results per page (number, optional)
668+
669+
- **get_job_logs** - Download logs for a specific job
670+
671+
- `owner`: Repository owner (string, required)
672+
- `repo`: Repository name (string, required)
673+
- `job_id`: Job ID (number, required)
674+
675+
- **rerun_workflow_run** - Re-run an entire workflow
676+
677+
- `owner`: Repository owner (string, required)
678+
- `repo`: Repository name (string, required)
679+
- `run_id`: Workflow run ID (number, required)
680+
- `enable_debug_logging`: Enable debug logging for the re-run (boolean, optional)
681+
682+
- **rerun_failed_jobs** - Re-run only the failed jobs in a workflow run
683+
684+
- `owner`: Repository owner (string, required)
685+
- `repo`: Repository name (string, required)
686+
- `run_id`: Workflow run ID (number, required)
687+
- `enable_debug_logging`: Enable debug logging for the re-run (boolean, optional)
688+
689+
- **cancel_workflow_run** - Cancel a running workflow
690+
691+
- `owner`: Repository owner (string, required)
692+
- `repo`: Repository name (string, required)
693+
- `run_id`: Workflow run ID (number, required)
694+
695+
- **list_workflow_run_artifacts** - List artifacts from a workflow run
696+
697+
- `owner`: Repository owner (string, required)
698+
- `repo`: Repository name (string, required)
699+
- `run_id`: Workflow run ID (number, required)
700+
- `page`: Page number (number, optional)
701+
- `perPage`: Results per page (number, optional)
702+
703+
- **download_workflow_run_artifact** - Get download URL for a specific artifact
704+
705+
- `owner`: Repository owner (string, required)
706+
- `repo`: Repository name (string, required)
707+
- `artifact_id`: Artifact ID (number, required)
708+
709+
- **delete_workflow_run_logs** - Delete logs for a workflow run
710+
711+
- `owner`: Repository owner (string, required)
712+
- `repo`: Repository name (string, required)
713+
- `run_id`: Workflow run ID (number, required)
714+
715+
- **get_workflow_run_usage** - Get usage metrics for a workflow run
716+
717+
- `owner`: Repository owner (string, required)
718+
- `repo`: Repository name (string, required)
719+
- `run_id`: Workflow run ID (number, required)
720+
620721
### Code Scanning
621722

622723
- **get_code_scanning_alert** - Get a code scanning alert

0 commit comments

Comments
 (0)