Git providers
Detect how a repository builds
How Cloud would build a directory of a GitHub repository.
Updated
https://cloud.cahaves.com/api/git-providers/{id}/detect
Authorization
cahaves.cloud.sessionstringcookierequired
The session cookie Cloud sets when a customer signs in to the console with GitHub or Google. It is HttpOnly, so scripts cannot read it, and there are no API keys or tokens yet.
Path parameters
idstring<uuid>required
Example: "2e7b9c1d-3f4a-4c8e-b5d6-7a9e0f1b2c3d"
Query parameters
repositorystring
The repository as owner and name. Absent answers every key null.
Example: "acme/web"
branchstring
The branch to read. Absent reads the repository's default branch.
Example: "main"
pathstring
The directory to read. Empty reads the repository root.
Example: "apps/web"
Headers
X-Cloud-Organizationstring<uuid>
The id of the organization the request works in, one the signed-in customer owns. Left out or empty, the request works in their oldest organization. Any other value answers 404 with `reason: "organization"`. A customer with no organization yet gets 409 "Create an organization first." from every route that works in one.
Example: "2f6c8e0a-4b1d-4e7f-9a3c-5d7e9f1b3a5c"
Responses
application/json
What was detected.
detectedobjectrequired
The rules are in Build settings. Creating a GitHub service without a build_type runs the same detection.