Skip to main content
app.deploys exposes the DeploysModule, which covers both the deploy timeline and the two GitHub integration paths.

Listing the deploy history

app.deploys.list() returns Deployment[][]one inner array per deploy, each walking through the lifecycle states: pending → clone → commit → restarting → success | error.
Flatten the result if you want a single chronological list:
In v3 this method returned a flat Deployment[]. v4 returns Deployment[][] so you can group events by deploy. Use .flat() to keep the old shape.
Deployment.id is now a plain commit SHA-1 (40 hex chars). In v3 it was formatted as `git-${string}`.
app.deploys.linkGithubApp({ repositoryName, repositoryBranch }) links a GitHub repository to the application via the official GitHub App.
To remove the link:
linkGithubApp and unlinkGithubApp require a session token (JWT) as your API key — plain API keys are not accepted by these endpoints.

Linking via the legacy webhook flow

app.deploys.integrateGithubWebhook(accessToken) configures the legacy webhook-based integration using a GitHub Personal Access Token.
Pass "@" to remove the webhook:

Inspecting the current configuration

app.deploys.current() returns the GitHub App linkage and webhook URL currently configured, if any.
There is also a shortcut app.deploys.webhookURL() that returns only the webhook URL (or undefined).