curl --request PUT \
--url https://{tenant}.earnie.dev/v1/organization/pr-feedback \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"inline_comment_cap": 5,
"base_branch_filter": [
"<string>"
],
"path_filters": [
"<string>"
],
"locked": true
}
'import requests
url = "https://{tenant}.earnie.dev/v1/organization/pr-feedback"
payload = {
"inline_comment_cap": 5,
"base_branch_filter": ["<string>"],
"path_filters": ["<string>"],
"locked": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
inline_comment_cap: 5,
base_branch_filter: ['<string>'],
path_filters: ['<string>'],
locked: true
})
};
fetch('https://{tenant}.earnie.dev/v1/organization/pr-feedback', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{tenant}.earnie.dev/v1/organization/pr-feedback",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'inline_comment_cap' => 5,
'base_branch_filter' => [
'<string>'
],
'path_filters' => [
'<string>'
],
'locked' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{tenant}.earnie.dev/v1/organization/pr-feedback"
payload := strings.NewReader("{\n \"inline_comment_cap\": 5,\n \"base_branch_filter\": [\n \"<string>\"\n ],\n \"path_filters\": [\n \"<string>\"\n ],\n \"locked\": true\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://{tenant}.earnie.dev/v1/organization/pr-feedback")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"inline_comment_cap\": 5,\n \"base_branch_filter\": [\n \"<string>\"\n ],\n \"path_filters\": [\n \"<string>\"\n ],\n \"locked\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}.earnie.dev/v1/organization/pr-feedback")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"inline_comment_cap\": 5,\n \"base_branch_filter\": [\n \"<string>\"\n ],\n \"path_filters\": [\n \"<string>\"\n ],\n \"locked\": true\n}"
response = http.request(request)
puts response.read_body{
"summary_comment": "always",
"inline_severity_floor": "critical",
"inline_comment_cap": 5,
"draft_pull_requests": "scan",
"bot_authors": "scan",
"base_branch_filter": [
"<string>"
],
"path_filters": [
"<string>"
],
"locked": true
}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}Replace the organization's pull-request controls
Replaces the organization layer, lock included. Every control is required: this is a complete snapshot, not a patch. Setting locked to true puts these values in force for every project in the organization and makes project-level writes return 409 settings_locked. Project settings are left exactly as they are, so releasing the lock restores what each project had chosen. Like the project-level controls, nothing here changes a verdict.
curl --request PUT \
--url https://{tenant}.earnie.dev/v1/organization/pr-feedback \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"inline_comment_cap": 5,
"base_branch_filter": [
"<string>"
],
"path_filters": [
"<string>"
],
"locked": true
}
'import requests
url = "https://{tenant}.earnie.dev/v1/organization/pr-feedback"
payload = {
"inline_comment_cap": 5,
"base_branch_filter": ["<string>"],
"path_filters": ["<string>"],
"locked": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
inline_comment_cap: 5,
base_branch_filter: ['<string>'],
path_filters: ['<string>'],
locked: true
})
};
fetch('https://{tenant}.earnie.dev/v1/organization/pr-feedback', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{tenant}.earnie.dev/v1/organization/pr-feedback",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'inline_comment_cap' => 5,
'base_branch_filter' => [
'<string>'
],
'path_filters' => [
'<string>'
],
'locked' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{tenant}.earnie.dev/v1/organization/pr-feedback"
payload := strings.NewReader("{\n \"inline_comment_cap\": 5,\n \"base_branch_filter\": [\n \"<string>\"\n ],\n \"path_filters\": [\n \"<string>\"\n ],\n \"locked\": true\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://{tenant}.earnie.dev/v1/organization/pr-feedback")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"inline_comment_cap\": 5,\n \"base_branch_filter\": [\n \"<string>\"\n ],\n \"path_filters\": [\n \"<string>\"\n ],\n \"locked\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}.earnie.dev/v1/organization/pr-feedback")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"inline_comment_cap\": 5,\n \"base_branch_filter\": [\n \"<string>\"\n ],\n \"path_filters\": [\n \"<string>\"\n ],\n \"locked\": true\n}"
response = http.request(request)
puts response.read_body{
"summary_comment": "always",
"inline_severity_floor": "critical",
"inline_comment_cap": 5,
"draft_pull_requests": "scan",
"bot_authors": "scan",
"base_branch_filter": [
"<string>"
],
"path_filters": [
"<string>"
],
"locked": true
}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}Authorizations
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.
Body
The organization layer of the same pull-request controls, plus the lock that decides whether they are advice or law. Unlocked — the default — this document is inert: every project answers for itself and these values are never consulted. It is deliberately not a set of inherited defaults, because that would silently change the behaviour of every project that had never saved its own settings. Locked, these values are in force for every project in the organization and project-level writes are refused. Project settings are left untouched, so unlocking restores what each project had chosen.
When the Earnie PR summary comment appears.
always, on_failure_only Lowest finding severity eligible for an inline review comment.
critical, high, medium, low, info Maximum inline comments in one COMMENT review.
0 <= x <= 10What to do with a draft pull request.
scan, skip What to do with a pull request opened by a provider bot account.
scan, skip Allow-list of base-branch patterns; empty means every base branch.
50Allow-list of changed-file patterns; empty means every path.
50Whether these values are in force for every project in the organization. False leaves the document inert.
Response
The updated organization pull-request controls.
The organization layer of the same pull-request controls, plus the lock that decides whether they are advice or law. Unlocked — the default — this document is inert: every project answers for itself and these values are never consulted. It is deliberately not a set of inherited defaults, because that would silently change the behaviour of every project that had never saved its own settings. Locked, these values are in force for every project in the organization and project-level writes are refused. Project settings are left untouched, so unlocking restores what each project had chosen.
When the Earnie PR summary comment appears.
always, on_failure_only Lowest finding severity eligible for an inline review comment.
critical, high, medium, low, info Maximum inline comments in one COMMENT review.
0 <= x <= 10What to do with a draft pull request.
scan, skip What to do with a pull request opened by a provider bot account.
scan, skip Allow-list of base-branch patterns; empty means every base branch.
50Allow-list of changed-file patterns; empty means every path.
50Whether these values are in force for every project in the organization. False leaves the document inert.