Get Pull Request
curl --request GET \
--url https://api.yertle.com/orgs/{org_id}/nodes/{node_id}/pull-requests/{pr_number}import requests
url = "https://api.yertle.com/orgs/{org_id}/nodes/{node_id}/pull-requests/{pr_number}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.yertle.com/orgs/{org_id}/nodes/{node_id}/pull-requests/{pr_number}', 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.yertle.com/orgs/{org_id}/nodes/{node_id}/pull-requests/{pr_number}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.yertle.com/orgs/{org_id}/nodes/{node_id}/pull-requests/{pr_number}"
req, _ := http.NewRequest("GET", url, nil)
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.yertle.com/orgs/{org_id}/nodes/{node_id}/pull-requests/{pr_number}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.yertle.com/orgs/{org_id}/nodes/{node_id}/pull-requests/{pr_number}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"pr": {
"id": "<string>",
"node_id": "<string>",
"number": 123,
"title": "<string>",
"source_branch": "<string>",
"target_branch": "<string>",
"source_commit": "<string>",
"target_commit": "<string>",
"status": "<string>",
"is_draft": true,
"author": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"author_email": "<string>",
"merged_by": "<string>",
"merged_by_email": "<string>",
"closed_by": "<string>",
"closed_by_email": "<string>",
"merged_at": "2023-11-07T05:31:56Z",
"closed_at": "2023-11-07T05:31:56Z",
"can_merge": true,
"merge_reason": "<string>",
"commits_ahead": 123
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Pull Requests
Get Pull Request
Fetch a single pull request along with its current merge status.
Augments the stored PR with live computed fields: whether it can be merged right now (fast-forward check), a reason string if it cannot, and how many commits the source branch is ahead of the target. Those fields are re-derived on each call so the UI always reflects current branch state.
pr_number is the per-node PR number (not the internal UUID).
GET
/
orgs
/
{org_id}
/
nodes
/
{node_id}
/
pull-requests
/
{pr_number}
Get Pull Request
curl --request GET \
--url https://api.yertle.com/orgs/{org_id}/nodes/{node_id}/pull-requests/{pr_number}import requests
url = "https://api.yertle.com/orgs/{org_id}/nodes/{node_id}/pull-requests/{pr_number}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.yertle.com/orgs/{org_id}/nodes/{node_id}/pull-requests/{pr_number}', 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.yertle.com/orgs/{org_id}/nodes/{node_id}/pull-requests/{pr_number}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.yertle.com/orgs/{org_id}/nodes/{node_id}/pull-requests/{pr_number}"
req, _ := http.NewRequest("GET", url, nil)
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.yertle.com/orgs/{org_id}/nodes/{node_id}/pull-requests/{pr_number}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.yertle.com/orgs/{org_id}/nodes/{node_id}/pull-requests/{pr_number}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"pr": {
"id": "<string>",
"node_id": "<string>",
"number": 123,
"title": "<string>",
"source_branch": "<string>",
"target_branch": "<string>",
"source_commit": "<string>",
"target_commit": "<string>",
"status": "<string>",
"is_draft": true,
"author": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"author_email": "<string>",
"merged_by": "<string>",
"merged_by_email": "<string>",
"closed_by": "<string>",
"closed_by_email": "<string>",
"merged_at": "2023-11-07T05:31:56Z",
"closed_at": "2023-11-07T05:31:56Z",
"can_merge": true,
"merge_reason": "<string>",
"commits_ahead": 123
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}⌘I