Skip to main content
PUT
Set a project's pre-commit hook setting

Authorizations

Authorization
string
header
required

An Earnie API key, sent as Authorization: Bearer sk_earnie_.... Create one under Settings > API keys. The key's scopes decide which operations it may call.

Path Parameters

projectId
string<uuid>
required

Body

application/json

Per-project pre-commit hook failure behavior. A project with no stored setting reads false: the hook visibly allows the commit when Earnie is unavailable, while the PR check remains the authoritative gate.

hook_fail_closed
boolean
required

Whether technical failures in the Earnie pre-commit hook block the commit. Policy verdict block always blocks; this setting only changes availability and technical-error behavior.

Response

The updated pre-commit hook setting.

Per-project pre-commit hook failure behavior. A project with no stored setting reads false: the hook visibly allows the commit when Earnie is unavailable, while the PR check remains the authoritative gate.

hook_fail_closed
boolean
required

Whether technical failures in the Earnie pre-commit hook block the commit. Policy verdict block always blocks; this setting only changes availability and technical-error behavior.