Reviews
Retrieves all pull requests for a repository with comprehensive metadata including Salesforce component changes, review environment assignments, validation status, and component overlap detection.
This endpoint always answers from cache and returns in ~1s. The snapshot is rebuilt by the Hatchet refresh-review-cache workflow every 15 minutes.
Passing refresh=true dispatches a refresh for this repository and returns the current snapshot immediately with refreshing: true — it does not wait for the rebuild. Poll this endpoint until cacheVersion changes to pick up the fresh data.
Repository identifier in the format owner/repo
flxbl-io/sf-coreOptional PR number to filter for a specific pull request
Optional status filter: open, closed, or all (default: all)
Force refresh the cache and fetch fresh data
falseExample: falsePull requests with metadata retrieved successfully.
Doc-store version of the cached snapshot. Increments every time the refresh workflow republishes it, so clients can poll for "my refresh landed" without diffing the payload.
42True when a refresh workflow is in flight for this repository. The payload returned alongside it is the previous snapshot (or empty on a cold cache).
falseHatchet run id of the in-flight refresh, when one was dispatched or already running.
Bad Request (e.g., missing repositoryIdentifier)
Unauthorized
Forbidden - Requires role: member, application
Repository not found or no access
GET /sfp/api/reviews/pull-requests?repositoryIdentifier=flxbl-io%2Fsf-core HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"openPrs": {
"10": {
"issueTitle": "Update CustomMetadataFeatureSettingsProvider.cls",
"linkToIssue": "https://github.com/phieu-flxbl/sf-core/pull/10",
"number": 10,
"branch": "feature-branch",
"author": {
"login": "octocat",
"avatarUrl": "https://avatars.githubusercontent.com/u/123456?v=4"
},
"elapsedTime": 86400000,
"merged": false
}
},
"closedPrs": {},
"cacheVersion": 42,
"refreshing": false,
"refreshRunId": "text"
}Dispatches the Hatchet refresh-review-cache workflow scoped to this repository and returns immediately with the run id.
The rebuild clones the repository and resolves Salesforce metadata for every open PR, so it takes minutes — it deliberately runs in a worker and never on the API process. Poll GET reviews/pull-requests until cacheVersion changes to observe the result.
Repeat requests within a short window coalesce onto the in-flight run (alreadyRunning: true) instead of queueing another.
Refresh dispatched (or coalesced onto an in-flight run).
Repository the refresh was requested for.
True when a new workflow run was started by this request.
True when a run was already in flight and this request coalesced onto it.
Hatchet run id, when a run is available.
Stable, client-safe code for why no run could be started. Never raw exception text — the underlying error stays in server logs.
Bad Request (e.g. missing repositoryIdentifier)
Unauthorized
Forbidden - Requires role: member, application
POST /sfp/api/reviews/pull-requests/refresh?repositoryIdentifier=text HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"repositoryIdentifier": "text",
"dispatched": true,
"alreadyRunning": true,
"runId": "text",
"reason": "hatchet-disabled"
}Last updated
Was this helpful?