Create rule

POST
/api/v1/review-filters/rules

Authorization

bearerAuth
headerAuthorizationBearer <token>

An API key created in Capy under Settings → API.

Request body

application/json
  1. body
repo*string|null
conditions*array<>
repositoryCondition?|null

Response body

ReviewFilterRule

application/json
  1. response
id*string
Match^rfilt_
Length32 <= length <= 32
repo*string|null
githubRepoId*number||null
conditions*array<>
repositoryCondition?|null
skipped*boolean

True when a value exceeds the wildcard limit or a repository is unavailable, so admission skips the rule until it is edited

source*string
One of"hand""greptile"
createdByUserId*string|null
createdByName*string|null
createdAt*string
updatedAt*string
curl -X POST 'https://api.capy.ai/api/v1/review-filters/rules' \  -H 'Content-Type: application/json' \  -d '{  "repo": "string",  "conditions": [    {      "field": "label",      "not": true,      "values": [        "string"      ]    }  ]}'
{  "id": "string",  "repo": "string",  "githubRepoId": 0,  "conditions": [    {      "field": "label",      "not": true,      "values": [        "string"      ]    }  ],  "repositoryCondition": {    "not": true,    "repoIds": [      0    ]  },  "skipped": true,  "source": "hand",  "createdByUserId": "string",  "createdByName": "string",  "createdAt": "string",  "updatedAt": "string"}
Open in Capy