repos

Get a repository rule suite

Changed on

Gets information about a suite of rule evaluations from within a repository. For more information, see "Managing rulesets for a repository."

get/repos/{owner}/{repo}/rulesets/rule-suites/{rule_suite_id}

Request

  • Base URL: https://api.github.com
  • URL: https://api.github.com/repos/{owner}/{repo}/rulesets/rule-suites/{rule_suite_id}
  • Auth: none declared

Path parameters

ownerstring required

The account owner of the repository. The name is not case sensitive.

repostring required

The name of the repository without the .git extension. The name is not case sensitive.

rule_suite_idinteger required

The unique identifier of the rule suite result. To get this ID, you can use GET /repos/{owner}/{repo}/rulesets/rule-suites for repositories and GET /orgs/{org}/rulesets/rule-suites for organizations.

Query parameters

include_metadataboolean

When set to true, the response will include additional metadata for pull request and required status check rule evaluation. Results are capped at 50 entries.

Response

Response

idinteger

The unique identifier of the rule insight.

actor_idinteger nullable

The number that identifies the user.

actor_namestring nullable

The handle for the GitHub user account.

before_shastring

The previous commit SHA of the ref.

after_shastring

The new commit SHA of the ref.

refstring

The ref name that the evaluation ran on.

repository_idinteger

The ID of the repository associated with the rule evaluation.

repository_namestring

The name of the repository without the .git extension.

pushed_atstring date-time
result'pass' | 'fail' | 'bypass'

The result of the rule evaluations for rules with the active enforcement status.

evaluation_result'pass' | 'fail' | 'bypass' nullable

The result of the rule evaluations for rules with the active and evaluate enforcement statuses, demonstrating whether rules would pass or fail if all rules in the rule suite were active. Null if no rules with evaluate enforcement status were run.

Example response

{
  "pushed_at": "2011-01-26T19:06:43Z"
}

Changes

  • 2022-11-282bf6ea0a5e8bRevision changes
    • info

      added the new optional query request parameter include_metadata

    • info

      added the optional property // to the response with the status