Builder

Keep the site in sync with a repository branch: every version becomes a commit, pushes come back as versions

put/builder/sessions/{sessionId}/github

Request

  • Base URL: https://hostingsurge.com/api/v1
  • URL: https://hostingsurge.com/api/v1/builder/sessions/{sessionId}/github
  • Auth: one of:
    • HTTP bearer
    • API key in cookie __Host-hs_session

Path parameters

sessionIdstring uuid required

Request body

installationIdstring required
repoFullNamestring required
branchstring

Default: the repository's default branch

start'push' | 'pull'

A repository that already has code: push = the builder's site replaces its files (in a new commit), pull = the builder takes the repository's code. Required then (409 conflict, reason repository_not_empty)

Response

Connected

state'not_connected' | 'pending' | 'synced' | 'ahead' | 'behind' | 'diverged' | 'error' required
availableboolean required

Whether this server can reach customers' repositories (the GitHub App's key is configured)

installationIdstring nullable required
accountLoginstring nullable required
repoFullNamestring nullable required
repoUrlstring nullable required
branchstring nullable required
syncBranch'hostingsurge-sync' required
pullRequestUrlstring nullable required

diverged: where to open the pull request from hostingsurge-sync

lastSyncedAtstring nullable required

ISO-8601 timestamp

Changes

No recorded changes to this operation across all 1 revision of this API.