Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 22 additions & 58 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -983,101 +983,65 @@ Possible options:

<summary>Repositories</summary>

- **commit_read** - Read commits
- `author`: For 'list' method: Author username or email address to filter commits by (string, optional)
- `include_diff`: For 'get' method: Whether to include file diffs and stats in the response. Default is true. (boolean, optional)
- `method`: Method to use: 'get' for getting a single commit, 'list' for listing commits (string, required)
- `owner`: Repository owner (string, required)
- `page`: Page number for pagination (min 1) (number, optional)
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
- `repo`: Repository name (string, required)
- `sha`: For 'get': Commit SHA, branch name, or tag name (required). For 'list': Commit SHA, branch or tag name to list commits of (optional). (string, optional)

- **create_branch** - Create branch
- `branch`: Name for new branch (string, required)
- `from_branch`: Source branch (defaults to repo default) (string, optional)
- `owner`: Repository owner (string, required)
- `repo`: Repository name (string, required)

- **create_or_update_file** - Create or update file
- `branch`: Branch to create/update the file in (string, required)
- `content`: Content of the file (string, required)
- `message`: Commit message (string, required)
- `owner`: Repository owner (username or organization) (string, required)
- `path`: Path where to create/update the file (string, required)
- `repo`: Repository name (string, required)
- `sha`: Required if updating an existing file. The blob SHA of the file being replaced. (string, optional)

- **create_repository** - Create repository
- `autoInit`: Initialize with README (boolean, optional)
- `description`: Repository description (string, optional)
- `name`: Repository name (string, required)
- `organization`: Organization to create the repository in (omit to create in your personal account) (string, optional)
- `private`: Whether repo should be private (boolean, optional)

- **delete_file** - Delete file
- `branch`: Branch to delete the file from (string, required)
- **file_write** - Write operations (create, update, delete, push_files) on repository files
- `branch`: Branch to perform the operation on (string, required)
- `content`: Content of the file (required for create and update methods) (string, optional)
- `files`: Array of file objects to push (required for push_files method), each object with path (string) and content (string) (object[], optional)
- `message`: Commit message (string, required)
- `method`: The write operation to perform on repository files. (string, required)
- `owner`: Repository owner (username or organization) (string, required)
- `path`: Path to the file to delete (string, required)
- `path`: Path to the file (required for create, update, delete methods) (string, optional)
- `repo`: Repository name (string, required)
- `sha`: Blob SHA of the file being replaced (required for update method) (string, optional)

- **fork_repository** - Fork repository
- `organization`: Organization to fork to (string, optional)
- `owner`: Repository owner (string, required)
- `repo`: Repository name (string, required)

- **get_commit** - Get commit details
- `include_diff`: Whether to include file diffs and stats in the response. Default is true. (boolean, optional)
- `owner`: Repository owner (string, required)
- `page`: Page number for pagination (min 1) (number, optional)
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
- `repo`: Repository name (string, required)
- `sha`: Commit SHA, branch name, or tag name (string, required)

- **get_file_contents** - Get file or directory contents
- `owner`: Repository owner (username or organization) (string, required)
- `path`: Path to file/directory (directories must end with a slash '/') (string, optional)
- `ref`: Accepts optional git refs such as `refs/tags/{tag}`, `refs/heads/{branch}` or `refs/pull/{pr_number}/head` (string, optional)
- `repo`: Repository name (string, required)
- `sha`: Accepts optional commit SHA. If specified, it will be used instead of ref (string, optional)

- **get_latest_release** - Get latest release
- `owner`: Repository owner (string, required)
- `repo`: Repository name (string, required)

- **get_release_by_tag** - Get a release by tag name
- `owner`: Repository owner (string, required)
- `repo`: Repository name (string, required)
- `tag`: Tag name (e.g., 'v1.0.0') (string, required)

- **get_tag** - Get tag details
- `owner`: Repository owner (string, required)
- `repo`: Repository name (string, required)
- `tag`: Tag name (string, required)

- **list_branches** - List branches
- `owner`: Repository owner (string, required)
- `page`: Page number for pagination (min 1) (number, optional)
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
- `repo`: Repository name (string, required)

- **list_commits** - List commits
- `author`: Author username or email address to filter commits by (string, optional)
- `owner`: Repository owner (string, required)
- `page`: Page number for pagination (min 1) (number, optional)
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
- `repo`: Repository name (string, required)
- `sha`: Commit SHA, branch or tag name to list commits of. If not provided, uses the default branch of the repository. If a commit SHA is provided, will list commits up to that SHA. (string, optional)

