Skip to content

Commit ee1fb9f

Browse files
refactor: use feature flags instead of separate granular toolsets
Place granular tools in existing issues/pull_requests toolsets with FeatureFlagEnable, instead of creating separate issues_granular and pull_requests_granular toolsets. This is simpler and uses the existing feature flag infrastructure to switch between consolidated and granular tool variants at runtime. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 5878c21 commit ee1fb9f

File tree

6 files changed

+66
-255
lines changed

6 files changed

+66
-255
lines changed

README.md

Lines changed: 0 additions & 166 deletions
Original file line numberDiff line numberDiff line change
@@ -566,13 +566,11 @@ The following sets of tools are available:
566566
| <picture><source media="(prefers-color-scheme: dark)" srcset="pkg/octicons/icons/logo-gist-dark.png"><source media="(prefers-color-scheme: light)" srcset="pkg/octicons/icons/logo-gist-light.png"><img src="pkg/octicons/icons/logo-gist-light.png" width="20" height="20" alt="logo-gist"></picture> | `gists` | GitHub Gist related tools |
567567
| <picture><source media="(prefers-color-scheme: dark)" srcset="pkg/octicons/icons/git-branch-dark.png"><source media="(prefers-color-scheme: light)" srcset="pkg/octicons/icons/git-branch-light.png"><img src="pkg/octicons/icons/git-branch-light.png" width="20" height="20" alt="git-branch"></picture> | `git` | GitHub Git API related tools for low-level Git operations |
568568
| <picture><source media="(prefers-color-scheme: dark)" srcset="pkg/octicons/icons/issue-opened-dark.png"><source media="(prefers-color-scheme: light)" srcset="pkg/octicons/icons/issue-opened-light.png"><img src="pkg/octicons/icons/issue-opened-light.png" width="20" height="20" alt="issue-opened"></picture> | `issues` | GitHub Issues related tools |
569-
| <picture><source media="(prefers-color-scheme: dark)" srcset="pkg/octicons/icons/issue-opened-dark.png"><source media="(prefers-color-scheme: light)" srcset="pkg/octicons/icons/issue-opened-light.png"><img src="pkg/octicons/icons/issue-opened-light.png" width="20" height="20" alt="issue-opened"></picture> | `issues_granular` | Granular issue tools with fine-grained control over individual operations |
570569
| <picture><source media="(prefers-color-scheme: dark)" srcset="pkg/octicons/icons/tag-dark.png"><source media="(prefers-color-scheme: light)" srcset="pkg/octicons/icons/tag-light.png"><img src="pkg/octicons/icons/tag-light.png" width="20" height="20" alt="tag"></picture> | `labels` | GitHub Labels related tools |
571570
| <picture><source media="(prefers-color-scheme: dark)" srcset="pkg/octicons/icons/bell-dark.png"><source media="(prefers-color-scheme: light)" srcset="pkg/octicons/icons/bell-light.png"><img src="pkg/octicons/icons/bell-light.png" width="20" height="20" alt="bell"></picture> | `notifications` | GitHub Notifications related tools |
572571
| <picture><source media="(prefers-color-scheme: dark)" srcset="pkg/octicons/icons/organization-dark.png"><source media="(prefers-color-scheme: light)" srcset="pkg/octicons/icons/organization-light.png"><img src="pkg/octicons/icons/organization-light.png" width="20" height="20" alt="organization"></picture> | `orgs` | GitHub Organization related tools |
573572
| <picture><source media="(prefers-color-scheme: dark)" srcset="pkg/octicons/icons/project-dark.png"><source media="(prefers-color-scheme: light)" srcset="pkg/octicons/icons/project-light.png"><img src="pkg/octicons/icons/project-light.png" width="20" height="20" alt="project"></picture> | `projects` | GitHub Projects related tools |
574573
| <picture><source media="(prefers-color-scheme: dark)" srcset="pkg/octicons/icons/git-pull-request-dark.png"><source media="(prefers-color-scheme: light)" srcset="pkg/octicons/icons/git-pull-request-light.png"><img src="pkg/octicons/icons/git-pull-request-light.png" width="20" height="20" alt="git-pull-request"></picture> | `pull_requests` | GitHub Pull Request related tools |
575-
| <picture><source media="(prefers-color-scheme: dark)" srcset="pkg/octicons/icons/git-pull-request-dark.png"><source media="(prefers-color-scheme: light)" srcset="pkg/octicons/icons/git-pull-request-light.png"><img src="pkg/octicons/icons/git-pull-request-light.png" width="20" height="20" alt="git-pull-request"></picture> | `pull_requests_granular` | Granular pull request tools with fine-grained control over individual operations |
576574
| <picture><source media="(prefers-color-scheme: dark)" srcset="pkg/octicons/icons/repo-dark.png"><source media="(prefers-color-scheme: light)" srcset="pkg/octicons/icons/repo-light.png"><img src="pkg/octicons/icons/repo-light.png" width="20" height="20" alt="repo"></picture> | `repos` | GitHub Repository related tools |
577575
| <picture><source media="(prefers-color-scheme: dark)" srcset="pkg/octicons/icons/shield-lock-dark.png"><source media="(prefers-color-scheme: light)" srcset="pkg/octicons/icons/shield-lock-light.png"><img src="pkg/octicons/icons/shield-lock-light.png" width="20" height="20" alt="shield-lock"></picture> | `secret_protection` | Secret protection related tools, such as GitHub Secret Scanning |
578576
| <picture><source media="(prefers-color-scheme: dark)" srcset="pkg/octicons/icons/shield-dark.png"><source media="(prefers-color-scheme: light)" srcset="pkg/octicons/icons/shield-light.png"><img src="pkg/octicons/icons/shield-light.png" width="20" height="20" alt="shield"></picture> | `security_advisories` | Security advisories related tools |
@@ -905,93 +903,6 @@ The following sets of tools are available:
905903

