Skip to main content

Module client

Module client 

Source
Expand description

The provider-agnostic hosting port and its plumbing.

The implementations live in crate::github and crate::gitlab; kinds with no client yet (Bitbucket, Azure DevOps, Jira, Trello) get UnsupportedClient, whose every call says so.

Re-exports§

pub use crate::spec::web_base;

Structs§

CreatedIssue
What the host answers with once the issue exists.
CreatedPullRequest
What the host answers with once the request exists.
NewIssue
What opening an issue needs, host-agnostic (v1: title, body, labels).
NewPullRequest
What opening a pull/merge request needs, host-agnostic.
UnsupportedClient
Stands in for a family with no client yet: every call fails with Error::NotImplemented naming the product.

Traits§

HostingClient

Functions§

client_for
Builds the client for integration, over transport, once gate has admitted it.
issue_web_url
The browser page of issue number in project.
pull_request_edit_url
The page to edit a pull / merge request whose browser page is web_url: GitLab has a dedicated edit view (.../merge_requests/53/edit); GitHub edits the title and description in place on the request’s page.
pull_request_head_ref
Where a host keeps the head of pull/merge request number - the ref a fork’s commits are fetched from - and the local branch name to track it with: ("refs/pull/7/head", "pr/7") on GitHub, ("refs/merge-requests/7/head", "mr/7") on GitLab. None for hosts that fetch a pull request by branch instead (CheckoutSource::Branch).
pull_request_web_url
The browser page of pull/merge request number in project.
token_create_url
The page on the host that mints a token with the scopes the app needs, pre-filled. None for kinds without a token flow, or when no host is known yet (a self-managed profile still being typed).