- **list_releases** - List releases
- `owner`: Repository owner (string, required)
- `page`: Page number for pagination (min 1) (number, optional)
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
- `repo`: Repository name (string, required)

- **list_tags** - List tags
- `owner`: Repository owner (string, required)
- `page`: Page number for pagination (min 1) (number, optional)
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
- `repo`: Repository name (string, required)

- **push_files** - Push files to repository
- `branch`: Branch to push to (string, required)
- `files`: Array of file objects to push, each object with path (string) and content (string) (object[], required)
- `message`: Commit message (string, required)
- **release_read** - Read operations for releases and tags
- `method`: The read operation to perform on releases/tags. (string, required)
- `owner`: Repository owner (string, required)
- `page`: Page number for pagination (min 1) (for list_tags and list_releases methods) (number, optional)
- `perPage`: Results per page for pagination (min 1, max 100) (for list_tags and list_releases methods) (number, optional)
- `repo`: Repository name (string, required)
- `tag`: Tag name (required for get_tag and get_release_by_tag methods) (string, optional)

- **search_code** - Search code
- `order`: Sort order for results (string, optional)
Expand Down
58 changes: 58 additions & 0 deletions pkg/github/__toolsnaps__/commit_read.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"annotations": {
"title": "Read commits",
"readOnlyHint": true
},
"description": "Read commit data from a GitHub repository. Supports getting a single commit or listing commits.",
"inputSchema": {
"properties": {
"author": {
"description": "For 'list' method: Author username or email address to filter commits by",
"type": "string"
},
"include_diff": {
"default": true,
"description": "For 'get' method: Whether to include file diffs and stats in the response. Default is true.",
"type": "boolean"
},
"method": {
"description": "Method to use: 'get' for getting a single commit, 'list' for listing commits",
"enum": [
"get",
"list"
],
"type": "string"
},
"owner": {
"description": "Repository owner",
"type": "string"
},
"page": {
"description": "Page number for pagination (min 1)",
"minimum": 1,
"type": "number"
},
"perPage": {
"description": "Results per page for pagination (min 1, max 100)",
"maximum": 100,
"minimum": 1,
"type": "number"
},
"repo": {
"description": "Repository name",
"type": "string"
},
"sha": {
"description": "For 'get': Commit SHA, branch name, or tag name (required). For 'list': Commit SHA, branch or tag name to list commits of (optional).",
"type": "string"
}
},
"required": [
"method",
"owner",
"repo"
],
"type": "object"
},
"name": "commit_read"
}
49 changes: 0 additions & 49 deletions pkg/github/__toolsnaps__/create_or_update_file.snap

This file was deleted.

41 changes: 0 additions & 41 deletions pkg/github/__toolsnaps__/delete_file.snap

This file was deleted.

80 changes: 80 additions & 0 deletions pkg/github/__toolsnaps__/file_write.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
{
"annotations": {
"title": "Write operations (create, update, delete, push_files) on repository files",
"readOnlyHint": false
},
"description": "Write operations (create, update, delete, push_files) on repository files.\n\nAvailable methods:\n- create: Create a new file in a repository.\n- update: Update an existing file in a repository. Requires the SHA of the file being replaced.\n- delete: Delete a file from a repository.\n- push_files: Push multiple files to a repository in a single commit.\n",
"inputSchema": {
"properties": {
"branch": {
"description": "Branch to perform the operation on",
"type": "string"
},
"content": {
"description": "Content of the file (required for create and update methods)",
"type": "string"
},
"files": {
"description": "Array of file objects to push (required for push_files method), each object with path (string) and content (string)",
"items": {
"additionalProperties": false,
"properties": {
"content": {
"description": "file content",
"type": "string"
},
"path": {
"description": "path to the file",
"type": "string"
}
},
"required": [
"path",
"content"
],
"type": "object"
},
"type": "array"
},
"message": {
"description": "Commit message",
"type": "string"
},
"method": {
"description": "The write operation to perform on repository files.",
"enum": [
"create",
"update",
"delete",
"push_files"
],
"type": "string"
},
"owner": {
"description": "Repository owner (username or organization)",
"type": "string"
},
"path": {
"description": "Path to the file (required for create, update, delete methods)",
"type": "string"
},
"repo": {
"description": "Repository name",
"type": "string"
},
"sha": {
"description": "Blob SHA of the file being replaced (required for update method)",
"type": "string"
}
},
"required": [
"method",
"owner",
"repo",
"branch",
"message"
],
"type": "object"
},
"name": "file_write"
}
Loading
Loading