906904
<details>
907905

908-
<summary><picture><source media="(prefers-color-scheme: dark)" srcset="pkg/octicons/icons/issue-opened-dark.png"><source media="(prefers-color-scheme: light)" srcset="pkg/octicons/icons/issue-opened-light.png"><img src="pkg/octicons/icons/issue-opened-light.png" width="20" height="20" alt="issue-opened"></picture> Issues Granular</summary>
909-
910-
- **add_sub_issue** - Add Sub-Issue
911-
- **Required OAuth Scopes**: `repo`
912-
- `issue_number`: The parent issue number (number, required)
913-
- `owner`: Repository owner (username or organization) (string, required)
914-
- `replace_parent`: If true, reparent the sub-issue if it already has a parent (boolean, optional)
915-
- `repo`: Repository name (string, required)
916-
- `sub_issue_id`: The ID of the sub-issue to add. ID is not the same as issue number (number, required)
917-
918-
- **create_issue** - Create Issue
919-
- **Required OAuth Scopes**: `repo`
920-
- `body`: Issue body content (optional) (string, optional)
921-
- `owner`: Repository owner (username or organization) (string, required)
922-
- `repo`: Repository name (string, required)
923-
- `title`: Issue title (string, required)
924-
925-
- **remove_sub_issue** - Remove Sub-Issue
926-
- **Required OAuth Scopes**: `repo`
927-
- `issue_number`: The parent issue number (number, required)
928-
- `owner`: Repository owner (username or organization) (string, required)
929-
- `repo`: Repository name (string, required)
930-
- `sub_issue_id`: The ID of the sub-issue to remove. ID is not the same as issue number (number, required)
931-
932-
- **reprioritize_sub_issue** - Reprioritize Sub-Issue
933-
- **Required OAuth Scopes**: `repo`
934-
- `after_id`: The ID of the sub-issue to place this after (either after_id OR before_id should be specified) (number, optional)
935-
- `before_id`: The ID of the sub-issue to place this before (either after_id OR before_id should be specified) (number, optional)
936-
- `issue_number`: The parent issue number (number, required)
937-
- `owner`: Repository owner (username or organization) (string, required)
938-
- `repo`: Repository name (string, required)
939-
- `sub_issue_id`: The ID of the sub-issue to reorder. ID is not the same as issue number (number, required)
940-
941-
- **update_issue_assignees** - Update Issue Assignees
942-
- **Required OAuth Scopes**: `repo`
943-
- `assignees`: GitHub usernames to assign to this issue (string[], required)
944-
- `issue_number`: The issue number to update (number, required)
945-
- `owner`: Repository owner (username or organization) (string, required)
946-
- `repo`: Repository name (string, required)
947-
948-
- **update_issue_body** - Update Issue Body
949-
- **Required OAuth Scopes**: `repo`
950-
- `body`: The new body content for the issue (string, required)
951-
- `issue_number`: The issue number to update (number, required)
952-
- `owner`: Repository owner (username or organization) (string, required)
953-
- `repo`: Repository name (string, required)
954-
955-
- **update_issue_labels** - Update Issue Labels
956-
- **Required OAuth Scopes**: `repo`
957-
- `issue_number`: The issue number to update (number, required)
958-
- `labels`: Labels to apply to this issue (string[], required)
959-
- `owner`: Repository owner (username or organization) (string, required)
960-
- `repo`: Repository name (string, required)
961-
962-
- **update_issue_milestone** - Update Issue Milestone
963-
- **Required OAuth Scopes**: `repo`
964-
- `issue_number`: The issue number to update (number, required)
965-
- `milestone`: The milestone number to set on the issue (integer, required)
966-
- `owner`: Repository owner (username or organization) (string, required)
967-
- `repo`: Repository name (string, required)
968-
969-
- **update_issue_state** - Update Issue State
970-
- **Required OAuth Scopes**: `repo`
971-
- `issue_number`: The issue number to update (number, required)
972-
- `owner`: Repository owner (username or organization) (string, required)
973-
- `repo`: Repository name (string, required)
974-
- `state`: The new state for the issue (string, required)
975-
- `state_reason`: The reason for the state change (only for closed state) (string, optional)
976-
977-
- **update_issue_title** - Update Issue Title
978-
- **Required OAuth Scopes**: `repo`
979-
- `issue_number`: The issue number to update (number, required)
980-
- `owner`: Repository owner (username or organization) (string, required)
981-
- `repo`: Repository name (string, required)
982-
- `title`: The new title for the issue (string, required)
983-
984-
- **update_issue_type** - Update Issue Type
985-
- **Required OAuth Scopes**: `repo`
986-
- `issue_number`: The issue number to update (number, required)
987-
- `issue_type`: The issue type to set (string, required)
988-
- `owner`: Repository owner (username or organization) (string, required)
989-
- `repo`: Repository name (string, required)
990-
991-
</details>
992-
993-
<details>
994-
995906
<summary><picture><source media="(prefers-color-scheme: dark)" srcset="pkg/octicons/icons/tag-dark.png"><source media="(prefers-color-scheme: light)" srcset="pkg/octicons/icons/tag-light.png"><img src="pkg/octicons/icons/tag-light.png" width="20" height="20" alt="tag"></picture> Labels</summary>
996907

