List a repository's rule evaluations
List how a repository's rulesets judged pushes, merges and other changes to its branches and tags, newest first: the ruleset, the action (push, merge, create_ref, delete_ref, rename_ref or commit), the ref, the actor and whether they are a person, an agent or g1t, the verdict (pass, fail or bypass) and each rule broken with why.
/repos/{owner}/{name}/rules/evaluationsA fail of a ruleset in evaluate is what it would have refused. Filter by ruleset_id or verdict, or problems_only; page with before. insights counts the last 30 days by ruleset and by rule. Takes the Write role.
A fail of a ruleset in evaluate is what it would have refused. Pass next as before for the next page. insights counts the last 30 days.
- Authentication: Required. Send an access token as
Authorization: Bearer. - MCP tool:
repositorywithactionrule_evaluations, and the same inputs - Scope: An access token needs
repo:read.
Path parameters
Section titled “Path parameters”| Name | Type | Required | Description |
|---|---|---|---|
owner |
string | Yes | The workspace that owns the repository. |
name |
string | Yes | The repository’s name. |
Query parameters
Section titled “Query parameters”| Name | Type | Required | Description |
|---|---|---|---|
ruleset_id |
string | No | Only this ruleset’s evaluations. |
verdict |
string | No | Only evaluations that came out this way. One of pass, fail, bypass. |
problems_only |
boolean | No | Only evaluations that broke a rule: failed, would have failed, or bypassed. |
before |
string | No | An evaluation’s id (rev_…): only older ones. The page’s next. |
limit |
integer | No | How many, 1 to 100; 30 by default. |
Example request
Section titled “Example request”curl "https://api.g1t.sh/repos/flagon-io/hello/rules/evaluations?problems_only=true" \ -H "Authorization: Bearer $G1T_TOKEN"Example response
Section titled “Example response”A successful request answers 200 with:
{ "evaluations": [ { "id": "rev_01kq3c4d5e6f7g8h9j0k1m2n3p", "repo_id": "rep_01kq0f3a7b8c9d0e1f2g3h4j5k", "workspace": "flagon-io", "ruleset_id": "rs_01kq3a8b9c0d1e2f3g4h5j6k7m", "ruleset_name": "Protect main", "enforcement": "active", "action": "push", "git_ref": "refs/heads/main", "actor": "g1t", "actor_kind": "agent", "verdict": "fail", "violations": [ { "rule": "pull_request", "ruleset_id": "rs_01kq3a8b9c0d1e2f3g4h5j6k7m", "ruleset_name": "Protect main", "enforcement": "active", "message": "Changes to main must be made through a pull request.", "remedy": "Push a branch, open a pull request into main, and merge it." } ], "number": null, "sha": "9f3c2a1b7e6d5c4b3a2918f7e6d5c4b3a2918f7e", "repository": "flagon-io/hello", "created_at": "2026-10-07T14:02:11.318Z" } ], "next": null, "insights": { "days": 30, "total": 214, "passed": 198, "blocked": 9, "would_block": 5, "bypassed": 2, "by_ruleset": [ { "ruleset_id": "rs_01kq3a8b9c0d1e2f3g4h5j6k7m", "ruleset_name": "Protect main", "enforcement": "active", "total": 120, "blocked": 9, "would_block": 0, "bypassed": 2 } ], "by_rule": [ { "rule": "pull_request", "count": 7 }, { "rule": "non_fast_forward", "count": 2 } ] }}Errors
Section titled “Errors”A failed request answers with one of these statuses and a body like {"error": {"code": "not_found", "message": "Repository not found."}}. See errors.
| Status | Code | When |
|---|---|---|
| 401 | unauthenticated |
A token is required, or the one sent is not valid. |
| 403 | forbidden |
The token is valid but not allowed to do this, such as a member-only change or an agent token outside its repository. |
| 404 | not_found |
It does not exist, or you cannot see it. |
| 422 | invalid |
The input is not valid. message says which field and why. |