Skip to content

Commit e9fc8b7

Browse files
feat(governance): add typed label and governance outputs
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent b2944e8 commit e9fc8b7

22 files changed

Lines changed: 4004 additions & 416 deletions

‎README.md‎

Lines changed: 47 additions & 47 deletions
Large diffs are not rendered by default.

‎pkg/github/__toolsnaps__/create_repository_ruleset.snap‎

Lines changed: 620 additions & 83 deletions
Large diffs are not rendered by default.

‎pkg/github/__toolsnaps__/create_repository_ruleset_typed.snap‎

Lines changed: 686 additions & 0 deletions
Large diffs are not rendered by default.

‎pkg/github/__toolsnaps__/custom_properties_read.snap‎

Lines changed: 51 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,48 @@
66
},
77
"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.",
88
"inputSchema": {
9+
"additionalProperties": true,
910
"properties": {
1011
"enterprise": {
11-
"description": "Enterprise slug. Required when level is 'enterprise'.",
12-
"type": "string"
12+
"anyOf": [
13+
{
14+
"description": "Enterprise slug. Required when level is 'enterprise'.",
15+
"type": "string"
16+
},
17+
{
18+
"description": "Other JSON values are validated by the legacy handler."
19+
}
20+
],
21+
"description": "Enterprise slug. Required when level is 'enterprise'. Validated by the legacy handler to preserve its error behavior."
1322
},
1423
"level": {
15-
"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').",
16-
"enum": [
17-
"repository",
18-
"organization",
19-
"enterprise"
24+
"anyOf": [
25+
{
26+
"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').",
27+
"enum": [
28+
"repository",
29+
"organization",
30+
"enterprise"
31+
],
32+
"type": "string"
33+
},
34+
{
35+
"description": "Other JSON values are validated by the legacy handler."
36+
}
2037
],
21-
"type": "string"
38+
"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."
2239
},
2340
"org": {
24-
"description": "Organization name. Required when level is 'organization'.",
25-
"type": "string"
41+
"anyOf": [
42+
{
43+
"description": "Organization name. Required when level is 'organization'.",
44+
"type": "string"
45+
},
46+
{
47+
"description": "Other JSON values are validated by the legacy handler."
48+
}
49+
],
50+
"description": "Organization name. Required when level is 'organization'. Validated by the legacy handler to preserve its error behavior."
2651
},
2752
"owner": {
2853
"description": "Repository owner. Required when level is 'repository'.",
@@ -33,10 +58,22 @@
3358
"type": "string"
3459
}
3560
},
36-
"required": [
37-
"level"
38-
],
3961
"type": "object"
4062
},
41-
"name": "custom_properties_read"
63+
"name": "custom_properties_read",
64+
"outputSchema": {
65+
"anyOf": [
66+
{
67+
"items": {
68+
"additionalProperties": true,
69+
"description": "A custom property value or definition returned by the selected level.",
70+
"type": "object"
71+
},
72+
"type": "array"
73+
},
74+
{
75+
"type": "null"
76+
}
77+
]
78+
}
4279
}
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
{
2+
"annotations": {
3+
"idempotentHint": false,
4+
"readOnlyHint": true,
5+
"title": "Read custom properties"
6+
},
7+
"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.",
8+
"icons": [
9+
{
10+
"mimeType": "image/png",
11+
"src": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAA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14+
{
15+
"mimeType": "image/png",
16+
"src": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABmJLR0QA/wD/AP+gvaeTAAAB20lEQVRIieWVz4uNYRTHP8+9t9ya7qiZNUWpmQ0LkaLGRcOOQpaUWbBipxE3439gacNiyg4LG12xRoNSmqZJidkxKTPl+lg4V++89+eblXxX7znne77fc56etwf+K6i31VtFeioFPSYL8gcbqMeAXRFujdyViBdSSo+LmraFx9V5B2NeHR8kNqWud2leU2fVSvCaajO+K1Fb69K3rk5lDcbUhnonCO/Va+pEbpA/BpncpHo9egyNhjrWbZObQVpVN3epdxhEflT9Gr1z2VopQ6oCF4C3QA043/dcN2IGGI3ei6HVMcVMTHBQfaout8++3wZqWV2KWj00OodTF9TXalJPBPHkEAangns84lfqGzVlSUeCdDbikrqoPhvC4HlsUI74XGgdzpIeqSvZs1MvB3FvLwN1d3AuZXKb1E/qw3Zih9pSG7nJauoX9W4fg3vdbpx6Q/2pTlSAaX7fpv3qGWAZGAEOAC3gKL0xDfwAZtUXwDdgG1AHEnAItarOqZ/diJb6RN3XZ4M96gP1e653Ub2qVlOGXAZ2AluAVeBdSmklt3oTIKVUz+VHYvIa8DGl9KHP1r3R7RYNQmkw5e/Q8z1QTwPbc+n8e9DGUkrpfiHn+COHxctC4v8UfgH+YI1qigrwsQAAAABJRU5ErkJggg==",
17+
"theme": "dark"
18+
}
19+
],
20+
"inputSchema": {
21+
"additionalProperties": true,
22+
"properties": {
23+
"enterprise": {
24+
"anyOf": [
25+
{
26+
"description": "Enterprise slug. Required when level is 'enterprise'.",
27+
"type": "string"
28+
},
29+
{
30+
"description": "Other JSON values are validated by the legacy handler."
31+
}
32+
],
33+
"description": "Enterprise slug. Required when level is 'enterprise'. Validated by the legacy handler to preserve its error behavior."
34+
},
35+
"level": {
36+
"anyOf": [
37+
{
38+
"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').",
39+
"enum": [
40+
"repository",
41+
"organization",
42+
"enterprise"
43+
],
44+
"type": "string"
45+
},
46+
{
47+
"description": "Other JSON values are validated by the legacy handler."
48+
}
49+
],
50+
"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."
51+
},
52+
"org": {
53+
"anyOf": [
54+
{
55+
"description": "Organization name. Required when level is 'organization'.",
56+
"type": "string"
57+
},
58+
{
59+
"description": "Other JSON values are validated by the legacy handler."
60+
}
61+
],
62+
"description": "Organization name. Required when level is 'organization'. Validated by the legacy handler to preserve its error behavior."
63+
},
64+
"owner": {
65+
"description": "Repository owner. Required when level is 'repository'.",
66+
"type": "string",
67+
"x-mcp-header": "owner"
68+
},
69+
"repo": {
70+
"description": "Repository name. Required when level is 'repository'.",
71+
"type": "string",
72+
"x-mcp-header": "repo"
73+
}
74+
},
75+
"type": "object"
76+
},
77+
"name": "custom_properties_read",
78+
"outputSchema": {
79+
"anyOf": [
80+
{
81+
"items": {
82+
"additionalProperties": true,
83+
"description": "A custom property value or definition returned by the selected level.",
84+
"type": "object"
85+
},
86+
"type": "array"
87+
},
88+
{
89+
"type": "null"
90+
}
91+
]
92+
}
93+
}

0 commit comments

Comments
 (0)