Zum Hauptinhalt springen
GET
/
v3
/
organizations
/
{org_id}
/
pr-reviews
Aktuellsten Status von Devin Review abrufen
curl --request GET \
  --url https://api.devin.ai/v3/organizations/{org_id}/pr-reviews \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.devin.ai/v3/organizations/{org_id}/pr-reviews"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.devin.ai/v3/organizations/{org_id}/pr-reviews', 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://api.devin.ai/v3/organizations/{org_id}/pr-reviews",
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://api.devin.ai/v3/organizations/{org_id}/pr-reviews"

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://api.devin.ai/v3/organizations/{org_id}/pr-reviews")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.devin.ai/v3/organizations/{org_id}/pr-reviews")

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
{
  "commit_sha": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "pr_number": 123,
  "repo_path": "<string>"
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}

Berechtigungen

Erfordert einen Service-Benutzer mit der Berechtigung UseReviewManual in der angegebenen Organisation.

Autorisierungen

Authorization
string
header
erforderlich

Servicebenutzer-Anmeldedaten (Präfix: cog_)

Pfadparameter

org_id
string
erforderlich

Organisations-ID (Präfix: org-)

Beispiel:

"org-abc123def456"

Abfrageparameter

pr_url
string
erforderlich

Vollständige URL des Pull-/Merge-Requests zum Nachschlagen (z. B. https://github.com/owner/repo/pull/123).

Beispiel:

"https://github.com/owner/repo/pull/123"

commit_sha
string | null

Commit-SHA zum Nachschlagen (vollständig oder als kurzes Präfix). Wenn keine angegeben wird, wird standardmäßig der aktuelle Head-Commit der PR verwendet.

Beispiel:

"abc123def4567890abc123def4567890abc123de"

Antwort

Erfolgreiche Antwort

commit_sha
string
erforderlich

Commit-SHA des PR-Head, der überprüft wird.

created_at
string<date-time>
erforderlich

Zeitpunkt, zu dem die Überprüfung akzeptiert wurde.

pr_number
integer
erforderlich

Pull-/Merge-Request-Nummer.

repo_path
string
erforderlich

Normalisierter, Host-präfixierter Repo-Pfad (z. B. github.com/owner/repo).

status
enum<string>
erforderlich

Aktueller Überprüfungsstatus. Neu akzeptierte Überprüfungen beginnen als pending.

Verfügbare Optionen:
pending,
running,
completed,
errored,
cancelled