Documentation
¶
Overview ¶
Package github implements forge.Forge for GitHub via a GitHub App.
Index ¶
Constants ¶
const DefaultBaseURL = "https://api.github.com"
DefaultBaseURL is github.com's REST root. Tests inject a ghfake URL.
Variables ¶
This section is empty.
Functions ¶
func CheckRunToState ¶
func CheckRunToState(status, conclusion string) forge.CheckState
CheckRunToState maps a GitHub check run back to a forge.CheckState. Unfinished runs are pending; neutral/skipped count as success so they do not block the queue.
func InstallationSource ¶
InstallationSource refreshes the App's installation→repo map and returns every repo the App can see. Installation presence is the authorization signal on GitHub, so no further filtering is needed.
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
App holds a GitHub App identity and vends per-installation API clients.
GitHub Apps cannot act on a repository without an installation that covers it, so the repo→installation map is the routing table for every API call.
func NewApp ¶
NewApp constructs an App. baseURL must be the REST root (e.g. https://api.github.com or http://127.0.0.1:PORT/api/v3 for ghfake).
Directories
¶
| Path | Synopsis |
|---|---|
|
It is not a faithful simulator: only the endpoints gitea-mq calls are implemented, with just enough state to drive the adapter and integration tests deterministically without network access.
|
It is not a faithful simulator: only the endpoints gitea-mq calls are implemented, with just enough state to drive the adapter and integration tests deterministically without network access. |