Expand description
The service of the code hosts and of the Kanban’s sources, for every plugin that serves some (docs/PLUGINS.md §4.4,
§4.5): GitHub today, GitLab, Bitbucket, Gitea and Azure DevOps after it. A plugin gives its kinds — a
ForgeKind for each host it serves, a SourceKind for each source — and Hosts answers the core’s adapters
(ProcessForge, ProcessTicketSource) for them:
- the account is the call’s (
account: an instance’s address, where its API is when the core says it); its token is asked of Escouade bysecrets/getofaccount:<name>(an instance’s host,github.com; else the source’s id), never carried by the call. The core answers it from its accounts: the one the user gave, or the one of the host’s CLI (gh auth token); - one client per account and token, kept: what a client learns (a host’s conditional reads, its limits) serves the next call. A token changed makes a new one;
- the typed errors as the protocol’s codes: an HTTP error
-(32000 + status)(401: « reconnect the account »), a lasting refusal-32010, a call the host cannot do-32601; - the budget of calls in each answer of a host:
{ value, rateLimit }, which the core keeps for the account (the sources and the hosts of a plugin spend the same).
Structs§
- Credentials
- What an account gives its client: where its instance is, and its credentials.
- Hosts
- The service of a plugin’s code hosts and sources: a
serve::Pluginthat answersaccount/me,forge/*andtickets/*, and refuses the rest. - States
View - The states of a container and the state each column gives by default (
doing,review,done).
Traits§
- Forge
Kind - A kind of code host a plugin serves (
contributes.forges). - Source
Kind - A kind of source a plugin serves (
contributes.ticketSources). - Ticket
Source - A source’s client for one account, the plugin’s side of
tickets/*.
Functions§
- refusal
- What a failed call of a client is on the protocol: the code of its type, its message as it reads.