Skip to main content

ruleset_history

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

Overview

Nameruleset_history
TypeResource
Idgithub.orgs.ruleset_history

Fields

The following fields are returned by SELECT queries:

Response

NameDatatypeDescription
version_idintegerThe ID of the previous version of the ruleset
actorobjectThe actor who updated the ruleset
statestringThe state of the ruleset version (opaque JSON object)
updated_atstring (date-time)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_org_ruleset_versionselectorg, ruleset_id, version_idGet a version of an organization ruleset.
get_org_ruleset_historyselectorg, ruleset_idper_page, pageGet the history of an organization ruleset.

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.
ruleset_idintegerThe ID of the ruleset.
version_idintegerThe ID of the version
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."

SELECT examples

Get a version of an organization ruleset.

SELECT
version_id,
actor,
state,
updated_at
FROM github.orgs.ruleset_history
WHERE org = '{{ org }}' -- required
AND ruleset_id = '{{ ruleset_id }}' -- required
AND version_id = '{{ version_id }}' -- required
;