Skip to content
Open
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
43 changes: 43 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1260,6 +1260,20 @@ The following sets of tools are available:
- `repo`: Repository name (string, required)
- `sha`: The blob SHA of the file being replaced. Required if the file already exists. (string, optional)

- **create_release** - Create release
- **Required OAuth Scopes**: `repo`
- `body`: Text describing the release. If generate_release_notes is true, this is prepended to the automatically generated notes. (string, optional)
- `discussion_category_name`: Name of a discussion category in the repository to start a discussion for the release in (string, optional)
- `draft`: Save the release as a draft instead of publishing it (boolean, optional)
- `generate_release_notes`: Whether to automatically generate the name and body for this release based on merged pull requests since the last release (boolean, optional)
- `make_latest`: Whether this release should be marked as the latest release for the repository (string, optional)
- `name`: Release title (string, optional)
- `owner`: Repository owner (string, required)
- `prerelease`: Mark the release as a prerelease (boolean, optional)
- `repo`: Repository name (string, required)
- `tag_name`: Tag name for the release (e.g., 'v1.0.0'). Created automatically if it doesn't already exist. (string, required)
- `target_commitish`: Branch, tag, or commit SHA the Git tag is created from if tag_name doesn't already exist. Defaults to the repository's default branch. (string, optional)

- **create_repository** - Create repository
- **Required OAuth Scopes**: `repo`
- `autoInit`: Initialize with README (boolean, optional)
Expand All @@ -1276,12 +1290,27 @@ The following sets of tools are available:
- `path`: Path to the file to delete (string, required)
- `repo`: Repository name (string, required)

- **delete_release** - Delete release
- **Required OAuth Scopes**: `repo`
- `owner`: Repository owner (string, required)
- `release_id`: The unique identifier of the release to delete (number, required)
- `repo`: Repository name (string, required)

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

- **generate_release_notes** - Generate release notes
- **Required OAuth Scopes**: `repo`
- `configuration_file_path`: Path to a release-notes configuration file in the repository, relative to the repository root (e.g., '.github/release.yml'), to use instead of the default configuration (string, optional)
- `owner`: Repository owner (string, required)
- `previous_tag_name`: The name of the previous tag to use as the starting point for the release notes. If omitted, GitHub uses the tag that immediately precedes tag_name chronologically. (string, optional)
- `repo`: Repository name (string, required)
- `tag_name`: The tag name for the release whose notes are being generated. This doesn't need to exist yet. (string, required)
- `target_commitish`: Branch, tag, or commit SHA the Git tag is created from if tag_name doesn't already exist. Defaults to the repository's default branch. (string, optional)

- **get_commit** - Get commit details
- **Required OAuth Scopes**: `repo`
- `detail`: Level of detail to include for changed files. "none" omits stats and files entirely. "stats" (default) includes per-file metadata: filename, status, and lines-of-code counts (additions, deletions, changes), with no patch content. "full_patch" additionally includes the unified diff content for each file and can be very large. (string, optional)
Expand Down Expand Up @@ -1390,6 +1419,20 @@ The following sets of tools are available:
- `query`: Repository search query. Examples: 'machine learning in:name stars:>1000 language:python', 'topic:react', 'user:facebook'. Supports advanced search syntax for precise filtering. (string, required)
- `sort`: Sort repositories by field, defaults to best match (string, optional)

- **update_release** - Update release
- **Required OAuth Scopes**: `repo`
- `body`: Text describing the release (string, optional)
- `discussion_category_name`: Name of a discussion category in the repository to start a discussion for the release in. Can only be set once, when the release is published for the first time. (string, optional)
- `draft`: Whether the release should be a draft (unpublished) (boolean, optional)
- `make_latest`: Whether this release should be marked as the latest release for the repository (string, optional)
- `name`: Release title (string, optional)
- `owner`: Repository owner (string, required)
- `prerelease`: Whether the release should be marked as a prerelease (boolean, optional)
- `release_id`: The unique identifier of the release to update (number, required)
- `repo`: Repository name (string, required)
- `tag_name`: New tag name for the release (string, optional)
- `target_commitish`: Branch, tag, or commit SHA the Git tag is created from if the tag doesn't already exist (string, optional)

</details>

