feat(governance): add custom properties tools - #2992
Open
SamMorrowDrums wants to merge 1 commit into
Open
Conversation
Add tools for reading and setting GitHub custom property values at the repository, organization, and enterprise levels within the governance toolset. Read and write are separate tools (ReadOnlyHint drives read-only-mode filtering) and split by level because each level requires a distinct OAuth scope for scope-challenge accuracy: - get_repository_custom_properties (repo) - create_or_update_repository_custom_properties (repo) - get_organization_custom_properties (read:org) - create_or_update_organization_custom_properties (admin:org) - get_enterprise_custom_properties (read:enterprise) - create_or_update_enterprise_custom_properties (admin:enterprise) Supersedes #821. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 1e886867-a922-419a-b02c-ac643716aea8
Contributor
There was a problem hiding this comment.
Pull request overview
Adds six custom-property tools to the governance toolset for repository values and organization/enterprise definitions.
Changes:
- Adds read and write handlers with level-specific scopes.
- Adds unit tests and tool-schema snapshots.
- Updates generated governance documentation.
Show a summary per file
| File | Description |
|---|---|
README.md |
Documents the new tools. |
pkg/github/tools.go |
Registers tools and updates metadata. |
pkg/github/custom_properties.go |
Implements custom-property tools and schemas. |
pkg/github/custom_properties_test.go |
Tests handlers and schemas. |
pkg/github/__toolsnaps__/get_repository_custom_properties.snap |
Snapshots repository read schema. |
pkg/github/__toolsnaps__/get_organization_custom_properties.snap |
Snapshots organization read schema. |
pkg/github/__toolsnaps__/get_enterprise_custom_properties.snap |
Snapshots enterprise read schema. |
pkg/github/__toolsnaps__/create_or_update_repository_custom_properties.snap |
Snapshots repository write schema. |
pkg/github/__toolsnaps__/create_or_update_organization_custom_properties.snap |
Snapshots organization write schema. |
pkg/github/__toolsnaps__/create_or_update_enterprise_custom_properties.snap |
Snapshots enterprise write schema. |
docs/remote-server.md |
Updates remote governance documentation. |
Review details
- Files reviewed: 11/11 changed files
- Comments generated: 2
- Review effort level: Balanced
Comment on lines
+341
to
+345
| "value": { | ||
| Description: "The value to assign. A string, an array of strings, or null to clear the value", | ||
| }, | ||
| }, | ||
| Required: []string{"property_name"}, |
Comment on lines
+368
to
+370
| "default_value": { | ||
| Description: "Default value of the property. A string or an array of strings", | ||
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Governance toolset — Custom Properties (PR 2 of 2)
Adds the second half of the
governancetoolset: GitHub custom properties (get/set) at the repository, organization, and enterprise levels.This supersedes the very stale #821 (re: #820), replayed onto the current codebase (modelcontextprotocol/go-sdk, go-github v87).
Tools (6)
get_repository_custom_propertiesrepoget_organization_custom_propertiesread:orgget_enterprise_custom_propertiesread:enterprisecreate_or_update_repository_custom_propertiesrepocreate_or_update_organization_custom_propertiesadmin:orgcreate_or_update_enterprise_custom_propertiesadmin:enterpriseDesign notes
ReadOnlyHintdrives read-only-mode filtering.Verified:
script/lint(0 issues),script/test,script/generate-docsall green.