Forge connections
Forge connections link Jaah and its users to GitHub, GitLab, Bitbucket and Azure DevOps. Start a connection, list installations, and manage each user's per-forge connection.
List forge installations
Reports whether the current user's connected GitHub account reaches the GitHub App installations for the repository owners their projects use, with the install link. `state` is `unknown` when this cannot be determined.
Start git connect
Starts connecting the current user's GitHub account and returns the `authorize_url` to open in the browser. Nothing is saved until the user completes the flow. Returns 503 when GitHub connecting is not set up.
Start forge connect
Starts connecting the current user's account on the named forge, such as GitLab, Bitbucket or Azure DevOps, and returns the `authorize_url` to open. Returns 409 when connecting that forge is not set up.
List git connections
Lists the current user's git connections, one per forge plus each self-managed GitLab they connected, with each one's state: `connected`, `needs_reconnect` or `not_connected`. Only the caller's own user id is accepted; any other returns 404.
Delete git connection
Disconnects the caller's git connection for one forge host, leaving other connections and the credential itself in place. Returns 204 with no body.
Set git connection
Connects an existing git credential to the forge host named in the path for the caller; only the caller's own user id is accepted (404 otherwise). The credential must be one the caller may use, of a git type and for that host, or it returns 422. Returns the updated connection.
Save a pasted git connection
Connects a forge host with a pasted personal access credential after testing it against the forge; a rejected one returns 422 with the forge's reason. Stores it as the caller's own credential, replacing an earlier paste for the same host, and returns 201 with the connection.
List a user's git connections by forge
Lists the git credentials a given user may use, with id, name and type, for choosing their git access. Pass `root` to keep only credentials for one forge host. Requires permission to view users.