<details>
Expand Down
68 changes: 68 additions & 0 deletions pkg/github/__toolsnaps__/create_release.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"annotations": {
"idempotentHint": false,
"readOnlyHint": false,
"title": "Create release"
},
"description": "Create a new release in a GitHub repository",
"inputSchema": {
"properties": {
"body": {
"description": "Text describing the release. If generate_release_notes is true, this is prepended to the automatically generated notes.",
"type": "string"
},
"discussion_category_name": {
"description": "Name of a discussion category in the repository to start a discussion for the release in",
"type": "string"
},
"draft": {
"description": "Save the release as a draft instead of publishing it",
"type": "boolean"
},
"generate_release_notes": {
"description": "Whether to automatically generate the name and body for this release based on merged pull requests since the last release",
"type": "boolean"
},
"make_latest": {
"description": "Whether this release should be marked as the latest release for the repository",
"enum": [
"true",
"false",
"legacy"
],
"type": "string"
},
"name": {
"description": "Release title",
"type": "string"
},
"owner": {
"description": "Repository owner",
"type": "string"
},
"prerelease": {
"description": "Mark the release as a prerelease",
"type": "boolean"
},
"repo": {
"description": "Repository name",
"type": "string"
},
"tag_name": {
"description": "Tag name for the release (e.g., 'v1.0.0'). Created automatically if it doesn't already exist.",
"type": "string"
},
"target_commitish": {
"description": "Branch, tag, or commit SHA the Git tag is created from if tag_name doesn't already exist. Defaults to the repository's default branch.",
"type": "string"
}
},
"required": [
"owner",
"repo",
"tag_name"
],
"type": "object"
},
"name": "create_release"
}
32 changes: 32 additions & 0 deletions pkg/github/__toolsnaps__/delete_release.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"annotations": {
"destructiveHint": true,
"idempotentHint": false,
"readOnlyHint": false,
"title": "Delete release"
},
"description": "Delete a release from a GitHub repository. This does not delete the underlying Git tag.",
"inputSchema": {
"properties": {
"owner": {
"description": "Repository owner",
"type": "string"
},
"release_id": {
"description": "The unique identifier of the release to delete",
"type": "number"
},
"repo": {
"description": "Repository name",
"type": "string"
}
},
"required": [
"owner",
"repo",
"release_id"
],
"type": "object"
},
"name": "delete_release"
}
43 changes: 43 additions & 0 deletions pkg/github/__toolsnaps__/generate_release_notes.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"annotations": {
"idempotentHint": false,
"readOnlyHint": true,
"title": "Generate release notes"
},
"description": "Generate the name and body text for a release, based on merged pull requests since the last release, without creating or modifying a release",
"inputSchema": {
"properties": {
"configuration_file_path": {
"description": "Path to a release-notes configuration file in the repository, relative to the repository root (e.g., '.github/release.yml'), to use instead of the default configuration",
"type": "string"
},
"owner": {
"description": "Repository owner",
"type": "string"
},
"previous_tag_name": {
"description": "The name of the previous tag to use as the starting point for the release notes. If omitted, GitHub uses the tag that immediately precedes tag_name chronologically.",
"type": "string"
},
"repo": {
"description": "Repository name",
"type": "string"
},
"tag_name": {
"description": "The tag name for the release whose notes are being generated. This doesn't need to exist yet.",
"type": "string"
},
"target_commitish": {
"description": "Branch, tag, or commit SHA the Git tag is created from if tag_name doesn't already exist. Defaults to the repository's default branch.",
"type": "string"
}
},
"required": [
"owner",
"repo",
"tag_name"
],
"type": "object"
},
"name": "generate_release_notes"
}
68 changes: 68 additions & 0 deletions pkg/github/__toolsnaps__/update_release.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"annotations": {
"idempotentHint": false,
"readOnlyHint": false,
"title": "Update release"
},
"description": "Update an existing release in a GitHub repository",
"inputSchema": {
"properties": {
"body": {
"description": "Text describing the release",
"type": "string"
},
"discussion_category_name": {
"description": "Name of a discussion category in the repository to start a discussion for the release in. Can only be set once, when the release is published for the first time.",
"type": "string"
},
"draft": {
"description": "Whether the release should be a draft (unpublished)",
"type": "boolean"
},
"make_latest": {
"description": "Whether this release should be marked as the latest release for the repository",
"enum": [
"true",
"false",
"legacy"
],
"type": "string"
},
"name": {
"description": "Release title",
"type": "string"
},
"owner": {
"description": "Repository owner",
"type": "string"
},
"prerelease": {
"description": "Whether the release should be marked as a prerelease",
"type": "boolean"
},
"release_id": {
"description": "The unique identifier of the release to update",
"type": "number"
},
"repo": {
"description": "Repository name",
"type": "string"
},
"tag_name": {
"description": "New tag name for the release",
"type": "string"
},
"target_commitish": {
"description": "Branch, tag, or commit SHA the Git tag is created from if the tag doesn't already exist",
"type": "string"
}
},
"required": [
"owner",
"repo",
"release_id"
],
"type": "object"
},
"name": "update_release"
}
10 changes: 7 additions & 3 deletions pkg/github/helper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,13 @@ const (
PatchGistsByGistID = "PATCH /gists/{gist_id}"

// Releases endpoints
GetReposReleasesByOwnerByRepo = "GET /repos/{owner}/{repo}/releases"
GetReposReleasesLatestByOwnerByRepo = "GET /repos/{owner}/{repo}/releases/latest"
GetReposReleasesTagsByOwnerByRepoByTag = "GET /repos/{owner}/{repo}/releases/tags/{tag}"
GetReposReleasesByOwnerByRepo = "GET /repos/{owner}/{repo}/releases"
GetReposReleasesLatestByOwnerByRepo = "GET /repos/{owner}/{repo}/releases/latest"
GetReposReleasesTagsByOwnerByRepoByTag = "GET /repos/{owner}/{repo}/releases/tags/{tag}"
PostReposReleasesByOwnerByRepo = "POST /repos/{owner}/{repo}/releases"
PatchReposReleasesByOwnerByRepoByReleaseID = "PATCH /repos/{owner}/{repo}/releases/{release_id}"
DeleteReposReleasesByOwnerByRepoByReleaseID = "DELETE /repos/{owner}/{repo}/releases/{release_id}"
PostReposReleasesGenerateNotesByOwnerByRepo = "POST /repos/{owner}/{repo}/releases/generate-notes"

// Code quality endpoints
GetReposCodeQualityFindingsByOwnerByRepoByFindingNumber = "GET /repos/{owner}/{repo}/code-quality/findings/{finding_number}"
Expand Down
Loading