github-automation
Automate GitHub repositories, issues, pull requests, branches, CI/CD, and permissions via Rube MCP (Composio). Manage code workflows, review PRs, search code, and handle deployments programmatically.
GitHub Automation via Rube MCP
Automate GitHub repository management, issue tracking, pull request workflows, branch operations, and CI/CD through Composio's GitHub toolkit.
Prerequisites
RUBE_MANAGE_CONNECTIONS with toolkit githubRUBE_SEARCH_TOOLS first to get current tool schemasSetup
Get Rube MCP: Add https://rube.app/mcp as an MCP server in your client configuration. No API keys needed — just add the endpoint and it works.
RUBE_SEARCH_TOOLS respondsRUBE_MANAGE_CONNECTIONS with toolkit githubCore Workflows
1. Create and Manage Issues
When to use: User wants to create, list, or manage GitHub issues
Tool sequence:
GITHUB_LIST_REPOSITORIES_FOR_THE_AUTHENTICATED_USER - Find target repo if unknown [Prerequisite]GITHUB_LIST_REPOSITORY_ISSUES - List existing issues (includes PRs) [Required]GITHUB_CREATE_AN_ISSUE - Create a new issue [Required]GITHUB_CREATE_AN_ISSUE_COMMENT - Add comments to an issue [Optional]GITHUB_SEARCH_ISSUES_AND_PULL_REQUESTS - Search across repos by keyword [Optional]Key parameters:
owner: Repository owner (username or org), case-insensitiverepo: Repository name without .git extensiontitle: Issue title (required for creation)body: Issue description (supports Markdown)labels: Array of label namesassignees: Array of GitHub usernamesstate: 'open', 'closed', or 'all' for filteringPitfalls:
GITHUB_LIST_REPOSITORY_ISSUES returns both issues AND pull requests; check pull_request field to distinguishper_page max 100; iterate pages until empty2. Manage Pull Requests
When to use: User wants to create, review, or merge pull requests
Tool sequence:
GITHUB_FIND_PULL_REQUESTS - Search and filter PRs [Required]GITHUB_GET_A_PULL_REQUEST - Get detailed PR info including mergeable status [Required]GITHUB_LIST_PULL_REQUESTS_FILES - Review changed files [Optional]GITHUB_CREATE_A_PULL_REQUEST - Create a new PR [Required]GITHUB_CREATE_AN_ISSUE_COMMENT - Post review comments [Optional]GITHUB_LIST_CHECK_RUNS_FOR_A_REF - Verify CI status before merge [Optional]GITHUB_MERGE_A_PULL_REQUEST - Merge after explicit user approval [Required]Key parameters:
head: Source branch with changes (must exist; for cross-repo: 'username:branch')base: Target branch to merge into (e.g., 'main')title: PR title (required unless issue number provided)merge_method: 'merge', 'squash', or 'rebase'state: 'open', 'closed', or 'all'Pitfalls:
GITHUB_CREATE_A_PULL_REQUEST fails with 422 if base/head are invalid, identical, or already mergedGITHUB_MERGE_A_PULL_REQUEST can be rejected if PR is draft, closed, or branch protection appliesGITHUB_GET_A_PULL_REQUEST immediately before merging3. Manage Repositories and Branches
When to use: User wants to create repos, manage branches, or update repo settings
Tool sequence:
GITHUB_LIST_REPOSITORIES_FOR_THE_AUTHENTICATED_USER - List user's repos [Required]GITHUB_GET_A_REPOSITORY - Get detailed repo info [Optional]GITHUB_CREATE_A_REPOSITORY_FOR_THE_AUTHENTICATED_USER - Create personal repo [Required]GITHUB_CREATE_AN_ORGANIZATION_REPOSITORY - Create org repo [Alternative]GITHUB_LIST_BRANCHES - List branches [Required]GITHUB_CREATE_A_REFERENCE - Create new branch from SHA [Required]GITHUB_UPDATE_A_REPOSITORY - Update repo settings [Optional]Key parameters:
name: Repository nameprivate: Boolean for visibilityref: Full reference path (e.g., 'refs/heads/new-branch')sha: Commit SHA to point the new reference todefault_branch: Default branch namePitfalls:
GITHUB_CREATE_A_REFERENCE only creates NEW references; use GITHUB_UPDATE_A_REFERENCE for existing onesref must start with 'refs/' and contain at least two slashesGITHUB_LIST_BRANCHES paginates via page/per_page; iterate until empty pageGITHUB_DELETE_A_REPOSITORY is permanent and irreversible; requires admin privileges4. Search Code and Commits
When to use: User wants to find code, files, or commits across repositories
Tool sequence:
GITHUB_SEARCH_CODE - Search file contents and paths [Required]GITHUB_SEARCH_CODE_ALL_PAGES - Multi-page code search [Alternative]GITHUB_SEARCH_COMMITS_BY_AUTHOR - Search commits by author/date/org [Required]GITHUB_LIST_COMMITS - List commits for a specific repo [Alternative]GITHUB_GET_A_COMMIT - Get detailed commit info [Optional]GITHUB_GET_REPOSITORY_CONTENT - Get file content [Optional]Key parameters:
q: Search query with qualifiers (language:python, repo:owner/repo, extension:js)owner/repo: For repo-specific commit listingauthor: Filter by commit authorsince/until: ISO 8601 date range for commitsPitfalls:
GITHUB_SEARCH_COMMITS_BY_AUTHOR requires keywords in addition to qualifiers; qualifier-only queries are not allowedGITHUB_LIST_COMMITS returns 409 on empty repos5. Manage CI/CD and Deployments
When to use: User wants to view workflows, check CI status, or manage deployments
Tool sequence:
GITHUB_LIST_REPOSITORY_WORKFLOWS - List GitHub Actions workflows [Required]GITHUB_GET_A_WORKFLOW - Get workflow details by ID or filename [Optional]GITHUB_CREATE_A_WORKFLOW_DISPATCH_EVENT - Manually trigger a workflow [Required]GITHUB_LIST_CHECK_RUNS_FOR_A_REF - Check CI status for a commit/branch [Required]GITHUB_LIST_DEPLOYMENTS - List deployments [Optional]GITHUB_GET_A_DEPLOYMENT_STATUS - Get deployment status [Optional]Key parameters:
workflow_id: Numeric ID or filename (e.g., 'ci.yml')ref: Git reference (branch/tag) for workflow dispatchinputs: JSON string of workflow inputs matching on.workflow_dispatch.inputsenvironment: Filter deployments by environment namePitfalls:
GITHUB_CREATE_A_WORKFLOW_DISPATCH_EVENT requires the workflow to have workflow_dispatch trigger configured.github/workflows/main.yml is auto-stripped to just main.ymlon.workflow_dispatch.inputs definitions6. Manage Users and Permissions
When to use: User wants to check collaborators, permissions, or branch protection
Tool sequence:
GITHUB_LIST_REPOSITORY_COLLABORATORS - List repo collaborators [Required]GITHUB_GET_REPOSITORY_PERMISSIONS_FOR_A_USER - Check specific user's access [Optional]GITHUB_GET_BRANCH_PROTECTION - Inspect branch protection rules [Required]GITHUB_UPDATE_BRANCH_PROTECTION - Update protection settings [Optional]GITHUB_ADD_A_REPOSITORY_COLLABORATOR - Add/update collaborator [Optional]Key parameters:
affiliation: 'outside', 'direct', or 'all' for collaborator filteringpermission: Filter by 'pull', 'triage', 'push', 'maintain', 'admin'branch: Branch name for protection rulesenforce_admins: Whether protection applies to adminsPitfalls:
GITHUB_GET_BRANCH_PROTECTION returns 404 for unprotected branches; treat as no protection rulespermissions.push or role_name, not display labelsGITHUB_LIST_REPOSITORY_COLLABORATORS paginates; iterate all pagesGITHUB_GET_REPOSITORY_PERMISSIONS_FOR_A_USER may be inconclusive for non-collaboratorsCommon Patterns
ID Resolution
GITHUB_LIST_REPOSITORIES_FOR_THE_AUTHENTICATED_USERGITHUB_FIND_PULL_REQUESTS then GITHUB_GET_A_PULL_REQUESTGITHUB_GET_A_BRANCHGITHUB_LIST_REPOSITORY_WORKFLOWSPagination
All list endpoints use page-based pagination:
page: Page number (starts at 1)per_page: Results per page (max 100)per_pageSafety
GITHUB_LIST_CHECK_RUNS_FOR_A_REF before mergingKnown Pitfalls
GITHUB_LIST_REPOSITORY_ISSUES returns both; check pull_request fieldper_page max 100; always iterate pages until emptyGITHUB_CREATE_A_REFERENCE fails with 422 if reference already existsQuick Reference
| Task | Tool Slug | Key Params |
|---|---|---|
| List repos | GITHUB_LIST_REPOSITORIES_FOR_THE_AUTHENTICATED_USER | type, sort, per_page |
| Get repo | GITHUB_GET_A_REPOSITORY | owner, repo |
| Create issue | GITHUB_CREATE_AN_ISSUE | owner, repo, title, body |
| List issues | GITHUB_LIST_REPOSITORY_ISSUES | owner, repo, state |
| Find PRs | GITHUB_FIND_PULL_REQUESTS | repo, state, author |
| Create PR | GITHUB_CREATE_A_PULL_REQUEST | owner, repo, head, base, title |
| Merge PR | GITHUB_MERGE_A_PULL_REQUEST | owner, repo, pull_number, merge_method |
| List branches | GITHUB_LIST_BRANCHES | owner, repo |
| Create branch | GITHUB_CREATE_A_REFERENCE | owner, repo, ref, sha |
| Search code | GITHUB_SEARCH_CODE | q |
| List commits | GITHUB_LIST_COMMITS | owner, repo, author, since |
| Search commits | GITHUB_SEARCH_COMMITS_BY_AUTHOR | q |
| List workflows | GITHUB_LIST_REPOSITORY_WORKFLOWS | owner, repo |
| Trigger workflow | GITHUB_CREATE_A_WORKFLOW_DISPATCH_EVENT | owner, repo, workflow_id, ref |
| Check CI | GITHUB_LIST_CHECK_RUNS_FOR_A_REF | owner, repo, ref |
| List collaborators | GITHUB_LIST_REPOSITORY_COLLABORATORS | owner, repo |
| Branch protection | GITHUB_GET_BRANCH_PROTECTION | owner, repo, branch |