Decisions
Save repository routing
Saves the complete routing config for one code-host repository and subject family and clears Needs review. The Decision must be visible and supported (code DECISION_NOT_FOUND, 404), the rules must fit its question, and every rule's agent must be a member (400 with issues). Needs edit access to every member agent, since the routing decides which of them fire. enabled: false pauses routing: the members' triggers fire unrouted. Enabling is refused with code DECISION_UNSUPPORTED_CONSUMER (409) while a connected relay does not support routing for this provider.
Authorization
bearerAuth AuthorizationBearer <token>
In: header
Path Parameters
orgId*string
provider*string
Value in
- "github"
- "gitlab"
- "gitea"
repoId*string
Match
^[1-9]\d{0,18}$family*string
Value in
- "issues"
- "pull_request"
- "merge_request"
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X PUT "https://example.com/v1/orgs/string/decision-routing/github/string/issues" \ -H "Content-Type: application/json" \ -d '{ "config": { "decisionId": "string", "rules": [ { "id": "string", "when": { "type": "choice", "thresholds": { "property1": 0, "property2": 0 } }, "action": { "type": "agent", "agentId": "string" } } ], "enabled": true, "otherwise": { "type": "default_agent" } } }'{ "provider": "github", "repoId": "string", "repoFullName": "string", "family": "issues", "config": { "decisionId": "string", "rules": [ { "id": "string", "when": { "type": "choice", "thresholds": { "property1": 0, "property2": 0 } }, "action": { "type": "agent", "agentId": "string" } } ], "enabled": true, "otherwise": { "type": "default_agent" }, "steps": [ { "decisionId": "string", "rules": [ { "id": "string", "when": { "type": "choice", "thresholds": { "property1": 0, "property2": 0 } }, "action": { "type": "agent", "agentId": "string" } } ], "id": "string" } ] }, "status": "enabled", "members": [ { "agentId": "string", "hookId": "string", "name": "string" } ], "evaluationAgentId": "string"}