diff --git a/content/rest/orgs/custom-properties.md b/content/rest/orgs/custom-properties.md index a1d2408f0c..0296c6649d 100644 --- a/content/rest/orgs/custom-properties.md +++ b/content/rest/orgs/custom-properties.md @@ -1,10 +1,11 @@ --- title: REST API endpoints for custom properties shortTitle: Custom properties -intro: 'Use the REST API to create and manage custom properties for an organization.' +intro: Use the REST API to create and manage custom properties for an organization. versions: # DO NOT MANUALLY EDIT. CHANGES WILL BE OVERWRITTEN BY A 🤖 fpt: '*' ghec: '*' + ghes: '>=3.13' topics: - API autogenerated: rest diff --git a/content/rest/repos/custom-properties.md b/content/rest/repos/custom-properties.md index b26bea48d3..2439d12c89 100644 --- a/content/rest/repos/custom-properties.md +++ b/content/rest/repos/custom-properties.md @@ -1,10 +1,13 @@ --- title: REST API endpoints for custom properties shortTitle: Custom properties -intro: 'Use the REST API to list the custom properties assigned to a repository by the organization.' +intro: >- + Use the REST API to list the custom properties assigned to a repository by the + organization. versions: # DO NOT MANUALLY EDIT. CHANGES WILL BE OVERWRITTEN BY A 🤖 fpt: '*' ghec: '*' + ghes: '>=3.13' topics: - API autogenerated: rest diff --git a/src/github-apps/data/ghes-3.13-2022-11-28/fine-grained-pat-permissions.json b/src/github-apps/data/ghes-3.13-2022-11-28/fine-grained-pat-permissions.json index 11174c1506..1c2e1ef7ce 100644 --- a/src/github-apps/data/ghes-3.13-2022-11-28/fine-grained-pat-permissions.json +++ b/src/github-apps/data/ghes-3.13-2022-11-28/fine-grained-pat-permissions.json @@ -521,6 +521,75 @@ } ] }, + "organization_custom_properties": { + "title": "Custom properties", + "displayTitle": "Organization permissions for \"Custom properties\"", + "permissions": [ + { + "category": "orgs", + "slug": "get-all-custom-properties-for-an-organization", + "subcategory": "custom-properties", + "verb": "get", + "requestPath": "/orgs/{org}/properties/schema", + "additional-permissions": false, + "access": "read" + }, + { + "category": "orgs", + "slug": "create-or-update-custom-properties-for-an-organization", + "subcategory": "custom-properties", + "verb": "patch", + "requestPath": "/orgs/{org}/properties/schema", + "additional-permissions": false, + "access": "admin" + }, + { + "category": "orgs", + "slug": "get-a-custom-property-for-an-organization", + "subcategory": "custom-properties", + "verb": "get", + "requestPath": "/orgs/{org}/properties/schema/{custom_property_name}", + "additional-permissions": false, + "access": "read" + }, + { + "category": "orgs", + "slug": "create-or-update-a-custom-property-for-an-organization", + "subcategory": "custom-properties", + "verb": "put", + "requestPath": "/orgs/{org}/properties/schema/{custom_property_name}", + "additional-permissions": false, + "access": "admin" + }, + { + "category": "orgs", + "slug": "remove-a-custom-property-for-an-organization", + "subcategory": "custom-properties", + "verb": "delete", + "requestPath": "/orgs/{org}/properties/schema/{custom_property_name}", + "additional-permissions": false, + "access": "admin" + }, + { + "category": "orgs", + "slug": "list-custom-property-values-for-organization-repositories", + "subcategory": "custom-properties", + "verb": "get", + "requestPath": "/orgs/{org}/properties/values", + "additional-permissions": false, + "access": "read" + }, + { + "category": "orgs", + "slug": "create-or-update-custom-property-values-for-organization-repositories", + "subcategory": "custom-properties", + "verb": "patch", + "requestPath": "/orgs/{org}/properties/values", + "additional-permissions": false, + "access": "write" + } + ] + }, "organization_custom_roles": { "title": "Custom repository roles", "displayTitle": "Organization permissions for \"Custom repository roles\"", @@ -3980,6 +4049,21 @@ } ] }, + "repository_custom_properties": { + "title": "Custom properties", + "displayTitle": "Repository permissions for \"Custom properties\"", + "permissions": [ + { + "category": "repos", + "slug": "create-or-update-custom-property-values-for-a-repository", + "subcategory": "custom-properties", + "verb": "patch", + "requestPath": "/repos/{owner}/{repo}/properties/values", + "additional-permissions": false, + "access": "write" + } + ] + }, "vulnerability_alerts": { "title": "Dependabot alerts", "displayTitle": "Repository permissions for \"Dependabot alerts\"", @@ -4869,6 +4953,15 @@ "additional-permissions": false, "access": "read" }, + { + "category": "repos", + "slug": "get-all-custom-property-values-for-a-repository", + "subcategory": "custom-properties", + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/properties/values", + "additional-permissions": false, + "access": "read" + }, { "category": "repos", "slug": "get-rules-for-a-branch", diff --git a/src/github-apps/data/ghes-3.13-2022-11-28/fine-grained-pat.json b/src/github-apps/data/ghes-3.13-2022-11-28/fine-grained-pat.json index 2e59486731..5a2700fe97 100644 --- a/src/github-apps/data/ghes-3.13-2022-11-28/fine-grained-pat.json +++ b/src/github-apps/data/ghes-3.13-2022-11-28/fine-grained-pat.json @@ -2846,6 +2846,48 @@ "verb": "get", "requestPath": "/orgs/{org}/personal-access-tokens/{pat_id}/repositories" }, + { + "slug": "get-all-custom-properties-for-an-organization", + "subcategory": "custom-properties", + "verb": "get", + "requestPath": "/orgs/{org}/properties/schema" + }, + { + "slug": "create-or-update-custom-properties-for-an-organization", + "subcategory": "custom-properties", + "verb": "patch", + "requestPath": "/orgs/{org}/properties/schema" + }, + { + "slug": "get-a-custom-property-for-an-organization", + "subcategory": "custom-properties", + "verb": "get", + "requestPath": "/orgs/{org}/properties/schema/{custom_property_name}" + }, + { + "slug": "create-or-update-a-custom-property-for-an-organization", + "subcategory": "custom-properties", + "verb": "put", + "requestPath": "/orgs/{org}/properties/schema/{custom_property_name}" + }, + { + "slug": "remove-a-custom-property-for-an-organization", + "subcategory": "custom-properties", + "verb": "delete", + "requestPath": "/orgs/{org}/properties/schema/{custom_property_name}" + }, + { + "slug": "list-custom-property-values-for-organization-repositories", + "subcategory": "custom-properties", + "verb": "get", + "requestPath": "/orgs/{org}/properties/values" + }, + { + "slug": "create-or-update-custom-property-values-for-organization-repositories", + "subcategory": "custom-properties", + "verb": "patch", + "requestPath": "/orgs/{org}/properties/values" + }, { "slug": "list-public-organization-members", "subcategory": "members", @@ -3834,6 +3876,18 @@ "verb": "get", "requestPath": "/repos/{owner}/{repo}/languages" }, + { + "slug": "get-all-custom-property-values-for-a-repository", + "subcategory": "custom-properties", + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/properties/values" + }, + { + "slug": "create-or-update-custom-property-values-for-a-repository", + "subcategory": "custom-properties", + "verb": "patch", + "requestPath": "/repos/{owner}/{repo}/properties/values" + }, { "slug": "list-repository-cache-replication-status", "subcategory": "repos", diff --git a/src/github-apps/data/ghes-3.13-2022-11-28/server-to-server-permissions.json b/src/github-apps/data/ghes-3.13-2022-11-28/server-to-server-permissions.json index 01ebd7b760..10c140f925 100644 --- a/src/github-apps/data/ghes-3.13-2022-11-28/server-to-server-permissions.json +++ b/src/github-apps/data/ghes-3.13-2022-11-28/server-to-server-permissions.json @@ -633,6 +633,89 @@ } ] }, + "organization_custom_properties": { + "title": "Custom properties", + "displayTitle": "Organization permissions for \"Custom properties\"", + "permissions": [ + { + "category": "orgs", + "slug": "get-all-custom-properties-for-an-organization", + "subcategory": "custom-properties", + "verb": "get", + "requestPath": "/orgs/{org}/properties/schema", + "access": "read", + "user-to-server": true, + "server-to-server": true, + "additional-permissions": false + }, + { + "category": "orgs", + "slug": "create-or-update-custom-properties-for-an-organization", + "subcategory": "custom-properties", + "verb": "patch", + "requestPath": "/orgs/{org}/properties/schema", + "access": "admin", + "user-to-server": true, + "server-to-server": true, + "additional-permissions": false + }, + { + "category": "orgs", + "slug": "get-a-custom-property-for-an-organization", + "subcategory": "custom-properties", + "verb": "get", + "requestPath": "/orgs/{org}/properties/schema/{custom_property_name}", + "access": "read", + "user-to-server": true, + "server-to-server": true, + "additional-permissions": false + }, + { + "category": "orgs", + "slug": "create-or-update-a-custom-property-for-an-organization", + "subcategory": "custom-properties", + "verb": "put", + "requestPath": "/orgs/{org}/properties/schema/{custom_property_name}", + "access": "admin", + "user-to-server": true, + "server-to-server": true, + "additional-permissions": false + }, + { + "category": "orgs", + "slug": "remove-a-custom-property-for-an-organization", + "subcategory": "custom-properties", + "verb": "delete", + "requestPath": "/orgs/{org}/properties/schema/{custom_property_name}", + "access": "admin", + "user-to-server": true, + "server-to-server": true, + "additional-permissions": false + }, + { + "category": "orgs", + "slug": "list-custom-property-values-for-organization-repositories", + "subcategory": "custom-properties", + "verb": "get", + "requestPath": "/orgs/{org}/properties/values", + "access": "read", + "user-to-server": true, + "server-to-server": true, + "additional-permissions": false + }, + { + "category": "orgs", + "slug": "create-or-update-custom-property-values-for-organization-repositories", + "subcategory": "custom-properties", + "verb": "patch", + "requestPath": "/orgs/{org}/properties/values", + "access": "write", + "user-to-server": true, + "server-to-server": true, + "additional-permissions": false + } + ] + }, "organization_custom_roles": { "title": "Custom repository roles", "displayTitle": "Organization permissions for \"Custom repository roles\"", @@ -4834,6 +4917,23 @@ } ] }, + "repository_custom_properties": { + "title": "Custom properties", + "displayTitle": "Repository permissions for \"Custom properties\"", + "permissions": [ + { + "category": "repos", + "slug": "create-or-update-custom-property-values-for-a-repository", + "subcategory": "custom-properties", + "verb": "patch", + "requestPath": "/repos/{owner}/{repo}/properties/values", + "access": "write", + "user-to-server": true, + "server-to-server": true, + "additional-permissions": false + } + ] + }, "vulnerability_alerts": { "title": "Dependabot alerts", "displayTitle": "Repository permissions for \"Dependabot alerts\"", @@ -5924,6 +6024,17 @@ "server-to-server": true, "additional-permissions": false }, + { + "category": "repos", + "slug": "get-all-custom-property-values-for-a-repository", + "subcategory": "custom-properties", + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/properties/values", + "access": "read", + "user-to-server": true, + "server-to-server": true, + "additional-permissions": false + }, { "category": "repos", "slug": "get-rules-for-a-branch", diff --git a/src/github-apps/data/ghes-3.13-2022-11-28/server-to-server-rest.json b/src/github-apps/data/ghes-3.13-2022-11-28/server-to-server-rest.json index 7b017505ba..397e5b89b2 100644 --- a/src/github-apps/data/ghes-3.13-2022-11-28/server-to-server-rest.json +++ b/src/github-apps/data/ghes-3.13-2022-11-28/server-to-server-rest.json @@ -2652,6 +2652,48 @@ "verb": "get", "requestPath": "/orgs/{org}/personal-access-tokens/{pat_id}/repositories" }, + { + "slug": "get-all-custom-properties-for-an-organization", + "subcategory": "custom-properties", + "verb": "get", + "requestPath": "/orgs/{org}/properties/schema" + }, + { + "slug": "create-or-update-custom-properties-for-an-organization", + "subcategory": "custom-properties", + "verb": "patch", + "requestPath": "/orgs/{org}/properties/schema" + }, + { + "slug": "get-a-custom-property-for-an-organization", + "subcategory": "custom-properties", + "verb": "get", + "requestPath": "/orgs/{org}/properties/schema/{custom_property_name}" + }, + { + "slug": "create-or-update-a-custom-property-for-an-organization", + "subcategory": "custom-properties", + "verb": "put", + "requestPath": "/orgs/{org}/properties/schema/{custom_property_name}" + }, + { + "slug": "remove-a-custom-property-for-an-organization", + "subcategory": "custom-properties", + "verb": "delete", + "requestPath": "/orgs/{org}/properties/schema/{custom_property_name}" + }, + { + "slug": "list-custom-property-values-for-organization-repositories", + "subcategory": "custom-properties", + "verb": "get", + "requestPath": "/orgs/{org}/properties/values" + }, + { + "slug": "create-or-update-custom-property-values-for-organization-repositories", + "subcategory": "custom-properties", + "verb": "patch", + "requestPath": "/orgs/{org}/properties/values" + }, { "slug": "list-public-organization-members", "subcategory": "members", @@ -3652,6 +3694,18 @@ "verb": "get", "requestPath": "/repos/{owner}/{repo}/languages" }, + { + "slug": "get-all-custom-property-values-for-a-repository", + "subcategory": "custom-properties", + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/properties/values" + }, + { + "slug": "create-or-update-custom-property-values-for-a-repository", + "subcategory": "custom-properties", + "verb": "patch", + "requestPath": "/repos/{owner}/{repo}/properties/values" + }, { "slug": "list-repository-cache-replication-status", "subcategory": "repos", diff --git a/src/github-apps/data/ghes-3.13-2022-11-28/user-to-server-rest.json b/src/github-apps/data/ghes-3.13-2022-11-28/user-to-server-rest.json index 2e59486731..5a2700fe97 100644 --- a/src/github-apps/data/ghes-3.13-2022-11-28/user-to-server-rest.json +++ b/src/github-apps/data/ghes-3.13-2022-11-28/user-to-server-rest.json @@ -2846,6 +2846,48 @@ "verb": "get", "requestPath": "/orgs/{org}/personal-access-tokens/{pat_id}/repositories" }, + { + "slug": "get-all-custom-properties-for-an-organization", + "subcategory": "custom-properties", + "verb": "get", + "requestPath": "/orgs/{org}/properties/schema" + }, + { + "slug": "create-or-update-custom-properties-for-an-organization", + "subcategory": "custom-properties", + "verb": "patch", + "requestPath": "/orgs/{org}/properties/schema" + }, + { + "slug": "get-a-custom-property-for-an-organization", + "subcategory": "custom-properties", + "verb": "get", + "requestPath": "/orgs/{org}/properties/schema/{custom_property_name}" + }, + { + "slug": "create-or-update-a-custom-property-for-an-organization", + "subcategory": "custom-properties", + "verb": "put", + "requestPath": "/orgs/{org}/properties/schema/{custom_property_name}" + }, + { + "slug": "remove-a-custom-property-for-an-organization", + "subcategory": "custom-properties", + "verb": "delete", + "requestPath": "/orgs/{org}/properties/schema/{custom_property_name}" + }, + { + "slug": "list-custom-property-values-for-organization-repositories", + "subcategory": "custom-properties", + "verb": "get", + "requestPath": "/orgs/{org}/properties/values" + }, + { + "slug": "create-or-update-custom-property-values-for-organization-repositories", + "subcategory": "custom-properties", + "verb": "patch", + "requestPath": "/orgs/{org}/properties/values" + }, { "slug": "list-public-organization-members", "subcategory": "members", @@ -3834,6 +3876,18 @@ "verb": "get", "requestPath": "/repos/{owner}/{repo}/languages" }, + { + "slug": "get-all-custom-property-values-for-a-repository", + "subcategory": "custom-properties", + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/properties/values" + }, + { + "slug": "create-or-update-custom-property-values-for-a-repository", + "subcategory": "custom-properties", + "verb": "patch", + "requestPath": "/repos/{owner}/{repo}/properties/values" + }, { "slug": "list-repository-cache-replication-status", "subcategory": "repos", diff --git a/src/github-apps/lib/config.json b/src/github-apps/lib/config.json index e9d20d17d5..e5e42bf6ee 100644 --- a/src/github-apps/lib/config.json +++ b/src/github-apps/lib/config.json @@ -60,5 +60,5 @@ "2022-11-28" ] }, - "sha": "3a05345b2bd1336f25d515165c55ad48c7989954" + "sha": "2fdcd66a4be62538cba65172ea380869fb44202e" } \ No newline at end of file diff --git a/src/rest/data/fpt-2022-11-28/schema.json b/src/rest/data/fpt-2022-11-28/schema.json index cf261583ff..3ed44f6145 100644 --- a/src/rest/data/fpt-2022-11-28/schema.json +++ b/src/rest/data/fpt-2022-11-28/schema.json @@ -99689,7 +99689,7 @@ }, { "name": "protected", - "description": "
Setting to true returns only protected branches. When set to false, only unprotected branches are returned. Omitting this parameter returns all branches.
Setting to true returns only branches protected by branch protections or rulesets. When set to false, only unprotected branches are returned. Omitting this parameter returns all branches.
Setting to true returns only protected branches. When set to false, only unprotected branches are returned. Omitting this parameter returns all branches.
Setting to true returns only branches protected by branch protections or rulesets. When set to false, only unprotected branches are returned. Omitting this parameter returns all branches.
Setting to true returns only protected branches. When set to false, only unprotected branches are returned. Omitting this parameter returns all branches.
Setting to true returns only branches protected by branch protections or rulesets. When set to false, only unprotected branches are returned. Omitting this parameter returns all branches.
Setting to true returns only protected branches. When set to false, only unprotected branches are returned. Omitting this parameter returns all branches.
Setting to true returns only branches protected by branch protections or rulesets. When set to false, only unprotected branches are returned. Omitting this parameter returns all branches.
Setting to true returns only protected branches. When set to false, only unprotected branches are returned. Omitting this parameter returns all branches.
Setting to true returns only branches protected by branch protections or rulesets. When set to false, only unprotected branches are returned. Omitting this parameter returns all branches.
The organization name. The name is not case sensitive.
", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "bodyParameters": [], + "progAccess": { + "userToServerRest": true, + "serverToServer": true, + "fineGrainedPat": true, + "permissions": [ + { + "organization_custom_properties": "read" + } + ] + }, + "codeExamples": [ + { + "key": "default", + "request": { + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "parameters": { + "org": "ORG" + } + }, + "response": { + "statusCode": "200", + "contentType": "application/json", + "description": "Response
", + "example": [ + { + "property_name": "environment", + "value_type": "single_select", + "required": true, + "default_value": "production", + "description": "Prod or dev environment", + "allowed_values": [ + "production", + "development" + ], + "values_editable_by": "org_actors" + }, + { + "property_name": "service", + "value_type": "string" + }, + { + "property_name": "team", + "value_type": "string", + "description": "Team owning the repository" + } + ], + "schema": { + "type": "array", + "items": { + "title": "Organization Custom Property", + "description": "Custom property defined on an organization", + "type": "object", + "properties": { + "property_name": { + "type": "string", + "description": "The name of the property" + }, + "value_type": { + "type": "string", + "enum": [ + "string", + "single_select" + ], + "description": "The type of the value for the property", + "examples": [ + "single_select" + ] + }, + "required": { + "type": "boolean", + "description": "Whether the property is required." + }, + "default_value": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "description": "Default value of the property", + "type": [ + "null", + "string", + "array" + ] + }, + "description": { + "type": [ + "string", + "null" + ], + "description": "Short description of the property" + }, + "allowed_values": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string", + "maxLength": 75 + }, + "maxItems": 200, + "description": "An ordered list of the allowed values of the property.\nThe property can have up to 200 allowed values." + }, + "values_editable_by": { + "type": [ + "string", + "null" + ], + "enum": [ + "org_actors", + "org_and_repo_actors", + null + ], + "description": "Who can edit the values of the property", + "examples": [ + "org_actors" + ] + } + }, + "required": [ + "property_name", + "value_type" + ] + } + } + } + } + ], + "previews": [], + "descriptionHTML": "Gets all custom properties defined for an organization.\nOrganization members can read these properties.
", + "statusCodes": [ + { + "httpStatusCode": "200", + "description": "OK
" + }, + { + "httpStatusCode": "403", + "description": "Forbidden
" + }, + { + "httpStatusCode": "404", + "description": "Resource not found
" + } + ] + }, + { + "serverUrl": "http(s)://HOSTNAME/api/v3", + "verb": "patch", + "requestPath": "/orgs/{org}/properties/schema", + "title": "Create or update custom properties for an organization", + "category": "orgs", + "subcategory": "custom-properties", + "parameters": [ + { + "name": "org", + "description": "The organization name. The name is not case sensitive.
", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "bodyParameters": [ + { + "type": "array of objects", + "name": "properties", + "in": "body", + "description": "The array of custom properties to create or update.
", + "isRequired": true, + "childParamsGroups": [ + { + "type": "string", + "name": "property_name", + "description": "The name of the property
", + "isRequired": true + }, + { + "type": "string", + "name": "value_type", + "description": "The type of the value for the property
", + "isRequired": true, + "enum": [ + "string", + "single_select" + ] + }, + { + "type": "boolean", + "name": "required", + "description": "Whether the property is required.
" + }, + { + "type": "null or string or array", + "name": "default_value", + "description": "Default value of the property
" + }, + { + "type": "string or null", + "name": "description", + "description": "Short description of the property
" + }, + { + "type": "array of strings or null", + "name": "allowed_values", + "description": "An ordered list of the allowed values of the property.\nThe property can have up to 200 allowed values.
" + }, + { + "type": "string or null", + "name": "values_editable_by", + "description": "Who can edit the values of the property
", + "enum": [ + "org_actors", + "org_and_repo_actors", + null + ] + } + ] + } + ], + "progAccess": { + "userToServerRest": true, + "serverToServer": true, + "fineGrainedPat": true, + "permissions": [ + { + "organization_custom_properties": "admin" + } + ] + }, + "codeExamples": [ + { + "key": "default", + "request": { + "contentType": "application/json", + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "properties": [ + { + "property_name": "environment", + "value_type": "single_select", + "required": true, + "default_value": "production", + "description": "Prod or dev environment", + "allowed_values": [ + "production", + "development" + ], + "values_editable_by": "org_actors" + }, + { + "property_name": "service", + "value_type": "string" + }, + { + "property_name": "team", + "value_type": "string", + "description": "Team owning the repository" + } + ] + }, + "parameters": { + "org": "ORG" + } + }, + "response": { + "statusCode": "200", + "contentType": "application/json", + "description": "Response
", + "example": [ + { + "property_name": "environment", + "value_type": "single_select", + "required": true, + "default_value": "production", + "description": "Prod or dev environment", + "allowed_values": [ + "production", + "development" + ], + "values_editable_by": "org_actors" + }, + { + "property_name": "service", + "value_type": "string" + }, + { + "property_name": "team", + "value_type": "string", + "description": "Team owning the repository" + } + ], + "schema": { + "type": "array", + "items": { + "title": "Organization Custom Property", + "description": "Custom property defined on an organization", + "type": "object", + "properties": { + "property_name": { + "type": "string", + "description": "The name of the property" + }, + "value_type": { + "type": "string", + "enum": [ + "string", + "single_select" + ], + "description": "The type of the value for the property", + "examples": [ + "single_select" + ] + }, + "required": { + "type": "boolean", + "description": "Whether the property is required." + }, + "default_value": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "description": "Default value of the property", + "type": [ + "null", + "string", + "array" + ] + }, + "description": { + "type": [ + "string", + "null" + ], + "description": "Short description of the property" + }, + "allowed_values": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string", + "maxLength": 75 + }, + "maxItems": 200, + "description": "An ordered list of the allowed values of the property.\nThe property can have up to 200 allowed values." + }, + "values_editable_by": { + "type": [ + "string", + "null" + ], + "enum": [ + "org_actors", + "org_and_repo_actors", + null + ], + "description": "Who can edit the values of the property", + "examples": [ + "org_actors" + ] + } + }, + "required": [ + "property_name", + "value_type" + ] + } + } + } + } + ], + "previews": [], + "descriptionHTML": "Creates new or updates existing custom properties defined for an organization in a batch.
\nTo use this endpoint, the authenticated user must be one of:
\ncustom_properties_org_definitions_manager in the organization.OK
" + }, + { + "httpStatusCode": "403", + "description": "Forbidden
" + }, + { + "httpStatusCode": "404", + "description": "Resource not found
" + } + ] + }, + { + "serverUrl": "http(s)://HOSTNAME/api/v3", + "verb": "get", + "requestPath": "/orgs/{org}/properties/schema/{custom_property_name}", + "title": "Get a custom property for an organization", + "category": "orgs", + "subcategory": "custom-properties", + "parameters": [ + { + "name": "org", + "description": "The organization name. The name is not case sensitive.
", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "custom_property_name", + "description": "The custom property name. The name is case sensitive.
", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "bodyParameters": [], + "progAccess": { + "userToServerRest": true, + "serverToServer": true, + "fineGrainedPat": true, + "permissions": [ + { + "organization_custom_properties": "read" + } + ] + }, + "codeExamples": [ + { + "key": "default", + "request": { + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "parameters": { + "org": "ORG", + "custom_property_name": "CUSTOM_PROPERTY_NAME" + } + }, + "response": { + "statusCode": "200", + "contentType": "application/json", + "description": "Response
", + "example": { + "property_name": "environment", + "value_type": "single_select", + "required": true, + "default_value": "production", + "description": "Prod or dev environment", + "allowed_values": [ + "production", + "development" + ] + }, + "schema": { + "title": "Organization Custom Property", + "description": "Custom property defined on an organization", + "type": "object", + "properties": { + "property_name": { + "type": "string", + "description": "The name of the property" + }, + "value_type": { + "type": "string", + "enum": [ + "string", + "single_select" + ], + "description": "The type of the value for the property", + "examples": [ + "single_select" + ] + }, + "required": { + "type": "boolean", + "description": "Whether the property is required." + }, + "default_value": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "description": "Default value of the property", + "type": [ + "null", + "string", + "array" + ] + }, + "description": { + "type": [ + "string", + "null" + ], + "description": "Short description of the property" + }, + "allowed_values": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string", + "maxLength": 75 + }, + "maxItems": 200, + "description": "An ordered list of the allowed values of the property.\nThe property can have up to 200 allowed values." + }, + "values_editable_by": { + "type": [ + "string", + "null" + ], + "enum": [ + "org_actors", + "org_and_repo_actors", + null + ], + "description": "Who can edit the values of the property", + "examples": [ + "org_actors" + ] + } + }, + "required": [ + "property_name", + "value_type" + ] + } + } + } + ], + "previews": [], + "descriptionHTML": "Gets a custom property that is defined for an organization.\nOrganization members can read these properties.
", + "statusCodes": [ + { + "httpStatusCode": "200", + "description": "OK
" + }, + { + "httpStatusCode": "403", + "description": "Forbidden
" + }, + { + "httpStatusCode": "404", + "description": "Resource not found
" + } + ] + }, + { + "serverUrl": "http(s)://HOSTNAME/api/v3", + "verb": "put", + "requestPath": "/orgs/{org}/properties/schema/{custom_property_name}", + "title": "Create or update a custom property for an organization", + "category": "orgs", + "subcategory": "custom-properties", + "parameters": [ + { + "name": "org", + "description": "The organization name. The name is not case sensitive.
", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "custom_property_name", + "description": "The custom property name. The name is case sensitive.
", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "bodyParameters": [ + { + "type": "string", + "name": "value_type", + "in": "body", + "description": "The type of the value for the property
", + "isRequired": true, + "enum": [ + "string", + "single_select" + ] + }, + { + "type": "boolean", + "name": "required", + "in": "body", + "description": "Whether the property is required.
" + }, + { + "type": "null or string or array", + "name": "default_value", + "in": "body", + "description": "Default value of the property
" + }, + { + "type": "string or null", + "name": "description", + "in": "body", + "description": "Short description of the property
" + }, + { + "type": "array of strings or null", + "name": "allowed_values", + "in": "body", + "description": "An ordered list of the allowed values of the property.\nThe property can have up to 200 allowed values.
" + } + ], + "progAccess": { + "userToServerRest": true, + "serverToServer": true, + "fineGrainedPat": true, + "permissions": [ + { + "organization_custom_properties": "admin" + } + ] + }, + "codeExamples": [ + { + "key": "default", + "request": { + "contentType": "application/json", + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "value_type": "single_select", + "required": true, + "default_value": "production", + "description": "Prod or dev environment", + "allowed_values": [ + "production", + "development" + ] + }, + "parameters": { + "org": "ORG", + "custom_property_name": "CUSTOM_PROPERTY_NAME" + } + }, + "response": { + "statusCode": "200", + "contentType": "application/json", + "description": "Response
", + "example": { + "property_name": "environment", + "value_type": "single_select", + "required": true, + "default_value": "production", + "description": "Prod or dev environment", + "allowed_values": [ + "production", + "development" + ] + }, + "schema": { + "title": "Organization Custom Property", + "description": "Custom property defined on an organization", + "type": "object", + "properties": { + "property_name": { + "type": "string", + "description": "The name of the property" + }, + "value_type": { + "type": "string", + "enum": [ + "string", + "single_select" + ], + "description": "The type of the value for the property", + "examples": [ + "single_select" + ] + }, + "required": { + "type": "boolean", + "description": "Whether the property is required." + }, + "default_value": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "description": "Default value of the property", + "type": [ + "null", + "string", + "array" + ] + }, + "description": { + "type": [ + "string", + "null" + ], + "description": "Short description of the property" + }, + "allowed_values": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string", + "maxLength": 75 + }, + "maxItems": 200, + "description": "An ordered list of the allowed values of the property.\nThe property can have up to 200 allowed values." + }, + "values_editable_by": { + "type": [ + "string", + "null" + ], + "enum": [ + "org_actors", + "org_and_repo_actors", + null + ], + "description": "Who can edit the values of the property", + "examples": [ + "org_actors" + ] + } + }, + "required": [ + "property_name", + "value_type" + ] + } + } + } + ], + "previews": [], + "descriptionHTML": "Creates a new or updates an existing custom property that is defined for an organization.
\nTo use this endpoint, the authenticated user must be one of:
\ncustom_properties_org_definitions_manager in the organization.OK
" + }, + { + "httpStatusCode": "403", + "description": "Forbidden
" + }, + { + "httpStatusCode": "404", + "description": "Resource not found
" + } + ] + }, + { + "serverUrl": "http(s)://HOSTNAME/api/v3", + "verb": "delete", + "requestPath": "/orgs/{org}/properties/schema/{custom_property_name}", + "title": "Remove a custom property for an organization", + "category": "orgs", + "subcategory": "custom-properties", + "parameters": [ + { + "name": "org", + "description": "The organization name. The name is not case sensitive.
", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "custom_property_name", + "description": "The custom property name. The name is case sensitive.
", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "bodyParameters": [], + "progAccess": { + "userToServerRest": true, + "serverToServer": true, + "fineGrainedPat": true, + "permissions": [ + { + "organization_custom_properties": "admin" + } + ] + }, + "codeExamples": [ + { + "key": "default", + "request": { + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "parameters": { + "org": "ORG", + "custom_property_name": "CUSTOM_PROPERTY_NAME" + } + }, + "response": { + "statusCode": "204", + "description": "A header with no content is returned.
" + } + } + ], + "previews": [], + "descriptionHTML": "Removes a custom property that is defined for an organization.
\nTo use this endpoint, the authenticated user must be one of:
\ncustom_properties_org_definitions_manager in the organization.A header with no content is returned.
" + }, + { + "httpStatusCode": "403", + "description": "Forbidden
" + }, + { + "httpStatusCode": "404", + "description": "Resource not found
" + } + ] + }, + { + "serverUrl": "http(s)://HOSTNAME/api/v3", + "verb": "get", + "requestPath": "/orgs/{org}/properties/values", + "title": "List custom property values for organization repositories", + "category": "orgs", + "subcategory": "custom-properties", + "parameters": [ + { + "name": "org", + "description": "The organization name. The name is not case sensitive.
", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "per_page", + "description": "The number of results per page (max 100). For more information, see \"Using pagination in the REST API.\"
", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + } + }, + { + "name": "page", + "description": "The page number of the results to fetch. For more information, see \"Using pagination in the REST API.\"
", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + } + }, + { + "name": "repository_query", + "description": "Finds repositories in the organization with a query containing one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub Enterprise Server. The REST API supports the same qualifiers as the web interface for GitHub Enterprise Server. To learn more about the format of the query, see Constructing a search query. See \"Searching for repositories\" for a detailed list of qualifiers.
", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "bodyParameters": [], + "progAccess": { + "userToServerRest": true, + "serverToServer": true, + "fineGrainedPat": true, + "permissions": [ + { + "organization_custom_properties": "read" + } + ] + }, + "codeExamples": [ + { + "key": "default", + "request": { + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "parameters": { + "org": "ORG" + } + }, + "response": { + "statusCode": "200", + "contentType": "application/json", + "description": "Response
", + "example": [ + { + "repository_id": 1296269, + "repository_name": "Hello-World", + "repository_full_name": "octocat/Hello-World", + "properties": [ + { + "property_name": "environment", + "value": "production" + }, + { + "property_name": "service", + "value": "web" + }, + { + "property_name": "team", + "value": "octocat" + } + ] + } + ], + "schema": { + "type": "array", + "items": { + "title": "Organization Repository Custom Property Values", + "description": "List of custom property values for a repository", + "type": "object", + "properties": { + "repository_id": { + "type": "integer", + "examples": [ + 1296269 + ] + }, + "repository_name": { + "type": "string", + "examples": [ + "Hello-World" + ] + }, + "repository_full_name": { + "type": "string", + "examples": [ + "octocat/Hello-World" + ] + }, + "properties": { + "type": "array", + "items": { + "title": "Custom Property Value", + "description": "Custom property name and associated value", + "type": "object", + "properties": { + "property_name": { + "type": "string", + "description": "The name of the property" + }, + "value": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "description": "The value assigned to the property", + "type": [ + "null", + "string", + "array" + ] + } + }, + "required": [ + "property_name", + "value" + ] + }, + "description": "List of custom property names and associated values" + } + }, + "required": [ + "repository_id", + "repository_name", + "repository_full_name", + "properties" + ] + } + } + } + } + ], + "previews": [], + "descriptionHTML": "Lists organization repositories with all of their custom property values.\nOrganization members can read these properties.
", + "statusCodes": [ + { + "httpStatusCode": "200", + "description": "OK
" + }, + { + "httpStatusCode": "403", + "description": "Forbidden
" + }, + { + "httpStatusCode": "404", + "description": "Resource not found
" + } + ] + }, + { + "serverUrl": "http(s)://HOSTNAME/api/v3", + "verb": "patch", + "requestPath": "/orgs/{org}/properties/values", + "title": "Create or update custom property values for organization repositories", + "category": "orgs", + "subcategory": "custom-properties", + "parameters": [ + { + "name": "org", + "description": "The organization name. The name is not case sensitive.
", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "bodyParameters": [ + { + "type": "array of strings", + "name": "repository_names", + "in": "body", + "description": "The names of repositories that the custom property values will be applied to.
", + "isRequired": true + }, + { + "type": "array of objects", + "name": "properties", + "in": "body", + "description": "List of custom property names and associated values to apply to the repositories.
", + "isRequired": true, + "childParamsGroups": [ + { + "type": "string", + "name": "property_name", + "description": "The name of the property
", + "isRequired": true + }, + { + "type": "null or string or array", + "name": "value", + "description": "The value assigned to the property
", + "isRequired": true + } + ] + } + ], + "progAccess": { + "userToServerRest": true, + "serverToServer": true, + "fineGrainedPat": true, + "permissions": [ + { + "organization_custom_properties": "write" + } + ] + }, + "codeExamples": [ + { + "key": "default", + "request": { + "contentType": "application/json", + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "repository_names": [ + "Hello-World", + "octo-repo" + ], + "properties": [ + { + "property_name": "environment", + "value": "production" + }, + { + "property_name": "service", + "value": "web" + }, + { + "property_name": "team", + "value": "octocat" + } + ] + }, + "parameters": { + "org": "ORG" + } + }, + "response": { + "statusCode": "204", + "description": "No Content when custom property values are successfully created or updated
" + } + } + ], + "previews": [], + "descriptionHTML": "Create new or update existing custom property values for repositories in a batch that belong to an organization.\nEach target repository will have its custom property values updated to match the values provided in the request.
\nA maximum of 30 repositories can be updated in a single request.
\nUsing a value of null for a custom property will remove or 'unset' the property value from the repository.
To use this endpoint, the authenticated user must be one of:
\ncustom_properties_org_values_editor in the organization.No Content when custom property values are successfully created or updated
" + }, + { + "httpStatusCode": "403", + "description": "Forbidden
" + }, + { + "httpStatusCode": "404", + "description": "Resource not found
" + }, + { + "httpStatusCode": "422", + "description": "Validation failed, or the endpoint has been spammed.
" + } + ] + } + ], "custom-roles": [ { "serverUrl": "http(s)://HOSTNAME/api/v3", @@ -450748,6 +451928,248 @@ ] } ], + "custom-properties": [ + { + "serverUrl": "http(s)://HOSTNAME/api/v3", + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/properties/values", + "title": "Get all custom property values for a repository", + "category": "repos", + "subcategory": "custom-properties", + "parameters": [ + { + "name": "owner", + "description": "The account owner of the repository. The name is not case sensitive.
", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "The name of the repository without the .git extension. The name is not case sensitive.
Response
", + "example": [ + { + "property_name": "environment", + "value": "production" + }, + { + "property_name": "service", + "value": "web" + }, + { + "property_name": "team", + "value": "octocat" + } + ], + "schema": { + "type": "array", + "items": { + "title": "Custom Property Value", + "description": "Custom property name and associated value", + "type": "object", + "properties": { + "property_name": { + "type": "string", + "description": "The name of the property" + }, + "value": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "description": "The value assigned to the property", + "type": [ + "null", + "string", + "array" + ] + } + }, + "required": [ + "property_name", + "value" + ] + } + } + } + } + ], + "previews": [], + "descriptionHTML": "Gets all custom property values that are set for a repository.\nUsers with read access to the repository can use this endpoint.
", + "statusCodes": [ + { + "httpStatusCode": "200", + "description": "OK
" + }, + { + "httpStatusCode": "403", + "description": "Forbidden
" + }, + { + "httpStatusCode": "404", + "description": "Resource not found
" + } + ] + }, + { + "serverUrl": "http(s)://HOSTNAME/api/v3", + "verb": "patch", + "requestPath": "/repos/{owner}/{repo}/properties/values", + "title": "Create or update custom property values for a repository", + "category": "repos", + "subcategory": "custom-properties", + "parameters": [ + { + "name": "owner", + "description": "The account owner of the repository. The name is not case sensitive.
", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "The name of the repository without the .git extension. The name is not case sensitive.
A list of custom property names and associated values to apply to the repositories.
", + "isRequired": true, + "childParamsGroups": [ + { + "type": "string", + "name": "property_name", + "description": "The name of the property
", + "isRequired": true + }, + { + "type": "null or string or array", + "name": "value", + "description": "The value assigned to the property
", + "isRequired": true + } + ] + } + ], + "progAccess": { + "userToServerRest": true, + "serverToServer": true, + "fineGrainedPat": true, + "permissions": [ + { + "repository_custom_properties": "write" + } + ] + }, + "codeExamples": [ + { + "key": "default", + "request": { + "contentType": "application/json", + "description": "Example", + "acceptHeader": "application/vnd.github.v3+json", + "bodyParameters": { + "properties": [ + { + "property_name": "environment", + "value": "production" + }, + { + "property_name": "service", + "value": "web" + }, + { + "property_name": "team", + "value": "octocat" + } + ] + }, + "parameters": { + "owner": "OWNER", + "repo": "REPO" + } + }, + "response": { + "statusCode": "204", + "description": "No Content when custom property values are successfully created or updated
" + } + } + ], + "previews": [], + "descriptionHTML": "Create new or update existing custom property values for a repository.\nUsing a value of null for a custom property will remove or 'unset' the property value from the repository.
Repository admins and other users with the repository-level \"edit custom property values\" fine-grained permission can use this endpoint.
", + "statusCodes": [ + { + "httpStatusCode": "204", + "description": "No Content when custom property values are successfully created or updated
" + }, + { + "httpStatusCode": "403", + "description": "Forbidden
" + }, + { + "httpStatusCode": "404", + "description": "Resource not found
" + }, + { + "httpStatusCode": "422", + "description": "Validation failed, or the endpoint has been spammed.
" + } + ] + } + ], "forks": [ { "serverUrl": "http(s)://HOSTNAME/api/v3", diff --git a/src/rest/data/ghes-3.9-2022-11-28/schema.json b/src/rest/data/ghes-3.9-2022-11-28/schema.json index 3bd5abf329..f13183dbb9 100644 --- a/src/rest/data/ghes-3.9-2022-11-28/schema.json +++ b/src/rest/data/ghes-3.9-2022-11-28/schema.json @@ -178366,8 +178366,8 @@ "versionInfo": "1.0.0", "downloadLocation": "NOASSERTION", "filesAnalyzed": false, - "licenseConcluded": "MIT", - "licenseDeclared": "MIT" + "licenseConcluded": "NOASSERTION", + "licenseDeclared": "NOASSERTION" } ] } diff --git a/src/rest/lib/config.json b/src/rest/lib/config.json index f13b7cc0e1..660b359473 100644 --- a/src/rest/lib/config.json +++ b/src/rest/lib/config.json @@ -47,5 +47,5 @@ ] } }, - "sha": "3a05345b2bd1336f25d515165c55ad48c7989954" + "sha": "2fdcd66a4be62538cba65172ea380869fb44202e" } \ No newline at end of file diff --git a/src/webhooks/lib/config.json b/src/webhooks/lib/config.json index 5bbce09fc1..63fc072350 100644 --- a/src/webhooks/lib/config.json +++ b/src/webhooks/lib/config.json @@ -1,3 +1,3 @@ { - "sha": "3a05345b2bd1336f25d515165c55ad48c7989954" + "sha": "2fdcd66a4be62538cba65172ea380869fb44202e" } \ No newline at end of file