curl --request GET \
--url https://{tenant}.earnie.dev/v1/organization/pr-feedback \
--header 'Authorization: Bearer <token>'import requests
url = "https://{tenant}.earnie.dev/v1/organization/pr-feedback"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
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 => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{tenant}.earnie.dev/v1/organization/pr-feedback"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{tenant}.earnie.dev/v1/organization/pr-feedback")
.header("Authorization", "Bearer <token>")
.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::Get.new(url)
request["Authorization"] = 'Bearer <token>'
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>"
}Get the organization's pull-request controls
Returns the organization layer of the pull-request controls and whether it is locked. An organization that never saved one reads the product defaults, unlocked — the state in which every project answers for itself.
curl --request GET \
--url https://{tenant}.earnie.dev/v1/organization/pr-feedback \
--header 'Authorization: Bearer <token>'import requests
url = "https://{tenant}.earnie.dev/v1/organization/pr-feedback"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
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 => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{tenant}.earnie.dev/v1/organization/pr-feedback"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{tenant}.earnie.dev/v1/organization/pr-feedback")
.header("Authorization", "Bearer <token>")
.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::Get.new(url)
request["Authorization"] = 'Bearer <token>'
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>"
}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.
Response
The organization's 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.