You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pkg/github/__toolsnaps__/custom_properties_write.snap
+45-18Lines changed: 45 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@
4
4
"readOnlyHint": false,
5
5
"title": "Set custom properties"
6
6
},
7
-
"description": "Create or update custom properties at the repository, organization, or enterprise level. At the repository level this sets the property values on a repository (the properties must already be defined for the organization); at the organization and enterprise levels it creates or updates the property definitions (schema). Select the level with the 'level' parameter.",
7
+
"description": "Create or update custom properties at the repository, organization, or enterprise level. At the repository level this sets the property values on a repository (the properties must already be defined for the organization). Organization and enterprise definition writes preserve omitted writable fields by reading current definitions immediately before updating; concurrent definition updates remain last-write-wins. Select the level with the 'level' parameter.",
8
8
"inputSchema": {
9
9
"properties": {
10
10
"enterprise": {
@@ -69,14 +69,21 @@
69
69
"description": "An organization- or enterprise-level custom property definition.",
70
70
"properties": {
71
71
"allowed_values": {
72
-
"description": "The ordered list of allowed values for single_select and multi_select properties.",
73
-
"items": {
74
-
"type": "string"
75
-
},
76
-
"type": "array"
72
+
"anyOf": [
73
+
{
74
+
"items": {
75
+
"type": "string"
76
+
},
77
+
"type": "array"
78
+
},
79
+
{
80
+
"type": "null"
81
+
}
82
+
],
83
+
"description": "The ordered list of allowed values for single_select and multi_select properties. Omit when updating to preserve the current list; use null or an empty array to clear it."
77
84
},
78
85
"default_value": {
79
-
"description": "The value applied when a repository does not set the property. A string or an array of strings.",
86
+
"description": "The value applied when a repository does not set the property. Omit when updating to preserve the current value; use null to clear it.",
80
87
"oneOf": [
81
88
{
82
89
"type": "string"
@@ -86,23 +93,37 @@
86
93
"type": "string"
87
94
},
88
95
"type": "array"
96
+
},
97
+
{
98
+
"type": "null"
89
99
}
90
100
]
91
101
},
92
102
"description": {
93
-
"description": "A short description of the property.",
94
-
"type": "string"
103
+
"anyOf": [
104
+
{
105
+
"type": "string"
106
+
},
107
+
{
108
+
"type": "null"
109
+
}
110
+
],
111
+
"description": "A short description of the property. Omit when updating to preserve the current description; use null to clear it."
95
112
},
96
113
"property_name": {
97
114
"description": "The name of the custom property.",
98
115
"type": "string"
99
116
},
117
+
"require_explicit_values": {
118
+
"description": "Whether repositories must explicitly set a value for the property. Omit when updating to preserve the current setting.",
119
+
"type": "boolean"
120
+
},
100
121
"required": {
101
-
"description": "Whether the property must be set on every repository.",
122
+
"description": "Whether the property must be set on every repository. Omit when updating to preserve the current setting.",
102
123
"type": "boolean"
103
124
},
104
125
"value_type": {
105
-
"description": "The data type of the property.",
126
+
"description": "The data type of the property. Required for new definitions; omit when updating to preserve the current type.",
106
127
"enum": [
107
128
"string",
108
129
"single_select",
@@ -113,17 +134,23 @@
113
134
"type": "string"
114
135
},
115
136
"values_editable_by": {
116
-
"description": "Who can edit the values of the property.",
117
-
"enum": [
118
-
"org_actors",
119
-
"org_and_repo_actors"
137
+
"anyOf": [
138
+
{
139
+
"enum": [
140
+
"org_actors",
141
+
"org_and_repo_actors"
142
+
],
143
+
"type": "string"
144
+
},
145
+
{
146
+
"type": "null"
147
+
}
120
148
],
121
-
"type": "string"
149
+
"description": "Who can edit the values of the property. Omit when updating to preserve the current setting; use null to restore the default."
Description: t("TOOL_CUSTOM_PROPERTIES_WRITE_DESCRIPTION", "Create or update custom properties at the repository, organization, or enterprise level. At the repository level this sets the property values on a repository (the properties must already be defined for the organization); at the organization and enterprise levels it creates or updates the property definitions (schema). Select the level with the 'level' parameter."),
144
+
Description: t("TOOL_CUSTOM_PROPERTIES_WRITE_DESCRIPTION", "Create or update custom properties at the repository, organization, or enterprise level. At the repository level this sets the property values on a repository (the properties must already be defined for the organization). Organization and enterprise definition writes preserve omitted writable fields by reading current definitions immediately before updating; concurrent definition updates remain last-write-wins. Select the level with the 'level' parameter."),
Description: "The data type of the property. Required for new definitions; omit when updating to preserve the current type.",
325
305
},
326
306
"required": {
327
307
Type: "boolean",
328
-
Description: "Whether the property must be set on every repository.",
308
+
Description: "Whether the property must be set on every repository. Omit when updating to preserve the current setting.",
329
309
},
330
310
"default_value": {
331
-
Description: "The value applied when a repository does not set the property. A string or an array of strings.",
311
+
Description: "The value applied when a repository does not set the property. Omit when updating to preserve the current value; use null to clear it.",
332
312
OneOf: []*jsonschema.Schema{
333
313
{Type: "string"},
334
314
{
335
315
Type: "array",
336
316
Items: &jsonschema.Schema{Type: "string"},
337
317
},
318
+
{Type: "null"},
338
319
},
339
320
},
340
321
"description": {
341
-
Type: "string",
342
-
Description: "A short description of the property.",
322
+
Description: "A short description of the property. Omit when updating to preserve the current description; use null to clear it.",
323
+
AnyOf: []*jsonschema.Schema{
324
+
{Type: "string"},
325
+
{Type: "null"},
326
+
},
343
327
},
344
328
"allowed_values": {
345
-
Type: "array",
346
-
Description: "The ordered list of allowed values for single_select and multi_select properties.",
347
-
Items: &jsonschema.Schema{Type: "string"},
329
+
Description: "The ordered list of allowed values for single_select and multi_select properties. Omit when updating to preserve the current list; use null or an empty array to clear it.",
330
+
AnyOf: []*jsonschema.Schema{
331
+
{
332
+
Type: "array",
333
+
Items: &jsonschema.Schema{Type: "string"},
334
+
},
335
+
{Type: "null"},
336
+
},
348
337
},
349
338
"values_editable_by": {
350
-
Type: "string",
351
-
Enum: []any{"org_actors", "org_and_repo_actors"},
352
-
Description: "Who can edit the values of the property.",
339
+
Description: "Who can edit the values of the property. Omit when updating to preserve the current setting; use null to restore the default.",
340
+
AnyOf: []*jsonschema.Schema{
341
+
{
342
+
Type: "string",
343
+
Enum: []any{"org_actors", "org_and_repo_actors"},
344
+
},
345
+
{Type: "null"},
346
+
},
347
+
},
348
+
"require_explicit_values": {
349
+
Type: "boolean",
350
+
Description: "Whether repositories must explicitly set a value for the property. Omit when updating to preserve the current setting.",
returnnil, utils.NewToolResultError(fmt.Sprintf("property %q is inherited from %s and cannot be updated at the %s level", name, existingSource, sourceType))
0 commit comments