For the complete documentation index, see llms.txt. This page is also available as Markdown.

Reviews

List pull requests with metadata and review environments

get

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.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
repositoryIdentifierstringRequired

Repository identifier in the format owner/repo

Example: flxbl-io/sf-core
prNumberstringOptional

Optional PR number to filter for a specific pull request

statusstringOptional

Optional status filter: open, closed, or all (default: all)

refreshbooleanOptional

Force refresh the cache and fetch fresh data

Default: falseExample: false
Responses
200

Pull requests with metadata retrieved successfully.

application/json
cacheVersionnumberOptional

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.

Example: 42
refreshingbooleanOptional

True 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).

Example: false
refreshRunIdstringOptional

Hatchet run id of the in-flight refresh, when one was dispatched or already running.

get/sfp/api/reviews/pull-requests
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"
}

Request a rebuild of the review status cache for a repository

post

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.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
repositoryIdentifierstringRequired
Responses
201

Refresh dispatched (or coalesced onto an in-flight run).

application/json
repositoryIdentifierstringRequired

Repository the refresh was requested for.

dispatchedbooleanRequired

True when a new workflow run was started by this request.

alreadyRunningbooleanRequired

True when a run was already in flight and this request coalesced onto it.

runIdstringOptional

Hatchet run id, when a run is available.

reasonstring · enumOptional

Stable, client-safe code for why no run could be started. Never raw exception text — the underlying error stays in server logs.

Possible values:
post/sfp/api/reviews/pull-requests/refresh
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?