Skip to main content

Crate subspace_client_github

Crate subspace_client_github 

Source
Expand description

The synchronous GitHub client: accounts, sections, detail, writes and pull request diffs. No GPUI; dashboards call it off the UI thread.

Every call runs as one account. login is a signed-in or gh login from Client::accounts; with GH_TOKEN, GITHUB_TOKEN or github.token set, that token is used whatever the login (REQ-60).

Modules§

actions
GitHub Actions, deployments and releases REST client.
copilot_agent_sessions
The Copilot agent session API: the session document and its log.
copilot_agents
GitHub cloud-agent task API: validation and transport mapping.
issue_report
Reviewed issue reports for the repository the app names. No UI or image I/O.
lifecycle
Bounded reads of recent closed pull requests and deployment status history.
model
The GitHub data model shown by the GitHub board. Field names follow the JSON (camelCase).
scope
Searches limited to named repositories. Each repository becomes one repo: qualifier, which GitHub combines with OR, and the qualifiers are split across as many searches as GitHub’s query length limit needs.
validate
Input checks (GH-09, DF-07). A failed check is an Error::Status with status 400.

Structs§

BoundRead
A verified principal and one in-memory credential. Never serialized or Debug.
Client
Organization
PackageRelease
PackageRepository
PinnedWork
The work account’s credential and the account GitHub verified it belongs to, for one operation. It borrows the client and is never stored, serialized or printed.
ReleaseAsset
ResolvedRepository

Enums§

RepositoryRef

Constants§

API_URL
API_URL_ENV
Debug builds only: the GitHub API and Copilot API base to use instead of API_URL, such as a local fixture server for screenshots.
MAX_DIFF_FILES
GitHub’s limit for the pulls files API.
MAX_FILE_BYTES
MAX_IMAGE_BYTES

Functions§

credential_login
The login that owns credential, from GET /user. No retry, cache or fallback credential: the answer identifies exactly this token.
file_pages
Pages of the pulls files API to request: at least one, at most GitHub’s 3,000-file limit.
is_access_refusal
Whether error is a plain 403 from [http_failure]: GitHub refusing the account one resource, not a rate limit, an SSO requirement or a rejected credential. Work over many items can skip that item rather than stop.
is_not_found
Whether error says GitHub found nothing this account can read: a 404, or the 400 [graphql_failure] makes from a GraphQL NOT_FOUND, which GitHub also answers for a repository the account cannot see. Any other 400, such as a query GitHub rejects, is not.
newest_package_release
Select the newest published eligible release containing this exact ZIP name.