Listing the deploy history
api.GetApplicationDeployments(appID) returns [][]squarecloud.Deployment — one inner slice per deploy. Every event in a group shares the same ID (the commit SHA-1, 40 hex chars) and walks through the lifecycle states: pending → clone → commit → restarting → success | error.
Branch is only populated on the "clone" event, and Files (Added, Removed, Modified) only on the "commit" event.Inspecting the current configuration
api.GetApplicationCurrentDeployment(appID) returns a squarecloud.DeploymentCurrent with the GitHub App linkage currently configured.
Linking via the Square Cloud GitHub App (recommended)
api.LinkApplicationGithubApp(appID, repoName, branch) links a GitHub repository to the application via the official GitHub App.
Linking via the legacy webhook flow
api.PostApplicationDeployWebhook(appID, accessToken) registers a GitHub Personal Access Token (ghp_* or github_pat_*) and returns the webhook URL to configure on GitHub.
Pass the token
"@" to remove the configured webhook.
