Skip to main content

custom_property_values

Creates, updates, deletes, gets or lists a custom_property_values resource.

Overview

Namecustom_property_values
TypeResource
Idgithub.orgs.custom_property_values

Fields

The following fields are returned by SELECT queries:

Response

NameDatatypeDescription
repository_idinteger
repository_full_namestring (example: octocat/Hello-World)
repository_namestring (example: Hello-World)
propertiesarrayList of custom property names and associated values

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
custom_properties_for_repos_get_organization_valuesselectorgper_page, page, repository_queryLists organization repositories with all of their custom property values.
Organization members can read these properties.
custom_properties_for_repos_create_or_update_organization_valuesupdateorg, repository_names, propertiesCreate new or update existing custom property values for repositories in a batch that belong to an organization.
Each target repository will have its custom property values updated to match the values provided in the request.

A maximum of 30 repositories can be updated in a single request.

Using 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:
- An administrator for the organization.
- A user, or a user on a team, with the fine-grained permission of custom_properties_org_values_editor in the organization.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
orgstringThe organization name. The name is not case sensitive.
pageintegerThe page number of the results to fetch. For more information, see "Using pagination in the REST API."
per_pageintegerThe number of results per page (max 100). For more information, see "Using pagination in the REST API."
repository_querystringFinds 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. The REST API supports the same qualifiers as the web interface for GitHub. To learn more about the format of the query, see Constructing a search query. See "Searching for repositories" for a detailed list of qualifiers.

SELECT examples

Lists organization repositories with all of their custom property values.
Organization members can read these properties.

SELECT
repository_id,
repository_full_name,
repository_name,
properties
FROM github.orgs.custom_property_values
WHERE org = '{{ org }}' -- required
AND per_page = '{{ per_page }}'
AND page = '{{ page }}'
AND repository_query = '{{ repository_query }}'
;

UPDATE examples

Create new or update existing custom property values for repositories in a batch that belong to an organization.
Each target repository will have its custom property values updated to match the values provided in the request.

A maximum of 30 repositories can be updated in a single request.

Using 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:
- An administrator for the organization.
- A user, or a user on a team, with the fine-grained permission of custom_properties_org_values_editor in the organization.

UPDATE github.orgs.custom_property_values
SET
repository_names = '{{ repository_names }}',
properties = '{{ properties }}'
WHERE
org = '{{ org }}' --required
AND repository_names = '{{ repository_names }}' --required
AND properties = '{{ properties }}' --required;