997908
- **get_label** - Get a specific label from a repository.
@@ -1244,83 +1155,6 @@ The following sets of tools are available:
12441155

12451156
<details>
12461157

1247-
<summary><picture><source media="(prefers-color-scheme: dark)" srcset="pkg/octicons/icons/git-pull-request-dark.png"><source media="(prefers-color-scheme: light)" srcset="pkg/octicons/icons/git-pull-request-light.png"><img src="pkg/octicons/icons/git-pull-request-light.png" width="20" height="20" alt="git-pull-request"></picture> Pull Requests Granular</summary>
1248-
1249-
- **add_pull_request_review_comment** - Add Pull Request Review Comment
1250-
- **Required OAuth Scopes**: `repo`
1251-
- `body`: The comment body (string, required)
1252-
- `line`: The line number in the diff to comment on (optional) (number, optional)
1253-
- `owner`: Repository owner (username or organization) (string, required)
1254-
- `path`: The relative path of the file to comment on (string, required)
1255-
- `pullNumber`: The pull request number (number, required)
1256-
- `repo`: Repository name (string, required)
1257-
- `side`: The side of the diff to comment on (optional) (string, optional)
1258-
- `startLine`: The start line of a multi-line comment (optional) (number, optional)
1259-
- `startSide`: The start side of a multi-line comment (optional) (string, optional)
1260-
- `subjectType`: The subject type of the comment (string, required)
1261-
1262-
- **create_pull_request_review** - Create Pull Request Review
1263-
- **Required OAuth Scopes**: `repo`
1264-
- `body`: The review body text (optional) (string, optional)
1265-
- `commitID`: The SHA of the commit to review (optional, defaults to latest) (string, optional)
1266-
- `event`: The review action to perform. If omitted, creates a pending review. (string, optional)
1267-
- `owner`: Repository owner (username or organization) (string, required)
1268-
- `pullNumber`: The pull request number (number, required)
1269-
- `repo`: Repository name (string, required)
1270-
1271-
- **delete_pending_pull_request_review** - Delete Pending Pull Request Review
1272-
- **Required OAuth Scopes**: `repo`
1273-
- `owner`: Repository owner (username or organization) (string, required)
1274-
- `pullNumber`: The pull request number (number, required)
1275-
- `repo`: Repository name (string, required)
1276-
1277-
- **request_pull_request_reviewers** - Request Pull Request Reviewers
1278-
- **Required OAuth Scopes**: `repo`
1279-
- `owner`: Repository owner (username or organization) (string, required)
1280-
- `pullNumber`: The pull request number (number, required)
1281-
- `repo`: Repository name (string, required)
1282-
- `reviewers`: GitHub usernames to request reviews from (string[], required)
1283-
1284-
- **submit_pending_pull_request_review** - Submit Pending Pull Request Review
1285-
- **Required OAuth Scopes**: `repo`
1286-
- `body`: The review body text (optional) (string, optional)
1287-
- `event`: The review action to perform (string, required)
1288-
- `owner`: Repository owner (username or organization) (string, required)
1289-
- `pullNumber`: The pull request number (number, required)
1290-
- `repo`: Repository name (string, required)
1291-
1292-
- **update_pull_request_body** - Update Pull Request Body
1293-
- **Required OAuth Scopes**: `repo`
1294-
- `body`: The new body content for the pull request (string, required)
1295-
- `owner`: Repository owner (username or organization) (string, required)
1296-
- `pullNumber`: The pull request number (number, required)
1297-
- `repo`: Repository name (string, required)
1298-
1299-
- **update_pull_request_draft_state** - Update Pull Request Draft State
1300-
- **Required OAuth Scopes**: `repo`
1301-
- `draft`: Set to true to convert to draft, false to mark as ready for review (boolean, required)
1302-
- `owner`: Repository owner (username or organization) (string, required)
1303-
- `pullNumber`: The pull request number (number, required)
1304-
- `repo`: Repository name (string, required)
1305-
1306-
- **update_pull_request_state** - Update Pull Request State
1307-
- **Required OAuth Scopes**: `repo`
1308-
- `owner`: Repository owner (username or organization) (string, required)
1309-
- `pullNumber`: The pull request number (number, required)
1310-
- `repo`: Repository name (string, required)
1311-
- `state`: The new state for the pull request (string, required)
1312-
1313-
- **update_pull_request_title** - Update Pull Request Title
1314-
- **Required OAuth Scopes**: `repo`
1315-
- `owner`: Repository owner (username or organization) (string, required)
1316-
- `pullNumber`: The pull request number (number, required)
1317-
- `repo`: Repository name (string, required)
1318-
- `title`: The new title for the pull request (string, required)
1319-
1320-
</details>
1321-
1322-
<details>
1323-
13241158
<summary><picture><source media="(prefers-color-scheme: dark)" srcset="pkg/octicons/icons/repo-dark.png"><source media="(prefers-color-scheme: light)" srcset="pkg/octicons/icons/repo-light.png"><img src="pkg/octicons/icons/repo-light.png" width="20" height="20" alt="repo"></picture> Repositories</summary>
13251159

13261160
- **create_branch** - Create branch

0 commit comments

Comments
 (0)