Skip to content

Interface: GithubHttpTransport ​

Defined in: github/src/executors/github-http-transport.ts:19

Pluggable HTTP transport abstraction for GitHub REST API requests.

Allows GithubIssuesTrackerAdapter and executeGithubCreateOrUpdatePrStep to operate over either defaultGithubHttpTransport (@octokit/rest) or deterministic recorded transports in tests.

Methods ​

request() ​

ts
request<TResponse>(
   method, 
   path, 
   options
): Promise<TResponse>;

Defined in: github/src/executors/github-http-transport.ts:33

Executes an authenticated HTTP request against a GitHub REST API endpoint path.

Serializes options.body as JSON when present and parses the JSON response payload.

Type Parameters ​

Type ParameterDefault typeDescription
TResponseunknownParsed JSON response type.

Parameters ​

ParameterTypeDescription
method"GET" | "POST" | "PUT" | "PATCH" | "DELETE"HTTP request method.
pathstringRelative GitHub API path starting with '/'.
optionsGithubHttpRequestOptionsBearer token and optional JSON body payload.

Returns ​

Promise<TResponse>

Parsed JSON response returned by the GitHub REST API.

Released under the MIT License.