Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
fix(governance): preserve contracts with concrete typed outputs
Retain advertised legacy input schemas and route-specific validation while using shared modern DTO serialization. Cover governance levels, label mutations, and empty/null custom property writes over the MCP wire.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
  • Loading branch information
SamMorrowDrums and Copilot authored Oct 6, 2026
commit 94531ba428950822374b670fba27acd834d3c431
94 changes: 47 additions & 47 deletions README.md

Large diffs are not rendered by default.

817 changes: 275 additions & 542 deletions pkg/github/__toolsnaps__/create_repository_ruleset.snap

Large diffs are not rendered by default.

686 changes: 0 additions & 686 deletions pkg/github/__toolsnaps__/create_repository_ruleset_typed.snap

This file was deleted.

170 changes: 128 additions & 42 deletions pkg/github/__toolsnaps__/custom_properties_read.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6,48 +6,23 @@
},
"description": "Read custom properties at the repository, organization, or enterprise level. At the repository level this returns the property values assigned to a repository; at the organization and enterprise levels it returns the property definitions (schema). Select the level with the 'level' parameter.",
"inputSchema": {
"additionalProperties": true,
"properties": {
"enterprise": {
"anyOf": [
{
"description": "Enterprise slug. Required when level is 'enterprise'.",
"type": "string"
},
{
"description": "Other JSON values are validated by the legacy handler."
}
],
"description": "Enterprise slug. Required when level is 'enterprise'. Validated by the legacy handler to preserve its error behavior."
"description": "Enterprise slug. Required when level is 'enterprise'.",
"type": "string"
},
"level": {
"anyOf": [
{
"description": "The level at which custom properties are managed:\n- 'repository': The custom property VALUES assigned to a repository (requires 'owner' and 'repo').\n- 'organization': The custom property DEFINITIONS (schema) for an organization (requires 'org').\n- 'enterprise': The custom property DEFINITIONS (schema) for an enterprise (requires 'enterprise').",
"enum": [
"repository",
"organization",
"enterprise"
],
"type": "string"
},
{
"description": "Other JSON values are validated by the legacy handler."
}
"description": "The level at which custom properties are managed:\n- 'repository': The custom property VALUES assigned to a repository (requires 'owner' and 'repo').\n- 'organization': The custom property DEFINITIONS (schema) for an organization (requires 'org').\n- 'enterprise': The custom property DEFINITIONS (schema) for an enterprise (requires 'enterprise').",
"enum": [
"repository",
"organization",
"enterprise"
],
"description": "The level at which custom properties are managed:\n- 'repository': The custom property VALUES assigned to a repository (requires 'owner' and 'repo').\n- 'organization': The custom property DEFINITIONS (schema) for an organization (requires 'org').\n- 'enterprise': The custom property DEFINITIONS (schema) for an enterprise (requires 'enterprise'). Required by the legacy handler. Validated by the legacy handler to preserve its error behavior."
"type": "string"
},
"org": {
"anyOf": [
{
"description": "Organization name. Required when level is 'organization'.",
"type": "string"
},
{
"description": "Other JSON values are validated by the legacy handler."
}
],
"description": "Organization name. Required when level is 'organization'. Validated by the legacy handler to preserve its error behavior."
"description": "Organization name. Required when level is 'organization'.",
"type": "string"
},
"owner": {
"description": "Repository owner. Required when level is 'repository'.",
Expand All @@ -58,22 +33,133 @@
"type": "string"
}
},
"required": [
"level"
],
"type": "object"
},
"name": "custom_properties_read",
"outputSchema": {
"anyOf": [
{
"additionalProperties": false,
"properties": {
"definitions": {
"items": {
"additionalProperties": true,
"description": "A custom property value or definition returned by the selected level.",
"additionalProperties": false,
"properties": {
"allowed_values": {
"items": {
"type": "string"
},
"type": "array"
},
"default_value": {
"description": "Repository level only: the value to assign. A string, an array of strings, or null to clear the value.",
"oneOf": [
{
"type": "string"
},
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
]
},
"description": {
"type": "string"
},
"property_name": {
"type": "string"
},
"require_explicit_values": {
"type": "boolean"
},
"required": {
"type": "boolean"
},
"value_type": {
"enum": [
"",
"string",
"single_select",
"multi_select",
"true_false",
"url"
],
"type": "string"
},
"values_editable_by": {
"enum": [
"org_actors",
"org_and_repo_actors"
],
"type": "string"
}
},
"required": [
"property_name",
"value_type"
],
"type": "object"
},
"type": "array"
},
{
"type": "null"
"level": {
"enum": [
"repository",
"organization",
"enterprise"
],
"type": "string"
},
"method": {
"enum": [
"read"
],
"type": "string"
},
"values": {
"items": {
"additionalProperties": false,
"properties": {
"property_name": {
"type": "string"
},
"value": {
"description": "Repository level only: the value to assign. A string, an array of strings, or null to clear the value.",
"oneOf": [
{
"type": "string"
},
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
]
}
},
"required": [
"property_name",
"value"
],
"type": "object"
},
"type": "array"
}
]
},
"required": [
"method",
"level"
],
"type": "object"
}
}
93 changes: 0 additions & 93 deletions pkg/github/__toolsnaps__/custom_properties_read_typed.snap

This file was deleted.

Loading
Loading