1. Overview
GitHub is a cloud-based code hosting platform designed for developers to store, manage, track, and collaborate on software projects. It uses Git as its core version control system and provides powerful collaboration features such as issue tracking, code review, continuous integration, and more.
Through GoInsight's Github node, you can seamlessly integrate code repository management and automation operations into your workflows. This enables you to build powerful automation processes around code, issues, releases, and workflows, including:
- Repository Management: Get detailed repository information, file lists, license information, and search public repositories based on complex conditions.
- File Operations: Create, read, update, and delete files in specified repositories.
- Issue Management: Automatically create, edit, get, and lock issues in repositories, and add comments.
- Release Management: Manage the full lifecycle of repository releases, including creation, retrieval, update, and deletion.
- Code Review: Create, get, and update review comments for specified pull requests.
- Workflow Automation: Dispatch, enable, disable, get, and monitor GitHub Actions workflows.
- Collaboration Management: Invite users to become collaborators on repositories.
2. Prerequisites
Before using this node, you need to meet the following conditions:
- Have a valid Github account.
- Create a Personal Access Token (PAT) and grant it the required operation permissions (for example, repo permission for reading and writing private repositories, workflow permission for managing GitHub Actions).
3. Credentials
For a detailed guide on how to obtain and configure credentials, please refer to our official documentation: Credential Configuration Guide.
4. Supported Operations
Summary
This node primarily operates on resources such as Branches, Files, Issues, Pull Requests, Releases, Repositories, Reviews, and Workflows within GitHub.
| Resource | Operation | Description |
|---|---|---|
| Branch | Create a Branch | Creates a new branch in the specified GitHub repository. |
| Branch | Delete a Branch | Deletes a branch from a GitHub repository through the Git refs API. |
| Branch | Get Default Branch | Gets the default branch of a GitHub repository with complete branch details. |
| Branch | Get Many Branches | Gets a paginated list of branches for a GitHub repository. |
| Branch | Get a Branch | Gets a GitHub branch by name for a specified repository. |
| File | Create a File | Creates a new single file with provided content and commits it to the specified branch. |
| File | Delete a File | Deletes a file from a GitHub repository and returns deletion confirmation. |
| File | Edit a File | Updates the full text content of an existing file in a GitHub repository by path. |
| File | Get a File | Gets the content of a committed file in a GitHub repository. |
| File | List Files | Lists all file paths in the specified GitHub repository branch. |
| Issue | Create an Issue | Creates a new GitHub issue in the specified repository. |
| Issue | Edit an Issue | Updates the title and content of a specified Issue in a GitHub repository. |
| Issue | Get Issues for a User | Lists issues assigned to the authenticated user across all visible repositories. |
| Issue | Get Issues of a Repository | Gets a paginated list of issues from a GitHub repository. |
| Issue | Get an Issue | Gets a GitHub issue by its number for a specified repository. |
| Issue | Lock an Issue | Locks a specified Issue in a GitHub repository to prevent new comments. |
| Issue Comment | Create an Issue Comment | Creates a comment on a GitHub issue or pull request conversation. |
| Pull Request | Create a Pull Request | Creates a pull request (PR) to merge changes from a head branch into a base branch. |
| Pull Request | Get Pull Requests of a Repository | Gets a paginated list of pull requests from a GitHub repository. |
| Release | Create a Release | Creates a new release associated with a Git tag for a repository. |
| Release | Delete a Release | Deletes a GitHub Release by numeric release ID for a specified repository. |
| Release | Get Many Releases | Gets a paginated list of releases for a GitHub repository. |
| Release | Get a Release | Retrieves a GitHub release by numeric release ID for a specified repository. |
| Release | Get a Release by Tag | Gets a GitHub release by tag name for a specified repository. |
| Release | Update a Release | Updates the metadata of an existing GitHub release by numeric release ID. |
| Repository | Get Repositories for a User | Retrieves the list of repositories for a specified GitHub username. |
| Repository | Get Repositories for an Organization | Retrieves the list of repositories for a specified GitHub organization. |
| Repository | Get a Repository | Retrieves detailed metadata for a specified GitHub repository. |
| Repository | Get the License of a Repository | Gets the license information of a specified GitHub repository. |
| Repository | Get the Profile of a Repository | Gets metadata for a GitHub repository. |
| Repository | List Popular Paths of a Repository | Retrieves the top paths for a specified GitHub repository over the last 14 days. |
| Repository | List the Top Referrers of a Repository | Retrieves the top referrers for a specified GitHub repository over the last 14 days. |
| Repository | Search Repository | Searches GitHub repositories with query syntax and pagination. |
| Review | Create a Review | Creates a review for a pull request (PR) in a GitHub repository. |
| Review | Get Many Reviews | Gets a paginated list of reviews for a specific pull request in a GitHub repository. |
| Review | Get a Review | Retrieves a specific review from a GitHub pull request by review ID. |
| Review | Update a Review | Updates the body text of an existing GitHub pull request review. |
| User Collaboration | Invite a User to Collaborate | Invites a GitHub user to collaborate on a repository. |
| Workflow | Disable a Workflow | Disables a GitHub Actions workflow in a repository to prevent it from running automatically. |
| Workflow | Dispatch a Workflow Event | Dispatches a GitHub Actions workflow on a specific ref without waiting for completion. |
| Workflow | Dispatch a Workflow Event Wait | Dispatches a GitHub Actions workflow and waits for completion to get the final run result. |
| Workflow | Enable a Workflow | Enables a previously disabled GitHub Actions workflow in a repository to allow it to run on triggers. |
| Workflow | Get a Workflow | Retrieves a specific GitHub Actions workflow by its workflow ID or file name. |
| Workflow | Get the Usage of a Workflow | Gets the usage metrics of a specified workflow in a GitHub repository. |
| Workflow | List Workflows | Retrieves a list of all Actions workflows for the specified GitHub repository. |
Operation Details
Create a Branch
Creates a new branch in the specified GitHub repository. And unable to create new references for empty repositories, even if the commit SHA-1 hash used exists. Note: This operation will create a new branch in the warehouse, which will be visible to all collaborators. ⚠️Idempotency Warning: This action is NOT idempotent. If the branch already exists, the API returns 422 error. To handle this, catch the error and use Get a Branch to verify, or use Delete a Branch to delete.
Input Parameters:
- Owner: The account owner name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) page of the repository. (e.g., 'MicrosoftEdge' in https://github.com/MicrosoftEdge)
- Repo: The name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) of the repository. (e.g., 'WebView2Feedback' in https://github.com/MicrosoftEdge/WebView2Feedback). Do NOT include the owner prefix.
- NewBranch: Name of the new reference to create. Cannot contain special characters like *, ?, [, ], :, spaces, or ..
- DefaultBranchSha: The SHA value of the default branch. SHA is a unique 40-character commit identifier.
Output:
- Branch (object): The dictionary of the created branch reference. Includes the following main fields: node_id (str): The unique identifier of the branch reference. ref (str): The branch reference. url (str): The URL of the branch reference. object (dict): The dictionary of the commit object. Includes the following main fields: sha (str): The unique identifier of the commit object. type (str): The type of the commit object. url (str): The URL of the commit object.
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors..
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code. -1 for parameter validation error, 200 for request completed (check ErrorMessage for business errors), 500 for network/system errors (Agent may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Delete a Branch
Deletes a branch from a GitHub repository through the Git refs API. ⚠️ WARNING: This operation is PERMANENT and CANNOT BE UNDONE. Deleted branch is immediately removed from GitHub's repository with no recovery option.
Input Parameters:
- Owner: The account owner name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) page of the repository. (e.g., 'MicrosoftEdge' in https://github.com/MicrosoftEdge)
- Repo: The name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) of the repository. (e.g., 'WebView2Feedback' in https://github.com/MicrosoftEdge/WebView2Feedback). Do NOT include the owner prefix.
- Branch: Name of the branch to delete. Cannot contain special characters like *, ?, [, ], :, spaces, or ..
Output:
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code. -1 for parameter validation error, 200 for request completed (check ErrorMessage for business errors), 500 for network/system errors (Agent may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Get Default Branch
Gets the default branch of a GitHub repository with complete branch details. What: Retrieves the repository's default branch metadata including latest commit SHA, protection status, and full branch object.
Input Parameters:
- Owner: The account owner name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) page of the repository. (e.g., 'MicrosoftEdge' in https://github.com/MicrosoftEdge)
- Repo: The name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) of the repository. (e.g., 'WebView2Feedback' in https://github.com/MicrosoftEdge/WebView2Feedback). Do NOT include the owner prefix.
Output:
- Branch (object): Default branch information. Includes fields like name, commit, url, html_url, protected, protection_url etc.
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code. -1 for parameter validation error, 200 for request completed (check ErrorMessage for business errors), 500 for network/system errors (Agent may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Get Many Branches
Gets a paginated list of branches for a GitHub repository. Key points: For first-time calls, use smaller per_page values (e.g., 10-20) to avoid context flooding. Increase only if needed.
Input Parameters:
- Owner: The account owner name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) page of the repository. (e.g., 'MicrosoftEdge' in https://github.com/MicrosoftEdge)
- Repo: The name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) of the repository. (e.g., 'WebView2Feedback' in https://github.com/MicrosoftEdge/WebView2Feedback). Do NOT include the owner prefix.
Options:
- PerPage: Number of results per page (1-100). For first-time calls, use smaller values (e.g., 10-20) to avoid context flooding. Default: 30.
- Page: Page number, starting from 1. Default: 1.
Output:
- Branches (object-array): List of branch objects. Each branch object contains the following fields: name (str): Branch name commit (dict): Commit object containing the following fields: - sha (str): Commit SHA - url (str): Commit URL protected (bool): True if the branch is protected, False otherwise.
- Pagination (object): Pagination information. Contains the following fields: first (str): First page url or empty string if there is no first page last (str): Last page url or empty string if there is no last page next (str): Next page url or empty string if there is no next page prev (str): Previous page url or empty string if there is no previous page Note: These URLs already contain complete query parameters and can be directly used for the next API request without manually constructing pagination parameters.
- Summary (string): One-sentence summary of the result. Includes count and first few branch names. Use this to quickly understand the response without parsing the full array.
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code. -1 for parameter validation error, 200 for request completed (check ErrorMessage for business errors), 500 for network/system errors (Agent may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Get a Branch
Gets a GitHub branch by name for a specified repository. What: Retrieves complete branch metadata including latest commit SHA, protection status, and branch details.
Input Parameters:
- Owner: The account owner name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) page of the repository. (e.g., 'MicrosoftEdge' in https://github.com/MicrosoftEdge)
- Repo: The name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) of the repository. (e.g., 'WebView2Feedback' in https://github.com/MicrosoftEdge/WebView2Feedback). Do NOT include the owner prefix.
- Branch: The name of the branch. Cannot contain special characters like *, ?, [, ], :, spaces, or ..
Output:
- Branch (object): Retrieved Branch object containing: - name (string): Branch name - commit (object): Latest commit info with sha and url - protected (boolean): Whether the branch is protected - protection (object): Protection rules if enabled Example: {"name": "main", "commit": {"sha": "7fd1a60...", "url": "https://..."}, "protected": false}
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code. -1 for parameter validation error, 200 for request completed (check ErrorMessage for business errors), 500 for network/system errors (Agent may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Create a File
Creates a new single file with provided content and commits it to the specified branch in the specified GitHub repository. ⚠️Idempotency Warning: - This action is NOT idempotent. If the file already exists, the API returns 422 error. - To handle this, catch the error and use Get a File to verify, or use Delete a File to delete.
Input Parameters:
- Owner: The account owner name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) page of the repository. (e.g., 'MicrosoftEdge' in https://github.com/MicrosoftEdge)
- Repo: The name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) of the repository. (e.g., 'WebView2Feedback' in https://github.com/MicrosoftEdge/WebView2Feedback). Do NOT include the owner prefix.
- FilePath: Path to the file to be created (including filename). Cannot contain special characters like *, ?, [, ], :, <, >, |
- FileContent: File content in raw string form to be created, which will be Base64 encoded internally.
- CommitMessage: Commit message describing the file creation.
Options:
- Branch: Target branch name. Defaults to the repository's default branch if not specified.
Output:
- File (object): The object of file created. Includes the following main fields: commit (dict): The object of commit created. Includes the following main fields: sha (str): The SHA of the commit. url (str): The URL of the commit. author (dict): The object of author created. Includes the following main fields: name (str): The name of the author. email (str): The email of the author. date (str): The date of the author. content (dict): The content created. Includes the following main fields: name (str): The file name. path (str): The file path. sha (str): The SHA of the file. size (int): The size of the file. html_url (str): The HTML URL of the file. download_url (str): The download URL of the file. type (str): The type of the file. url (str): The URL of the file.
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code. -1 for parameter validation error, 200 for request completed (check ErrorMessage for business errors), 500 for network/system errors (Agent may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Delete a File
Deletes a file from a GitHub repository and returns deletion confirmation. ⚠️ WARNING: This operation is PERMANENT and CANNOT BE UNDONE. Deleted files are immediately removed from GitHub's repository with no recovery option.
Input Parameters:
- Owner: The account owner name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) page of the repository. (e.g., 'MicrosoftEdge' in https://github.com/MicrosoftEdge)
- Repo: The name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) of the repository. (e.g., 'WebView2Feedback' in https://github.com/MicrosoftEdge/WebView2Feedback). Do NOT include the owner prefix.
- FilePath: Path to the file within the repository, relative to the root.
- CommitMessage: Commit message describing the deletion. Example: "Remove outdated config file".
Options:
- Branch: The name of the branch. Cannot contain special characters like *, ?, [, ], :, spaces, or ..
Output:
- DeletedFile (object): Confirmation object for the deleted file. Empty dict on failure. Includes the following fields: path (str): File path. commit (dict): Commit object. Includes the following main fields: sha (str): Commit SHA. url (str): Commit URL. html_url (str): Commit URL. message (str): Commit message.
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code. -1 for parameter validation error, 200 for request completed (check ErrorMessage for business errors), 500 for network/system errors (Agent may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Edit a File
Updates the full text content of an existing file in a GitHub repository by path. ⚠️Defensive calling strategy: - Always read the latest file first with github_file_get before editing. - Use github_repository_files_list to confirm the repository-relative FilePath. - Keep CommitMessage explicit and user-approved because this action creates a real Git commit. Side effects and risk boundaries: This operation writes directly to the repository and creates a real commit, which may trigger CI/CD, notifications, and branch protection checks; treat it as a high-impact change. Boundary: this tool performs full-file replacement rather than patch merge, does not return a diff, and does not provide automatic rollback; revert requires a follow-up commit or Git operation.
Input Parameters:
- Owner: The account owner name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) page of the repository. (e.g., 'MicrosoftEdge' in https://github.com/MicrosoftEdge)
- Repo: The name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) of the repository. (e.g., 'WebView2Feedback' in https://github.com/MicrosoftEdge/WebView2Feedback). Do NOT include the owner prefix.
- FilePath: Path to the file within the repository, relative to the repository root. Use github_repository_files_list to discover valid paths.
- CommitMessage: Commit message for this modification. Use a concise message that explains why the file is being changed.
- NewContent: Complete replacement file content as text. It will be base64 encoded before submission. Include the entire final file content, not a diff.
Options:
- Branch: Optional branch name. If omitted, GitHub uses the repository default branch. Cannot contain Git-reserved characters like *, ?, [, ], :, spaces, or ...
Output:
- UpdatedFile (object): The updated file information object. Empty dictionary on failure. Includes: name (str): The updated file name. path (str): The repository-relative file path. sha (str): Updated blob SHA. size (int): Updated file size. url (str): API URL for the file. html_url (str): Browser URL for the file. git_url (str): Git blob API URL. download_url (str): Raw file download URL. type (str): GitHub content type.
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/conflict errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code. -1 for parameter validation error, 200 for request completed (check ErrorMessage for business errors), 500 for network/system errors (Agent may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Get a File
Gets the content of a committed file in a GitHub repository based on the provided repository information and file path. What: Retrieves file content (decoded from base64) and metadata including SHA, size, name, path, and URLs.
Input Parameters:
- Owner: The account owner name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) page of the repository. (e.g., 'MicrosoftEdge' in https://github.com/MicrosoftEdge)
- Repo: The name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) of the repository. (e.g., 'WebView2Feedback' in https://github.com/MicrosoftEdge/WebView2Feedback). Do NOT include the owner prefix.
- FilePath: Path to the file within the repository, relative to the root. Cannot contain '..' sequences.
Options:
- Refer: Optional parameter specifying commit SHA, branch name, or tag. By default, the latest commit content of the default branch is retrieved.
Output:
- File (object): Object with decoded file content and metadata. Includes the following main fields: - content (str): Decoded file content (text). Empty string for binary files or if decoding fails. - sha (str): SHA-1 hash of the file content. Used for version tracking and updates. - size (int): Size of the file in bytes. - name (str): Name of the file (basename). - path (str): Full path of the file within the repository. - html_url (str): URL to view the file on GitHub web interface. - download_url (str): Direct URL to download the raw file. - git_url (str): URL to the file in Git API. Example: {"content": "Hello World", "sha": "abc123...", "size": 11, "name": "test.txt", "path": "test.txt"}
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code. -1 for parameter validation error, 200 for request completed (check ErrorMessage for business errors), 500 for network/system errors (Agent may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
List Files
Lists all file paths in the specified GitHub repository branch by traversing the Git tree recursively.
Input Parameters:
- Owner: The account owner name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) page of the repository. (e.g., 'MicrosoftEdge' in https://github.com/MicrosoftEdge)
- Repo: The name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) of the repository. (e.g., 'WebView2Feedback' in https://github.com/MicrosoftEdge/WebView2Feedback). Do NOT include the owner prefix.
- Branch: The name of the branch. Cannot contain wildcard or Git-reserved characters (~ ^ : \ ? * [, @{, leading/trailing '/', '..', spaces, '.lock' suffix).
Options:
- PerPage: Maximum number of file paths to return (local cap, since the upstream API is not paginated). Default 100. Use a small value (e.g. 30) to avoid context flooding.
- BatchSize: Internal generator batch size. Default 1000. Does not affect upstream call volume; tune only for memory profiling.
Output:
- Files (string-array): List of repository-relative file paths (blobs only). Capped by PerPage. Directories are excluded.
- Pagination (object): Pagination / truncation metadata. Includes the following fields: total_count (int): Total number of files discovered in the tree (before local cap). returned_count (int): Number of file paths actually returned in Files. per_page (int): The effective local cap value used for this request. has_more (bool): True if total_count > returned_count (more files exist but were trimmed locally). truncated (bool): True if GitHub itself truncated the tree response (very large repo).
- Summary (string): One-sentence summary of the result. Example: "Found 124 files in 'microsoftEdge/WebView2Feedback'@main. Returning first 100 file(s)."
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for the Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code. -1 for parameter validation error, 200 for request completed (check ErrorMessage for business errors), 500 for network/system errors (Agent may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Create an Issue
Creates a new GitHub issue in the specified repository. ⚠️ WARNING: Repository Issues must be enabled (Settings > General > Features > Issues). ⚠️ IDEMPOTENCY WARNING: This operation is NOT idempotent. Idempotency / upsert / retry-conflict: - Suggested client idempotency key: sha256("{owner}/{repo}|{normalized_title}|{normalized_body}"). - GitHub has no native upsert for issue creation; recommended pseudo-upsert: search open issues by title + marker, and reuse existing issue when matched. - Include a hidden marker like <!-- idem:{key} --> in issue body for de-dup and retry reconciliation. - If timeout/5xx occurs after submit, search for the marker before retry; found => treat as success, otherwise retry with backoff.
Input Parameters:
- Owner: The account owner name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) page of the repository. (e.g., 'MicrosoftEdge' in https://github.com/MicrosoftEdge)
- Repo: The name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) of the repository. (e.g., 'WebView2Feedback' in https://github.com/MicrosoftEdge/WebView2Feedback). Do NOT include the owner prefix.
- Title: The newly added title when creating an issue.
Options:
- AdditionalFields: Additional fields to be added to the issue. Includes the following keys: body (str): Issue description. Supports Markdown formatting. milestone (null or string or int):The number of the milestone to associate this issue with. NOTE: Only users with push access can set the milestone for new issues. The milestone is silently dropped otherwise. labels (list): List of labels to be added to the issue. NOTE: Only users with push access can set labels for new issues. Labels are silently dropped otherwise. assignees (list[str]): Logins for users who should be assigned to this issue. NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise. type (str or null): The name of the issue type to associate with this issue. NOTE: Only users with push access can set the type for new issues. The type is silently dropped otherwise.
Output:
- Issue (object): Details of the created issue. Includes the following main fields: id (int): Issue ID. title (str): Issue title. body (str): Issue body content. created_at (str): Issue creation time. updated_at (str): Issue update time. closed_at (str): Issue close time. state (str): Issue state. number (int): Issue number. type (str or null): Issue type.
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code. -1 for parameter validation error, 200 for request completed (check ErrorMessage for business errors), 500 for network/system errors (Agent may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Edit an Issue
Updates the title and content of a specified Issue in a GitHub repository based on the provided parameters. 💡 Best Practice: Before updating, use Get an Issue to retrieve current values. Then modify only the fields you want to change, preserving existing data. ⚠️ WARNING: This operation will overwrite the existing title/body. Use Get an Issue first to retrieve current values if you want to append rather than replace. Side effects and risk boundaries: This write operation immediately updates issue fields and may trigger notifications, project automations, triage workflows, and reporting changes for all collaborators. Boundary: only the provided fields are patched, while omitted fields remain unchanged; it does not create comments or timeline events on its own, and rollback requires another explicit issue edit.
Input Parameters:
- Owner: The account owner name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) page of the repository. (e.g., 'MicrosoftEdge' in https://github.com/MicrosoftEdge)
- Repo: The name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) of the repository. (e.g., 'WebView2Feedback' in https://github.com/MicrosoftEdge/WebView2Feedback). Do NOT include the owner prefix.
- IssueNumber: The issue number to edit.
Options:
- Title: New Issue title when updating an existing issue. Leave empty to keep the existing title.
- Body: Text describing the contents of the issue. Supports Markdown formatting. Leave empty to keep the existing body.
- AdditionalFields: Additional fields to be added to the Issue. state (str): Issue state. Can be "open" or "closed". state_reason (str): Reason for closing the Issue. Can be "completed", "not_planned", "duplicate", "reopened" milestone (int or string or null): Milestone number to assign to the Issue. labels (list): Labels to associate with this issue. Pass one or more labels to replace the set of labels on this issue. Send an empty array ([]) to clear all labels from the issue. assignees (list): Logins for Users to assign to this issue. Pass one or more user logins to replace the set of assignees on this issue. Send an empty array ([]) to clear all assignees from the issue. issue_field_values (list): An array of issue field values to set on this issue. Each field value must include the field ID and the value to set. Each item in the array is a dictionary with the following keys: - field_id (int): The ID of the field to set. - value (str): The value to set for the field. type (str or null): The name of the issue type to associate with this issue or use null to remove the current issue type.
Output:
- Issue (object): Details of the edited issue. Includes the following main fields: id (int): Issue ID. title (str): Issue title. body (str): Issue body content. created_at (str): Issue creation time. updated_at (str): Issue update time. closed_at (str): Issue close time. state (str): Issue state. number (int): Issue number. type (str or null): Issue type.
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code. -1 for parameter validation error, 200 for request completed (check ErrorMessage for business errors), 500 for network/system errors (Agent may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Get Issues for a User
Lists issues assigned to the authenticated user across all visible repositories.
Options:
- PerPage: Number of issues to retrieve per page (max 100). Default is 30.
- Page: Specific page number to fetch. Default: 1
- AdditionalFields: Additional optional fields for the API request. Default is None. filter (str): Filter issues. Default is "assigned". Can be one of: "assigned", "created", "mentioned", "subscribed", "all". assigned means issues assigned to. created means issues created by mentioned means issues mentioning subscribed means issues subscribed to updates for all or repos means all issues to see, regardless of participation or creation. Default: 'assigned' state (str): State of the issues. Default is "open". Can be one of: "open", "closed", "all". sort (str): Sort order. Default is "created". Can be one of: "created", "updated", "comments". direction (str): Direction of sorting. Default is "desc". Can be one of: "asc", "desc". labels (str): A list of comma separated label names. Example: bug,ui,@high since (str): Only show results that were last updated after the given time. Format: YYYY-MM-DDTHH:MM:SSZ Example: 2015-11-01T13:00:00Z
Output:
- Issues (object-array): List of issue objects returned. Each issue object contains the following main fields: - id (int): Issue ID - number (int): Issue number - title (str): Issue title - state (str): State of the issue ("open" or "closed") - url (str): URL to the issue - html_url (str): URL to the issue's HTML page - repository_url (str): URL to the repository's API endpoint - labels (array): List of label objects, each containing: - id (int): Label ID - name (str): Label name - color (str): Label color hex code - user (object): Issue creator, containing: - login (str): GitHub username - id (int): User ID - node_id (str): User node ID - repository (object): Repository information, containing: - id (int): Repository ID - name (str): Repository name - full_name (str): Full repository name (owner/repo) - created_at (str): Creation date (ISO 8601 format) - updated_at (str): Last update date (ISO 8601 format) - closed_at (str): Close date (null if open) - body (str): Issue description text
- Pagination (object): Pagination information. Includes the following fields: first (str): First page url or empty string if there is no first page last (str): Last page url or empty string if there is no last page next (str): Next page url or empty string if there is no next page prev (str): Previous page url or empty string if there is no previous page Note: These URLs already contain complete query parameters and can be directly used for the next API request without manually constructing pagination parameters.
- Summary (string): One-sentence summary of the result. Example: "Found 50 issues in 'MicrosoftEdge'. Returning page 1 with 30 issues."
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code. -1 for parameter validation error, 200 for request completed (check ErrorMessage for business errors), 500 for network/system errors (Agent may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Get Issues of a Repository
Gets a paginated list of issues from a GitHub repository. Key points: - Provide exactly one credential: api_key or access_token. - State accepts open, closed, or all. - Default filter is 'assigned' (only returns issues assigned to the authenticated user). Use additional_fields.filter='all' to see all issues.
Input Parameters:
- Owner: The account owner name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) page of the repository. (e.g., 'MicrosoftEdge' in https://github.com/MicrosoftEdge)
- Repo: The name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) of the repository. (e.g., 'WebView2Feedback' in https://github.com/MicrosoftEdge/WebView2Feedback). Do NOT include the owner prefix.
Options:
- PerPage: Number of issues to return per page. Range: 1-100. Default: 30.
- Page: Page number for pagination, starting from 1. Default: 1.
- AdditionalFields: Additional fields to include in the request. Includes the following fields: state (str): Issue state filter: 'open', 'closed', or 'all'. Default: 'open' sort (str): Sort field: 'created', 'updated', 'comments'. Default: 'created' direction (str): Sort direction: 'asc' or 'desc'. Default: 'desc' filter (str): Indicates which sorts of issues to return. Can be one of: 'assigned', 'created', 'mentioned', 'subscribed', 'repos', 'all' assigned means issues assigned to. created means issues created by mentioned means issues mentioning subscribed means issues subscribed to updates for for the repository. all or repos means all issues to see, regardless of participation or creation. Default: 'assigned' since (str): Only show notifications updated after the given time. Format: YYYY-MM-DDTHH:MM:SSZ, Example: 2015-11-01T13:00:00Z
Output:
- Issues (object-array): Issues list, and each issue is a dictionary. Each issue dictionary contains the following main fields: - id (int): Issue ID - number (int): Issue number - title (str): Issue title - state (str): State of the issue ("open" or "closed") - url (str): URL to the issue - html_url (str): URL to the issue's HTML page - repository_url (str): URL to the repository's API endpoint - labels (array): List of label objects, each containing: - id (int): Label ID - name (str): Label name - color (str): Label color hex code - user (object): Issue creator, containing: - login (str): GitHub username - id (int): User ID - node_id (str): User node ID - repository (object): Repository information, containing: - id (int): Repository ID - name (str): Repository name - full_name (str): Full repository name (owner/repo) - created_at (str): Creation date (ISO 8601 format) - updated_at (str): Last update date (ISO 8601 format) - closed_at (str): Close date (null if open) - body (str): Issue description text
- Pagination (object): Pagination information. Contains the following fields: first (str): First page url or empty string if there is no first page last (str): Last page url or empty string if there is no last page next (str): Next page url or empty string if there is no next page prev (str): Previous page url or empty string if there is no previous page Note: These URLs already contain complete query parameters and can be directly used for the next API request without manually constructing pagination parameters.
- Summary (string): One-sentence summary of the result. Example: "Found 50 issues in 'MicrosoftEdge/WebView2Feedback'. Returning page 1 with 30 issues."
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code. -1 for parameter validation error, 200 for request completed (check ErrorMessage for business errors), 500 for network/system errors (Agent may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Get an Issue
Gets a GitHub issue by its number for a specified repository. Key points: - Owner, Repo, and IssueNumber must identify the exact issue. - Issue.number is the visible issue number from the GitHub URL. - The returned Issue object includes state, html_url, labels, assignee, and author fields.
Input Parameters:
- Owner: The account owner name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) page of the repository. (e.g., 'MicrosoftEdge' in https://github.com/MicrosoftEdge)
- Repo: The name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) of the repository. (e.g., 'WebView2Feedback' in https://github.com/MicrosoftEdge/WebView2Feedback). Do NOT include the owner prefix.
- IssueNumber: The number of the issue to retrieve.
Output:
- Issue (object): Retrieved issue object. Includes the following main fields: - id (int): Issue ID - number (int): Issue number - title (str): Issue title - state (str): State of the issue ("open" or "closed") - url (str): URL to the issue - html_url (str): URL to the issue's HTML page - repository_url (str): URL to the repository's API endpoint - labels (array): List of label objects, each containing: - id (int): Label ID - name (str): Label name - color (str): Label color hex code - user (object): Issue creator, containing: - login (str): GitHub username - id (int): User ID - node_id (str): User node ID - repository (object): Repository information, containing: - id (int): Repository ID - name (str): Repository name - full_name (str): Full repository name (owner/repo) - created_at (str): Creation date (ISO 8601 format) - updated_at (str): Last update date (ISO 8601 format) - closed_at (str): Close date (null if open) - body (str): Issue description text
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code. -1 for parameter validation error, 200 for request completed (check ErrorMessage for business errors), 500 for network/system errors (Agent may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Lock an Issue
Locks a specified Issue in a GitHub repository to prevent new comments. This action cannot be undone. Key points: - Provide exactly one credential: api_key or access_token. - IssueNumber must be a positive integer identifying the target issue. - LockReason is optional but recommended for clarity. - Locking prevents new comments and should be treated as a high-impact moderation action.
Input Parameters:
- Owner: The account owner name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) page of the repository. (e.g., 'MicrosoftEdge' in https://github.com/MicrosoftEdge)
- Repo: The name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) of the repository. (e.g., 'WebView2Feedback' in https://github.com/MicrosoftEdge/WebView2Feedback). Do NOT include the owner prefix.
- IssueNumber: The number of the issue to lock.
Options:
- LockReason: The reason for locking the issue. Can be one of the following: "off-topic", "too heated", "resolved", "spam". Default: "".
Output:
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code. -1 for parameter validation error, 200 for request completed (check ErrorMessage for business errors), 500 for network/system errors (Agent may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Create an Issue Comment
Creates a comment on a GitHub issue or pull request conversation. ⚠️ WARNING: This action always creates a new comment and may produce duplicates. ⚠️ IDEMPOTENCY WARNING: This operation is NOT idempotent. What: Adds a plain text or Markdown comment to an existing issue or PR thread. Idempotency / upsert / retry-conflict: - Suggested client idempotency key: sha256("{owner}/{repo}#{issue_number}|{normalized_comment_body}"). - GitHub has no native upsert for comments; recommended pseudo-upsert: list recent comments, and skip create when the same key marker is found. - Put marker in body, e.g. <!-- idem:{key} -->, so retries can detect an already-created comment. - If timeout/5xx happens after submit, query recent comments by marker first; if found, treat as success; if not found, retry with backoff.
Input Parameters:
- Owner: The account owner name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) page of the repository. (e.g., 'MicrosoftEdge' in https://github.com/MicrosoftEdge)
- Repo: The name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) of the repository. (e.g., 'WebView2Feedback' in https://github.com/MicrosoftEdge/WebView2Feedback). Do NOT include the owner prefix.
- IssueNumber: The number of the issue or pull request to comment on
- CommentBody: Comment text in plain text or Markdown. This content will be posted as the issue comment body.
Output:
- Comment (object): Details of the created comment. Includes the following main fields: id (int): Comment ID. node_id (str): Comment node ID. issue_url (str): URL of the issue. body (str): Comment content. created_at (str): Date and time when the comment was created. updated_at (str): Date and time when the comment was last updated. html_url (str): URL to view the comment. url (str): URL to update the comment.
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code. -1 for parameter validation error, 200 for request completed (check ErrorMessage for business errors), 500 for network/system errors (Agent may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Create a Pull Request
Creates a pull request (PR) to merge changes from a head branch into a base branch in a GitHub repository. ⚠️Not idempotent: repeated calls create duplicate PRs
Input Parameters:
- Owner: The account owner name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) page of the repository. (e.g., 'MicrosoftEdge' in https://github.com/MicrosoftEdge)
- Repo: The name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) of the repository. (e.g., 'WebView2Feedback' in https://github.com/MicrosoftEdge/WebView2Feedback). Do NOT include the owner prefix.
- Head: The name of the branch where your changes are implemented. For cross-repository pull requests in the same network, namespace head with a user like this: username:branch.
- Base: The name of the branch you want the changes pulled into. This should be an existing branch on the current repository. You cannot submit a pull request to one repository that wants to merge code into a different repository.
Options:
- Body: The description/body of the pull request. Supports Markdown formatting.
- Title: The title of the pull request.
- AdditionalFields: Additional fields to be added to the pull request. issue (int): The issue number to link with the pull request. maintainer_can_modify (bool): Indicates whether maintainers can modify the pull request. draft (bool): Indicates whether the pull request is a draft. head_repo (str): The name of the repository where the head branch is located. Only required for cross-repository pull requests.
Output:
- PullRequest (object): The created pull request. Includes the following main fields: id (int): The pull request ID. node_id (str): The node ID. number (int): The pull request number. state (str): The state of the pull request (open, closed). title (str): The title of the pull request. body (str): The body of the pull request. created_at (str): The creation time. updated_at (str): The update time. closed_at (str): The close time. merged_at (str): The merge time. merge_commit_sha (str): The merge commit SHA. url (str): The URL of the pull request. html_url (str): The URL of the pull request page. diff_url (str): The URL of the diff. patch_url (str): The URL of the patch. head (dict): Information about the head branch. base (dict): Information about the base branch.
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code. -1 for parameter validation error, 200 for request completed (check ErrorMessage for business errors), 500 for network/system errors (Agent may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Get Pull Requests of a Repository
Gets a paginated list of pull requests from a GitHub repository. Key points: For first-time calls, use smaller per_page values (e.g., 10-20) to avoid context flooding. Increase only if needed.
Input Parameters:
- Owner: The account owner name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) page of the repository. (e.g., 'MicrosoftEdge' in https://github.com/MicrosoftEdge)
- Repo: The name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) of the repository. (e.g., 'WebView2Feedback' in https://github.com/MicrosoftEdge/WebView2Feedback). Do NOT include the owner prefix.
Options:
- State: Filter by PR state. Accepted values: "open" (active PRs), "closed" (merged/closed PRs), "all" (both). Default: "open".
- Sort: Sort field. Accepted values: "created" (creation date), "updated" (last update), "popularity" (comment count), "long-running" (least recently updated). Default: "created".
- Direction: Sort direction. Accepted values: "asc" (ascending/oldest first), "desc" (descending/newest first). Default: "desc".
- PerPage: Number of results per page. Range: 1-100. Default: 30. Use smaller values (e.g., 10-20) to avoid context overflow when processing many PRs.
- Page: Page number for pagination, starting from 1. Default: 1. Use Pagination.next URL for subsequent pages.
Output:
- PullRequests (object-array): List of pull request objects. Each item contains the following main fields: id (int): PR ID. url (str): PR API URL. number (int): PR number (used for subsequent operations like reviews). title (str): PR title. body (str): PR description/body. state (str): PR state ('open' or 'closed'). created_at (str): PR creation time in ISO 8601 format. updated_at (str): Last update time in ISO 8601 format. html_url (str): URL to PR on GitHub web interface.
- Pagination (object): Pagination information about the list. Contains: first (str): First page URL with complete query parameters. last (str): Last page URL or empty string if unavailable. next (str): Next page URL or empty string if no more pages. prev (str): Previous page URL or empty string if on first page. Note: These URLs already contain complete query parameters and can be directly used for the next API request.
- Summary (string): One-sentence summary including total count and first few PR titles. Use this to quickly understand results without parsing the full array.
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code. -1 for parameter validation error, 200 for request completed (check ErrorMessage for business errors), 500 for network/system errors (Agent may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Create a Release
Creates a new release associated with a Git tag for a repository. ⚠️ WARNING: Creating a release publishes it to your repository. Use draft=true for unpublished releases. Note: This action is idempotent at the API level - creating a release with an existing tag_name will fail with a 422 error.
Input Parameters:
- Owner: The account owner name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) page of the repository. (e.g., 'MicrosoftEdge' in https://github.com/MicrosoftEdge)
- Repo: The name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) of the repository. (e.g., 'WebView2Feedback' in https://github.com/MicrosoftEdge/WebView2Feedback). Do NOT include the owner prefix.
- TagName: The tag name for the release. Cannot contain special characters like *, ?, [, ], :, ~ <, >, |, or \
Options:
- Name: Name of the release. Cannot contain special characters like *, ?, [, ], :, ~ <, >, |, or \
- Body: Text describing the contents of the release. Supports Markdown formatting.
- AdditionalFields: Additional fields to be added to the release. target_commitish (str): Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. draft (bool): True to create a draft (unpublished) release, False to create a published one. prerelease (bool): True to mark the release as a prerelease, False to mark it as a full release. generate_release_notes (bool): True to automatically generate the name and body for this release. If name is specified, the specified or default name will be used. If name is not specified, a name will be automatically generated. The body will be automatically generated in most cases, unless you specify a value for the body. make_latest (str): Specifies whether this release should be set as the latest release for the repository. Can be one of: true, false, legacy "true": Force this release to be the latest, regardless of version number. "false": Explicitly prevent this release from being marked as latest, even if it has a higher version number. "legacy": Maintains backward-compatible behavior. The release will only be marked as latest if its version number is higher than the existing latest release
Output:
- Release (object): id (int): The release ID. node_id (str): The node ID. tag_name (str): The tag name. name (str): The release name. created_at (str): The creation time. updated_at (str): The update time. published_at (str): The publish time. url (str): The URL of the release. html_url (str): The URL of the release page. assets_url (str): The URL of the release assets. upload_url (str): The URL to upload release assets. tarball_url (str): The URL of the release tarball. zipball_url (str): The URL of the release zipball. body (str): The release body.
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code. -1 for parameter validation error, 200 for request completed (check ErrorMessage for business errors), 500 for network/system errors (Agent may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Delete a Release
Deletes a GitHub Release by numeric release ID for a specified repository. ⚠️ WARNING: This operation is PERMANENT and CANNOT BE UNDONE. Deleted release is immediately removed from GitHub's repository with no recovery option.
Input Parameters:
- Owner: The account owner name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) page of the repository. (e.g., 'MicrosoftEdge' in https://github.com/MicrosoftEdge)
- Repo: The name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) of the repository. (e.g., 'WebView2Feedback' in https://github.com/MicrosoftEdge/WebView2Feedback). Do NOT include the owner prefix.
- ReleaseId: The unique numeric ID of the release to delete.
Output:
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code. -1 for parameter validation error, 200 for request completed (check ErrorMessage for business errors), 500 for network/system errors (Agent may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Get Many Releases
Gets a paginated list of releases for a GitHub repository. Key points: For first-time calls, use smaller per_page values (e.g., 10-20) to avoid context flooding. Increase only if needed.
Input Parameters:
- Owner: The account owner name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) page of the repository. (e.g., 'MicrosoftEdge' in https://github.com/MicrosoftEdge)
- Repo: The name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) of the repository. (e.g., 'WebView2Feedback' in https://github.com/MicrosoftEdge/WebView2Feedback). Do NOT include the owner prefix.
Options:
- PerPage: Number of result per page (1-100). Default: 30.
- Page: Page number, starting from 1. Default: 1.
Output:
- Releases (object-array): List of releases. Each release contains the following fields: id (int): Release ID. url (str): URL of the release. html_url (str): URL of the release in HTML format. tag_name (str): Tag name of the release. node_id (str): Node ID of the release. name (str): Name of the release. created_at (str): Creation time of the release. published_at (str): Publication time of the release. updated_at (str): Last update time of the release. body (str): Body of the release.
- Pagination (object): Pagination information. Contains the following fields: first (str): First page url or empty string if there is no first page last (str): Last page url or empty string if there is no last page next (str): Next page url or empty string if there is no next page prev (str): Previous page url or empty string if there is no previous page Note: These URLs already contain complete query parameters and can be directly used for the next API request without manually constructing pagination parameters.
- Summary (string): One-sentence summary of the result. Includes count and first few repository names. Use this to quickly understand the response without parsing the full array.
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code. -1 for parameter validation error, 200 for request completed (check ErrorMessage for business errors), 500 for network/system errors (Agent may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Get a Release
Retrieves a GitHub release by numeric release ID for a specified repository. What*: Retrieves complete release metadata (id, name, body, assets, etc.) for a given Git release ID.
Input Parameters:
- Owner: The account owner name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) page of the repository. (e.g., 'MicrosoftEdge' in https://github.com/MicrosoftEdge)
- Repo: The name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) of the repository. (e.g., 'WebView2Feedback' in https://github.com/MicrosoftEdge/WebView2Feedback). Do NOT include the owner prefix.
- ReleaseId: The numeric ID of the release to retrieve.
Output:
- Release (object): Retrieved Release object in dict format. Includes the following main fields: id (int): The release ID. node_id (str): The node ID. tag_name (str): The tag name. name (str): The release name. created_at (str): The creation time. updated_at (str): The update time. published_at (str): The publish time. url (str): The URL of the release. html_url (str): The URL of the release page. assets_url (str): The URL of the release assets. upload_url (str): The URL to upload release assets. tarball_url (str): The URL of the release tarball. zipball_url (str): The URL of the release zipball. body (str): The release body.
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code. -1 for parameter validation error, 200 for request completed (check ErrorMessage for business errors), 500 for network/system errors (Agent may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Get a Release by Tag
Gets a GitHub release by tag name for a specified repository. What*: Retrieves complete release metadata (id, name, body, assets, etc.) for a given Git tag.
Input Parameters:
- Owner: The account owner name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) page of the repository. (e.g., 'MicrosoftEdge' in https://github.com/MicrosoftEdge)
- Repo: The name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) of the repository. (e.g., 'WebView2Feedback' in https://github.com/MicrosoftEdge/WebView2Feedback). Do NOT include the owner prefix.
- TagName: The tag name associated with the release.Cannot contain special characters like *, ?, [, ], :, ~, <, >, |, or \
Output:
- Release (object): Retrieved Release object in dict format. Includes the following main fields: id (int): The release ID. node_id (str): The node ID. tag_name (str): The tag name. name (str): The release name. created_at (str): The creation time. updated_at (str): The update time. published_at (str): The publish time. url (str): The URL of the release. html_url (str): The URL of the release page. assets_url (str): The URL of the release assets. upload_url (str): The URL to upload release assets. tarball_url (str): The URL of the release tarball. zipball_url (str): The URL of the release zipball. body (str): The release body.
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code. -1 for parameter validation error, 200 for request completed (check ErrorMessage for business errors), 500 for network/system errors (Agent may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Update a Release
Updates the metadata of an existing GitHub release by numeric release ID. (tag name, title, description, draft/prerelease status). ⚠️Defensive calling strategy: - Always verify ReleaseId exists using 'Get Many Releases' before updating - When updating multiple fields, test with draft=true first to avoid publishing incomplete changes - Use make_latest="legacy" unless you explicitly want to override version-based latest selection Side effects and risk boundaries: This write operation immediately changes release metadata and may affect changelog visibility, latest-release resolution, automation that watches releases, and user download expectations. Boundary: it does not upload or delete release assets by itself, does not alter repository code directly, and does not provide automatic rollback; reverting requires a subsequent release update.
Input Parameters:
- Owner: The account owner name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) page of the repository. (e.g., 'MicrosoftEdge' in https://github.com/MicrosoftEdge)
- Repo: The name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) of the repository. (e.g., 'WebView2Feedback' in https://github.com/MicrosoftEdge/WebView2Feedback). Do NOT include the owner prefix.
- ReleaseId: The numeric ID of the release to update.
Options:
- TagName: New tag name for the release. Cannot contain special characters like *, ?, [, ], :, ~, <, >, |, or \
- Body: Text describing the contents of the tag. Supports Markdown formatting.
- AdditionalFields: Additional fields to be updated to the release. Includes the following fields: name (str, optional): New name of the release. Cannot contain special characters like *, ?, [, ], :, ~, <, >, |, or \ target_commitish (str): Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. draft (bool): True to create a draft (unpublished) release, False to create a published one. prerelease (bool): True to mark the release as a prerelease, False to mark it as a full release. make_latest (str): Specifies whether this release should be set as the latest release for the repository. Can be one of: true, false, legacy "true": Force this release to be the latest, regardless of version number. "false": Explicitly prevent this release from being marked as latest, even if it has a higher version number. "legacy": Maintains backward-compatible behavior. The release will only be marked as latest if its version number is higher than the existing latest release
Output:
- Release (object): Updated release object. Includes the following main fields: id (int): The release ID. node_id (str): The node ID. tag_name (str): The tag name. name (str): The release name. created_at (str): The creation time. updated_at (str): The update time. published_at (str): The publish time. url (str): The URL of the release. html_url (str): The URL of the release page. assets_url (str): The URL of the release assets. upload_url (str): The URL to upload release assets. tarball_url (str): The URL of the release tarball. zipball_url (str): The URL of the release zipball. body (str): The release body.
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code. -1 for parameter validation error, 200 for request completed (check ErrorMessage for business errors), 500 for network/system errors (Agent may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Get Repositories for a User
Retrieves the list of repositories for a specified GitHub username. Key points: - Provide exactly one credential: api_key or access_token. - Type controls scope such as owner, member, or all.
Input Parameters:
- UserName: The GitHub username whose repositories are to be fetched. Cannot contain special characters like *, ?, [, ], :, <, >, |, or \
Options:
- RepoType: Type of repositories to retrieve. Default is "owner".
- Sort: Sort field. Accepted values: "created", "updated", "pushed", "full_name". Default: "full_name".
- PerPage: Number of repositories per page. Range: 1-100. Default: 30.
- Page: Specific page number to fetch. Default: 1
- Direction: Direction of sorting. Default is "asc". Can be one of: "asc", "desc".
Output:
- Repositories (object-array): List of repository objects returned. Each repository object contains the following main fields: id (int): Repository ID. name (str): Repository name. description (str): Repository description. node_id (str): Repository node ID. full_name (str): Full name of the repository. html_url (str): URL to the repository's HTML page. url (str): URL to the repository's API endpoint. default_branch (str): Default branch of the repository. created_at (str): Creation date of the repository. updated_at (str): Last update date of the repository. pushed_at (str): Last push date of the repository. visibility (str): Visibility of the repository. Can be one of: "public", "private", "internal".
- Pagination (object): Pagination information about the list. Contains: first (str): First page url or empty string if there is no first page last (str): Last page url or empty string if there is no last page next (str): Next page url or empty string if there is no next page prev (str): Previous page url or empty string if there is no previous page Note: These URLs already contain complete query parameters and can be directly used for the next API request without manually constructing pagination parameters.
- Summary (string): One-sentence summary of the result. Includes count and first few repository names. Use this to quickly understand the response without parsing the full array.
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code. -1 for parameter validation error, 200 for request completed (check ErrorMessage for business errors), 500 for network/system errors (Agent may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Get Repositories for an Organization
Retrieves the list of repositories for a specified GitHub organization. Key points: - Provide exactly one credential: api_key or access_token. - Type controls scope such as all, public, private, forks, sources, member.
Input Parameters:
- Organization: The GitHub organization name whose repositories you want to retrieve.
Options:
- RepoType: Filter repositories by type. Accepted values: "all", "public", "private", "forks", "sources", "member". Default: "all".
- Sort: Sort field. Accepted values: "created", "updated", "pushed", "full_name". Default: "created".
- PerPage: Number of repositories per page. Range: 1-100. Default: 30.
- Page: Page number for pagination, starting from 1. Default: 1.
- Direction: Direction of sorting. Default is "asc". Can be one of: "asc", "desc".
Output:
- Repositories (object-array): List of repository objects returned. Each repository object contains the following main fields: id (int): Repository ID. name (str): Repository name. description (str): Repository description. node_id (str): Repository node ID. full_name (str): Full name of the repository. html_url (str): URL to the repository's HTML page. url (str): URL to the repository's API endpoint. default_branch (str): Default branch of the repository. created_at (str): Creation date of the repository. updated_at (str): Last update date of the repository. pushed_at (str): Last push date of the repository. visibility (str): Visibility of the repository. Can be one of: "public", "private", "internal".
- Pagination (object): Pagination information. Includes the following fields: first (str): First page url or empty string if there is no first page last (str): Last page url or empty string if there is no last page next (str): Next page url or empty string if there is no next page prev (str): Previous page url or empty string if there is no previous page Note: These URLs already contain complete query parameters and can be directly used for the next API request without manually constructing pagination parameters.
- Summary (string): One-sentence summary of the result. Includes count and first few repository names. Use this to quickly understand the response without parsing the full array.
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code. -1 for parameter validation error, 200 for request completed (check ErrorMessage for business errors), 500 for network/system errors (Agent may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Get a Repository
Retrieves detailed metadata for a specified GitHub repository. What: Gets complete repository information including visibility, language, stars, forks, timestamps, and default branch.
Input Parameters:
- Owner: The account owner name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) page of the repository. (e.g., 'MicrosoftEdge' in https://github.com/MicrosoftEdge)
- Repo: The name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) of the repository. (e.g., 'WebView2Feedback' in https://github.com/MicrosoftEdge/WebView2Feedback). Do NOT include the owner prefix.
Output:
- Repository (object): Retrieved Repository object in dict format. Includes the following main fields: id (int): The unique identifier for the repository. name (str): The name of the repository. full_name (str): The full name of the repository, including the owner's username. description (str): The description of the repository. html_url (str): The URL to the repository on GitHub. stargazers_count (int): The number of stars the repository has received. forks_count (int): The number of forks the repository has. open_issues_count (int): The number of open issues the repository has. default_branch (str): The default branch of the repository. visibility (str): The visibility of the repository (public, private, internal). language (str): The primary programming language of the repository. created_at (str): The creation time. updated_at (str): The last update time.
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code. -1 for parameter validation error, 200 for request completed (check ErrorMessage for business errors), 500 for network/system errors (Agent may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Get the License of a Repository
Gets the license information of a specified GitHub repository. Key points: - Provide exactly one credential: access_token or api_key (not both). - License information is extracted from the repository's metadata. - The license field may be null or an empty object if the repository does not have a license file.
Input Parameters:
- Owner: The account owner name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) page of the repository. (e.g., 'MicrosoftEdge' in https://github.com/MicrosoftEdge)
- Repo: The name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) of the repository. (e.g., 'WebView2Feedback' in https://github.com/MicrosoftEdge/WebView2Feedback). Do NOT include the owner prefix.
Output:
- License (object): License information of the repository. Includes the following main fields: key (str): The license key. name (str): The license name. spdx_id (str): The SPDX identifier for the license. url (str): The URL to the license. node_id (str): The node ID of the license.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code. -1 for parameter validation error, 200 for request completed (check ErrorMessage for business errors), 500 for network/system errors (Agent may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Get the Profile of a Repository
Gets metadata for a GitHub repository. Key points: - Provide exactly one credential: access_token or api_key (not both). - Returns the full GitHub repository object including visibility, default branch, and activity metadata. - This tool retrieves one repository at a time; use list tools for multiple repositories.
Input Parameters:
- Owner: The account owner name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) page of the repository. (e.g., 'MicrosoftEdge' in https://github.com/MicrosoftEdge)
- Repo: The name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) of the repository. (e.g., 'WebView2Feedback' in https://github.com/MicrosoftEdge/WebView2Feedback). Do NOT include the owner prefix.
Output:
- Repository (object): The profile of the repository. Includes the following main fields: id (int): The id of the repository. node_id (str): The node id of the repository. name (str): The name of the repository. full_name (str): The full name of the repository. created_at (str): The creation time of the repository. updated_at (str): The last update time of the repository. pushed_at (str): The last push time of the repository. default_branch (str): The default branch of the repository. html_url (str): The HTML URL of the repository. size (int): The size of the repository. stargazers_count (int): The number of stars for the repository. url (str): The URL of the repository.
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code. -1 for parameter validation error, 200 for request completed (check ErrorMessage for business errors), 500 for network/system errors (Agent may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
List Popular Paths of a Repository
Retrieves the top paths for a specified GitHub repository over the last 14 days. Key points: - Provide exactly one credential: access_token or api_key (not both). - Returns only the top 10 paths sorted by view count in descending order. - GitHub API does not support pagination for this endpoint. - Requires repository admin or maintain permission to access traffic data.
Input Parameters:
- Owner: The account owner name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) page of the repository. (e.g., 'MicrosoftEdge' in https://github.com/MicrosoftEdge)
- Repo: The name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) of the repository. (e.g., 'WebView2Feedback' in https://github.com/MicrosoftEdge/WebView2Feedback). Do NOT include the owner prefix.
Output:
- PopularPaths (object): 10 most popular paths. Includes the following fields: paths (list): A list of file paths. Each path includes the following fields: path (str): The path of the file. count (int): The number of times the file was accessed. title (str): The title of the file. uniques (int): The number of unique users who accessed the file. total (int): The total number of files (always ≤ 10).
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code. -1 for parameter validation error, 200 for request completed (check ErrorMessage for business errors), 500 for network/system errors (Agent may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
List the Top Referrers of a Repository
Retrieves the top referrers for a specified GitHub repository over the last 14 days. Key points: - Provide exactly one credential: access_token or api_key (not both). - Returns only the top 10 referrers sorted by view count in descending order. - GitHub API does not support pagination for this endpoint. - Requires repository admin or maintain permission to access traffic data.
Input Parameters:
- Owner: The account owner name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) page of the repository. (e.g., 'MicrosoftEdge' in https://github.com/MicrosoftEdge)
- Repo: The name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) of the repository. (e.g., 'WebView2Feedback' in https://github.com/MicrosoftEdge/WebView2Feedback). Do NOT include the owner prefix.
Output:
- TopReferrers (object): Top 10 referrers in the last 14 days. Includes the following fields: referrers (list): A list of referrer objects. Each referrer includes: - referrer (str): The referrer URL or source. - count (int): The total number of views from this referrer. - uniques (int): The number of unique visitors from this referrer. total (int): The total number of referrers returned (max 10).
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code. -1 for parameter validation error, 200 for request completed (check ErrorMessage for business errors), 500 for network/system errors (Agent may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Search Repository
Searches GitHub repositories with query syntax and pagination. Key points: - Provide exactly one credential: api_key or access_token. - Use GitHub's search qualifiers (e.g., language:python, org:google) for precise results. - Always specify PerPage (limit) to avoid context flooding; default is 30.
Input Parameters:
- Query: Repository search query using GitHub search syntax. Common qualifiers: language:python, stars:>1000, forks:>100, in:name, in:description, user:username, org:orgname, topic:machine-learning, created:>2023-01-01, pushed:>2024-01-01. Combine multiple qualifiers with spaces. Example: language:python stars:>1000 topic:machine-learning.
Options:
- Sort: Sort field. Leave empty to use GitHub's default relevance ranking. Options: stars for most-starred repositories, forks for most-forked repositories, help-wanted-issues for contribution opportunities, updated for most recently updated repositories.
- Order: Sort order. Use desc for highest/newest first or asc for lowest/oldest first. Default: desc.
- PerPage: Number of results per page. Range: 1-100. Default: 30.
- Page: Page number for pagination, starting from 1. Default: 1.
Output:
- Repositories (object-array): A list of repositories. Each repository contains the following main fields: - id (int): Repository ID. - name (str): Repository name. - description (str): Repository description. - html_url (str): Html url of the repository. - language (str): Repository language. - stargazers_count (int): Number of stars for the repository. - created_at (str): Creation date of the repository. - updated_at (str): Last update date of the repository. - pushed_at (str): Last push date of the repository.
- Pagination (object): Pagination information about the list. Contains: page (int): Current page number. total_count (int): Total number of items across all pages. per_page (int): Number of items per page. has_more (bool): True if there are more pages, False otherwise.
- Summary (string): A one-sentence summary of the search results to prevent context flooding.
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code. -1 for parameter validation error, 200 for request completed (check ErrorMessage for business errors), 500 for network/system errors (Agent may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Create a Review
Creates a review for a pull request (PR) in a GitHub repository. ⚠️ WARNING: Submitting a review publishes it on the PR and may notify collaborators. ⚠️ IDEMPOTENCY WARNING: This operation is NOT idempotent. Idempotency / upsert / retry-conflict: - Suggested client idempotency key: sha256("{owner}/{repo}#PR{pull_number}|{event}|{commit_id_or_head}|{normalized_body}|{comments_digest}"). - GitHub has no native upsert for reviews; recommended pseudo-upsert: list recent reviews and skip create when a review with same user + marker/key already exists. - Add marker in Body, e.g. <!-- idem:{key} -->; for inline comments include the same key context. - Retry conflict handling: on timeout/5xx, fetch recent reviews by same user/commit/marker first. For APPROVE / REQUEST_CHANGES, a duplicate-state/422 response can be treated as conflict-resolved success.
Input Parameters:
- Owner: The account owner name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) page of the repository. (e.g., 'MicrosoftEdge' in https://github.com/MicrosoftEdge)
- Repo: The name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) of the repository. (e.g., 'WebView2Feedback' in https://github.com/MicrosoftEdge/WebView2Feedback). Do NOT include the owner prefix.
- PullNumber: Pull request number to review.
Options:
- Body: The body plain text of the pull request review. Required when using REQUEST_CHANGES or COMMENT for the event parameter.
- Event: The review action to perform. Can be one of: "APPROVE", "REQUEST_CHANGES", "COMMENT".
- CommitId: The SHA of the commit that needs a review.
- Comments: Use the following table to specify the location, destination, and contents of the draft review comment. Each comment object must have the following keys: path (str): The relative path to the file that necessitates a review comment. body (str): The text of the review comment. position (int, optional): where to add a review comment in a diff. It is not the file line number. Instead, it counts lines down from the first @@ hunk header: 1. The line right below @@ is position 1, the next line is 2, and so on. 2. The count continues through whitespace and subsequent hunks, resetting only at the start of a new file.
Output:
- Review (object): Created Review object. Includes the following main fields: id (int): Review ID. node_id (str): Node ID. body (str): Review comment content. state (str): Review state. Can be one of "PENDING", "COMMENTED", "APPROVED", "CHANGES_REQUESTED", "DISMISSED". html_url (str): URL to the review. pull_request_url (str): URL to the pull request. author_association (str): Author association. submitted_at (str): Time when the review was submitted. commit_id (str): Commit ID.
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code. -1 for parameter validation error, 200 for request completed (check ErrorMessage for business errors), 500 for network/system errors (Agent may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Get Many Reviews
Gets a paginated list of reviews for a specific pull request in a GitHub repository. Key points: For first-time calls, use smaller per_page values (e.g., 10-20) to avoid context flooding. Increase only if needed.
Input Parameters:
- Owner: The account owner name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) page of the repository. (e.g., 'MicrosoftEdge' in https://github.com/MicrosoftEdge)
- Repo: The name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) of the repository. (e.g., 'WebView2Feedback' in https://github.com/MicrosoftEdge/WebView2Feedback). Do NOT include the owner prefix.
- PullNumber: Pull request number to get reviews.
Options:
- PerPage: Number of results per page (1-100). For first-time calls, use smaller values (e.g., 10-20) to avoid context flooding. Default: 30.
- Page: Page number, starting from 1. Default: 1.
Output:
- Reviews (object-array): List of review objects returned by GitHub API. Each review object contains the following main fields: id (int): Unique identifier of the review. node_id (str): Node ID of the review. user (dict): Information about the user who submitted the review. body (str): The text body of the review. state (str): The state of the review (APPROVED, REQUEST_CHANGES, COMMENT, PENDING). submitted_at (str): Timestamp when the review was submitted. commit_id (str): The SHA of the commit that the review is associated with.
- Pagination (object): Pagination information. Contains the following fields: first (str): First page url or empty string if there is no first page last (str): Last page url or empty string if there is no last page next (str): Next page url or empty string if there is no next page prev (str): Previous page url or empty string if there is no previous page Note: These URLs already contain complete query parameters and can be directly used for the next API request without manually constructing pagination parameters.
- Summary (string): One-sentence summary of the result. Includes count and first few reviewer names. Use this to quickly understand the response without parsing the full array.
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code. -1 for parameter validation error, 200 for request completed (check ErrorMessage for business errors), 500 for network/system errors (Agent may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Get a Review
Retrieves a specific review from a GitHub pull request by review ID. What: Retrieves complete review metadata (id, state, body, submitted_at, commit_id, reviewer details) for a given review ID on a pull request.
Input Parameters:
- Owner: The account owner name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) page of the repository. (e.g., 'MicrosoftEdge' in https://github.com/MicrosoftEdge)
- Repo: The name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) of the repository. (e.g., 'WebView2Feedback' in https://github.com/MicrosoftEdge/WebView2Feedback). Do NOT include the owner prefix.
- PullNumber: Pull request number to get reviews.
- ReviewId: How to obtain: Option: From GitHub API 1. Call the github_pull_request_review_list interface to get the list of reviews for the pull request. 2. Select the desired review from the list. 3. Copy the id field value from the selected review. Example: 3322193356
Output:
- Review (object): Retrieved Review object in dict format. Includes the following main fields: id (int): The review ID. node_id (str): The node ID. body (str): The review comment content. state (str): The review state. Can be one of 'PENDING', 'COMMENTED', 'APPROVED', 'CHANGES_REQUESTED', 'DISMISSED'. html_url (str): URL to the review on GitHub. pull_request_url (str): URL to the pull request API endpoint. author_association (str): Author's association with the repository. submitted_at (str): ISO 8601 timestamp when the review was submitted. commit_id (str): The SHA of the commit the review was made on.
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code. -1 for parameter validation error, 200 for request completed (check ErrorMessage for business errors), 500 for network/system errors (Agent may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Update a Review
Updates the body text of an existing GitHub pull request review. Defensive calling strategy: - Always verify ReviewId and PullNumber exist using 'Get Many Reviews' before updating - Test with a simple body update first to ensure the review is accessible - Ensure the review belongs to the specified pull request Side effects and risk boundaries: This write operation permanently updates the review body and is immediately visible to repository participants, which can affect review context, downstream decisions, and audit history. Boundary: it only edits the review text, does not change review state, and does not modify inline review comments; rollback requires another explicit review update.
Input Parameters:
- Owner: The account owner name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) page of the repository. (e.g., 'MicrosoftEdge' in https://github.com/MicrosoftEdge)
- Repo: The name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) of the repository. (e.g., 'WebView2Feedback' in https://github.com/MicrosoftEdge/WebView2Feedback). Do NOT include the owner prefix.
- PullNumber: Pull request number to get reviews.
- ReviewId: The ID of the Review to update.
- Body: New review comment body text to replace the existing review body.
Output:
- Review (object): Updated Review object. Includes the following main fields: id (int): Review ID. node_id (str): Node ID. body (str): Review comment content. state (str): Review state. Can be one of 'PENDING', 'COMMENTED', 'APPROVED', 'CHANGES_REQUESTED', 'DISMISSED'. html_url (str): URL to the review. pull_request_url (str): URL to the pull request. author_association (str): Author association. submitted_at (str): Time when the review was submitted. commit_id (str): Commit ID.
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code. -1 for parameter validation error, 200 for request completed (check ErrorMessage for business errors), 500 for network/system errors (Agent may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Invite a User to Collaborate
Invites a GitHub user to collaborate on a repository. Key points: - Provide exactly one credential: access_token or api_key (not both). - Username must be a valid GitHub login, not an email address. - Permission is optional and supports: pull, triage, push, maintain, admin. - Returns invitation details when successfully sent (HTTP 201). - Returns empty InvitationDetail when user is already a collaborator (HTTP 204). Side effects and risk boundaries: This operation sends a real collaboration invitation and can grant repository access once accepted, potentially exposing code, issues, and workflow data based on permission level. Boundary: it does not auto-accept invitations, does not modify organization/team memberships, and does not revoke existing access; any rollback requires explicit invitation cancellation or permission removal.
Input Parameters:
- Owner: The account owner name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) page of the repository. (e.g., 'MicrosoftEdge' in https://github.com/MicrosoftEdge)
- Repo: The name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) of the repository. (e.g., 'WebView2Feedback' in https://github.com/MicrosoftEdge/WebView2Feedback). Do NOT include the owner prefix.
- UserName: GitHub username to invite as a collaborator. Example: "torvalds".
Options:
- Permission: Optional collaborator permission. Allowed values: pull, triage, push, maintain, admin. Leave empty to use repository default permission (commonly push).
Output:
- InvitationDetail (object): Details of the invitation object when successfully sent (HTTP 201), otherwise empty. Structure: id (int): Unique identifier for the invitation. created_at (str): ISO 8601 timestamp when invitation was created. html_url (str): The URL for viewing/accepting the invitation. invitee (dict): Information about the invited user (login, id, avatar_url, etc.). inviter (dict): Information about the user who sent the invitation. repository (dict): Repository information the invitation is for. permissions (str): Permission level granted (pull, triage, push, maintain, admin).
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for the Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code. -1 for parameter validation error, 200 for request completed (check ErrorMessage for business errors), 500 for network/system errors (Agent may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Disable a Workflow
Disables a GitHub Actions workflow in a repository to prevent it from running automatically. ⚠️ WARNING: This operation stops the workflow from triggering on events. Existing workflow runs are NOT affected. Side effects and risk boundaries: After disabling, subsequent trigger events are ignored, which may impact CI/CD, release pipelines, and other automations that depend on this workflow. Boundary: this action does not delete the workflow file and does not stop already running jobs; it can be restored by re-enabling, but missed triggers during the disabled period are not replayed automatically.
Input Parameters:
- Owner: The account owner name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) page of the repository. (e.g., 'MicrosoftEdge' in https://github.com/MicrosoftEdge)
- Repo: The name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) of the repository. (e.g., 'WebView2Feedback' in https://github.com/MicrosoftEdge/WebView2Feedback). Do NOT include the owner prefix.
- Workflow: Workflow identifier - either the numeric workflow ID or the workflow filename (including .yml/.yaml extension).
Output:
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code. -1 for parameter validation error, 200 for request completed (check ErrorMessage for business errors), 500 for network/system errors (Agent may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Dispatch a Workflow Event
Dispatches a GitHub Actions workflow on a specific ref without waiting for completion. Side effects and risk boundaries: This operation immediately triggers a workflow_dispatch run, which may generate notifications, webhooks, and GitHub Actions billing usage, and is constrained by permissions and rate limits. Boundary: this action does not wait for completion, does not return run details, and does not provide automatic rollback; if needed, stop it afterward via workflow run cancellation.
Input Parameters:
- Owner: The account owner name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) page of the repository. (e.g., 'MicrosoftEdge' in https://github.com/MicrosoftEdge)
- Repo: The name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) of the repository. (e.g., 'WebView2Feedback' in https://github.com/MicrosoftEdge/WebView2Feedback). Do NOT include the owner prefix.
- Workflow: Workflow filename or numeric workflow ID.
- Ref: Git reference used for the dispatch, typically a branch or tag name such as "main" or "v1.0.0".
Options:
- Inputs: Input keys and values configured in the workflow file. The maximum number of properties is 25. If inputs are omitted, the default properties will be used.
Output:
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code. -1 for parameter validation error, 200 for request completed (check ErrorMessage for business errors), 500 for network/system errors (Agent may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Dispatch a Workflow Event Wait
Dispatches a GitHub Actions workflow and waits for completion to get the final run result. Side effects and risk boundaries: This operation triggers a real workflow run and continuously polls for status, increasing API call consumption in addition to execution billing, and may trigger notifications and downstream automations. Boundary: a wait timeout only means the current call ended, while the GitHub-side run may still be executing; this tool does not return full job logs and does not auto-rollback triggered runs.
Input Parameters:
- Owner: The account owner name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) page of the repository. (e.g., 'MicrosoftEdge' in https://github.com/MicrosoftEdge)
- Repo: The name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) of the repository. (e.g., 'WebView2Feedback' in https://github.com/MicrosoftEdge/WebView2Feedback). Do NOT include the owner prefix.
- Workflow: Workflow filename or ID.
- Ref: Git reference to trigger workflow on. Use short branch/tag name (for example, "main" or "v1.0.0"), not full ref path.
Options:
- Inputs: Optional input parameters for the workflow.
- PollInterval: Polling interval in seconds when waiting for workflow completion. Defaults to 5.
- MaxWaitTime: Maximum wait time in seconds for workflow completion. Defaults to 600 (10 minutes).
Output:
- WorkflowRun (object): Complete workflow run details from GitHub API. Includes the following main fields: id (int): Workflow run ID name (str): Workflow run name node_id (str): Workflow run node ID path (str): Workflow run path workflow_id (int): Workflow ID workflow_url (str): Workflow URL url (str): Workflow run URL html_url (str): Workflow run HTML URL created_at (str): Workflow run creation time updated_at (str): Workflow run update time run_started_at (str): Workflow run start time
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code. -1 for parameter validation error, 200 for request completed (check ErrorMessage for business errors), 500 for network/system errors (Agent may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Enable a Workflow
Enables a previously disabled GitHub Actions workflow in a repository to allow it to run on triggers. ⚠️ WARNING: This operation allows the workflow to respond to events again. It does NOT trigger an immediate run. Side effects and risk boundaries: Re-enabling restores trigger responsiveness, so future matching events can start workflow runs and consume CI/CD capacity, minutes, and related integrations. Boundary: it does not dispatch an immediate run, does not replay missed events from the disabled period, and does not change workflow YAML content or permissions; disable again if unintended executions occur.
Input Parameters:
- Owner: The account owner name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) page of the repository. (e.g., 'MicrosoftEdge' in https://github.com/MicrosoftEdge)
- Repo: The name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) of the repository. (e.g., 'WebView2Feedback' in https://github.com/MicrosoftEdge/WebView2Feedback). Do NOT include the owner prefix.
- Workflow: Workflow identifier - either the numeric workflow ID or the workflow filename (including .yml/.yaml extension).
Output:
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code. -1 for parameter validation error, 200 for request completed (check ErrorMessage for business errors), 500 for network/system errors (Agent may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Get a Workflow
Retrieves a specific GitHub Actions workflow by its workflow ID or file name from a repository. What: Retrieves complete workflow metadata (id, name, path, state, created_at, updated_at, urls) for a given workflow ID or filename.
Input Parameters:
- Owner: The account owner name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) page of the repository. (e.g., 'MicrosoftEdge' in https://github.com/MicrosoftEdge)
- Repo: The name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) of the repository. (e.g., 'WebView2Feedback' in https://github.com/MicrosoftEdge/WebView2Feedback). Do NOT include the owner prefix.
- Workflow: Workflow ID or filename to retrieve.
Output:
- Workflow (object): Retrieved Workflow object in dict format. Includes the following main fields: id (int): The unique identifier of the workflow. node_id (str): The node ID of the workflow. name (str): The name of the workflow. path (str): The path to the workflow file. state (str): The state of the workflow. Can be one of: 'active', 'disabled_manually', 'disabled_inactivity', 'deleted'. created_at (str): ISO 8601 timestamp when the workflow was created. updated_at (str): ISO 8601 timestamp when the workflow was last updated. url (str): URL to the workflow API endpoint. html_url (str): URL to the workflow file in the repository. badge_url (str): URL to the workflow badge.
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code. -1 for parameter validation error, 200 for request completed (check ErrorMessage for business errors), 500 for network/system errors (Agent may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Get the Usage of a Workflow
Gets the usage metrics of a specified workflow in a GitHub repository. Key points: - Provide exactly one credential: access_token or api_key (not both). - Workflow can be identified by numeric ID (e.g., '98326988') or filename (e.g., 'testAction.yml'). - Usage data includes billable runtime per OS platform (UBUNTU, MACOS, WINDOWS).
Input Parameters:
- Owner: The account owner name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) page of the repository. (e.g., 'MicrosoftEdge' in https://github.com/MicrosoftEdge)
- Repo: The name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) of the repository. (e.g., 'WebView2Feedback' in https://github.com/MicrosoftEdge/WebView2Feedback). Do NOT include the owner prefix.
- Workflow: Workflow ID or filename to retrieve usage metrics for.
Output:
- Usage (object): Workflow usage data containing billable metrics. Structure: billable (object): Contains OS-specific usage data with keys like 'UBUNTU', 'MACOS', 'WINDOWS'. Each OS type includes: - total_ms (int): Total runtime in milliseconds. - jobs (int): Number of jobs executed.
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code. -1 for parameter validation error, 200 for request completed (check ErrorMessage for business errors), 500 for network/system errors (Agent may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
List Workflows
Retrieves a list of all Actions workflows for the specified GitHub repository. Key points: - Provide exactly one credential: api_key or access_token. - Workflows.list[] includes id, name, path, state, html_url, and badge_url. - Workflows.total is useful for summary reporting, and pagination inputs control larger result sets.
Input Parameters:
- Owner: The account owner name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) page of the repository. (e.g., 'MicrosoftEdge' in https://github.com/MicrosoftEdge)
- Repo: The name (no spaces or special chars like *, ?, [, ], :, <, >, |, or \) of the repository. (e.g., 'WebView2Feedback' in https://github.com/MicrosoftEdge/WebView2Feedback). Do NOT include the owner prefix.
Options:
- PerPage: Number of results per page (1-100). For first-time calls, use smaller values (e.g., 10-20) to avoid context flooding. Default: 30.
- Page: Page number, starting from 1. Default: 1.
Output:
- Workflows (object-array): A list of workflows. Each workflow is represented as a dictionary with the following fields: - id (int): The unique identifier of the workflow. - node_id (str): The node ID of the workflow. - name (str): The name of the workflow. - path (str): The path to the workflow file. - state (str): The state of the workflow. Can be one of: active, disabled, deleted. - created_at (str): The timestamp when the workflow was created. - updated_at (str): The timestamp when the workflow was last updated. - url (str): The URL to the workflow. - html_url (str): The URL to the workflow file in the repository. - badge_url (str): The URL to the workflow badge.
- Pagination (object): Pagination information about the list. Contains: page (int): Current page number. total_count (int): Total number of items across all pages. per_page (int): Number of items per page. has_more (bool): True if there are more pages, False otherwise.
- Summary (string): One-sentence summary of the result. Includes count and first few workflow names. Use this to quickly understand the response without parsing the full array.
- Hint (string): Guidance on what to do next when an error occurs. Provides actionable steps for Agent to resolve the issue.
- Retryable (bool): Whether the request can be retried with the same parameters. True for transient errors (timeout, rate limit, 5xx), False for parameter/auth/not-found errors.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code. -1 for parameter validation error, 200 for request completed (check ErrorMessage for business errors), 500 for network/system errors (Agent may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
5. Example Usage
This section will guide you through creating a simple workflow to automatically create a new Issue in your GitHub repository.
Workflow Overview
A basic workflow contains three nodes: Start -> Create an Issue -> Answer. When the workflow is triggered, it will create a new Issue in your specified repository.
Step-by-Step Guide
- Add Tool Node:
- In the workflow canvas, click the "+" button to add a new node.
- Select the "Tools" tab in the panel that appears.
- Find and select Github from the tools list.
- In the list of operations supported by Github, click to select Create an Issue, which will add the corresponding node to the canvas.
- Configure Node:
- Click the newly added Create an Issue node, and the configuration panel for this node will expand on the right.
- Credential Configuration: At the top of the panel, find the credentials field. Click the dropdown menu and select your configured Github credentials.
- Parameter Entry: Fill in the input parameters for this operation in detail.
- Owner: Fill in the name of the user or organization that owns the target repository. For example, go-insight.
- Repo: Fill in the name of the target repository. For example, go-insight-public.
- Title: Enter a title for the Issue you want to create. For example, Fix Bug on Login Page.
- Body (optional): You can add a more detailed description for the Issue. For example, User receives no response after clicking the login button..
- Run and Verify:
- When all required parameters are filled in correctly, the error prompt in the upper right corner of the workflow canvas will disappear.
- Click the "Test Run" button in the upper right corner of the canvas to execute the workflow.
- After successful execution, you can click the log icon in the upper right corner to view the detailed input and output of the node. The Issue field in the output will contain detailed information about the newly created Issue. You can also visit your GitHub repository to confirm whether the new Issue has been successfully created.
Final Workflow Display
After completing the above steps, your entire workflow will be configured. After clicking "Test Run", a new Issue will be successfully created in your specified GitHub repository.
6. FAQs
Q: Why am I receiving a 403 Forbidden or 404 Not Found error when operating on private repositories?
A: This is usually due to insufficient permissions. Please check the following:
- Credential Permissions: Ensure that the Personal Access Token (PAT) you use for GoInsight credentials has sufficient permission scopes. For reading and writing private repositories, you typically need the repo scope.
- Repository Access: Confirm that your GitHub account itself has the appropriate permissions (for example, write permissions) for the target repository.
Q: What format should the SearchQuery parameter be in when using the "Search Repository" operation?
A: The SearchQuery parameter uses GitHub's official search syntax. You can combine multiple keywords and qualifiers for precise searching. For example, to search for repositories containing the keyword "goinsight" that use the Go language and have more than 100 stars, you can fill in: goinsight language:go stars:>100.
Q: Do I need to perform Base64 encoding myself for the FileContent in the "Create a File" operation?
A: No. You only need to provide the original text content in the FileContent field. The GoInsight node will automatically perform Base64 encoding for you when sending the request to the GitHub API.
7. Official Documentation
For more advanced usage and detailed information about the GitHub API, please refer to the official documentation:
Leave a Reply.