Skip to main content
PUT
Set a repository's Review billing rule
Creates or replaces the billing rule for one exact repository, so that future Devin Review usage on it is charged to an organization or a budget. To see existing rules, use List repository billing rules.

Permissions

Requires a service user or personal access token with the ManageReview permission at the enterprise level.

Behavior

  • repository accepts owner/repo for github.com, host/path for other providers, or a full repository URL. It must name one exact repository. Wildcards are rejected with 422.
  • A repository has at most one rule. Sending a repository that already has a rule replaces who pays and keeps the same rule id.
  • bill_to.type is organization or budget, and bill_to.id is the matching organization ID or budget ID. A target the caller can’t use returns 400 or 403.
  • The rule applies to future reviews only. Usage already charged is not moved.
  • Returns 409 when the repository is already mapped through another git connection on the same host, or when the rule changed during the request. Retry the request in the second case.

Authorizations

Authorization
string
header
required

Service User credential (prefix: cog_)

Body

application/json
bill_to
ReviewRepoBillingRuleBillTo · object
required
repository
string
required

'owner/repo' on github.com, 'host/path' on other providers; a full URL is also accepted

Required string length: 1 - 1024

Response

Successful Response

bill_to
ReviewRepoBillingRuleBillTo · object
required

Who pays for future Devin Review usage on the repository

created_at
integer
required
id
string
required

The billing rule ID, used to remove the rule

repository
string
required

'owner/repo' on github.com, 'host/path' on other providers

updated_at
integer
required