curl --request GET \
--url https://sreagent.app/api/v1/config/github_settings \
--header 'Authorization: Bearer <token>'import requests
url = "https://sreagent.app/api/v1/config/github_settings"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://sreagent.app/api/v1/config/github_settings', 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://sreagent.app/api/v1/config/github_settings",
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://sreagent.app/api/v1/config/github_settings"
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://sreagent.app/api/v1/config/github_settings")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sreagent.app/api/v1/config/github_settings")
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{
"data": {
"account": "<string>",
"auto_pr_enabled": true,
"auto_revise_on_review": true,
"connected": true,
"context_repo": "<string>",
"draft_prs": true,
"fix_runner": {},
"inherited_from": "<string>",
"installation_id": 123,
"link_comments_enabled": true,
"repos": "<array>",
"repos_refreshed_at": "<string>",
"review_enabled": true,
"review_severity_floor": "critical",
"webhook_secret_set": true
},
"organization": {}
}{
"error": "<string>",
"message": "<string>"
}Read the GitHub settings
How this organization’s GitHub App connection stands, as the Integrations page’s GitHub tab shows it: whether one is connected, the account it is installed on, the repositories it grants, the five behaviour toggles, the severity floor inline review comments start at, the grounding context repo, whether a webhook signing secret is stored, and this organization’s own fix runner when it has registered one. The repository list is re-read from GitHub when it was last read more than an hour ago, and repos_refreshed_at says when that was; a GitHub that cannot be reached leaves the cached list and its stamp as they were. connected is false and every field of the installation is null when none is connected. No secret is returned: webhook_secret_set says only that one is stored.
curl --request GET \
--url https://sreagent.app/api/v1/config/github_settings \
--header 'Authorization: Bearer <token>'import requests
url = "https://sreagent.app/api/v1/config/github_settings"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://sreagent.app/api/v1/config/github_settings', 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://sreagent.app/api/v1/config/github_settings",
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://sreagent.app/api/v1/config/github_settings"
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://sreagent.app/api/v1/config/github_settings")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sreagent.app/api/v1/config/github_settings")
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{
"data": {
"account": "<string>",
"auto_pr_enabled": true,
"auto_revise_on_review": true,
"connected": true,
"context_repo": "<string>",
"draft_prs": true,
"fix_runner": {},
"inherited_from": "<string>",
"installation_id": 123,
"link_comments_enabled": true,
"repos": "<array>",
"repos_refreshed_at": "<string>",
"review_enabled": true,
"review_severity_floor": "critical",
"webhook_secret_set": true
},
"organization": {}
}{
"error": "<string>",
"message": "<string>"
}
