Skip to content

Deployments: editor guide

Deployments connects Capell to the Git repository used for package changes. An authorised package workflow can add a Composer requirement by direct commit or pull request, and Capell then shows the provider’s check status. The package does not run or roll back the server deployment itself; a failed provider check still needs attention in the repository or deployment platform.

Run the package migrations and configure an OAuth client ID and secret for at least one supported provider: GitHub, GitLab, or Bitbucket. The provider application must allow the Capell callback route and have enough repository access to read composer.json, create commits and branches, open or close pull requests, and read check status. System health reports when no provider OAuth client is configured.

The page is available only while capell-deployments.enabled is enabled. There is no in-admin OAuth settings form; a developer or host operator supplies the credentials through the capell-deployments configuration.

Open System > Deployment Repository. A connection summary can also appear on the System health dashboard.

  • View:DeploymentConnectionPage can see active repository coordinates, install policy, and recent publication details.
  • Manage:DeploymentConnectionPage can connect or disconnect repositories and cancel eligible pull-request publications. Publishing a Composer change also requires a global administrator (an account not limited to particular sites) who holds this permission, because the change reaches the repository every site is deployed from; every other account is refused before anything is recorded.

Enter the repository owner or group and repository name, choose an install policy, then select the configured Git provider. The connection is completed on the provider’s OAuth screen.

  • Direct commit writes the Composer change to the repository’s default branch. Use this only when branch protection and your release process make direct changes acceptable.
  • Pull request, auto-merge on green CI creates a package branch and pull request and requests auto-merge when the provider reports successful checks.
  • Pull request, manual review leaves the pull request for a person to review and merge.

The standard publishing integration refuses to guess when more than one active repository connection exists. Keep one active connection unless the calling integration explicitly selects a repository. Disconnecting asks for confirmation, deletes the stored access and refresh tokens and hides the connection, but keeps its publication history. Capell revokes supported GitHub and GitLab tokens before deleting its saved credentials. If the provider refuses, the credentials stay available for another attempt. Bitbucket, unreadable tokens and missing OAuth app credentials require manual revocation in the provider account settings, with a warning shown after local disconnection. Disconnecting does not undo commits, close unrelated pull requests or reverse a deployment that already ran. Connecting the same repository again reactivates it.

Publication starts from the Marketplace. While exactly one connection is active, Deployments offers Marketplace its publisher, and Marketplace reports deploy-time installs as automated. When a global administrator then installs or updates an extension from the Marketplace and the change needs a deployment, Marketplace hands its Composer requirement to Deployments. Deployments writes it to that connection under its install policy and records the publication here. The install or update attempt records the pull request or commit. With no active connection, or with several, Marketplace sees no publisher and falls back to the Composer command as before. When the actor is refused or the provider fails, the handoff fails and Marketplace also falls back to the Composer command. Publishes to one repository run one at a time, and each attempt is published at most once. A provider failure before recording releases its authorisation for retry before expiry; Marketplace may offer its Composer-command fallback. Uninstalling an extension with Delete package from Composer also takes its requirement out of composer.json. The global administrator’s approval is recorded when the uninstall is queued, bound to that attempt, the exact package list, the actor and the repository connected at that moment, and the queue worker publishes only on that approval (valid for an hour, used once). The worker re-checks that the actor still holds the deployment permission and that the same single repository is connected, then commits against the head it read, retrying from the new head if another change lands first and failing without writing after three moves. With no active connection, several, a site-scoped actor or a revoked permission, nothing is written and Marketplace shows the manual step. Deployment Repository has no general-purpose deploy button. The page shows the five most recent Composer publications per connection, including package and constraint, status, branch, commit or pull-request reference, and time. Non-final provider status is refreshed when the page is viewed, no more than once every five minutes. A Requirement-change preview (the stored dry_run status) reads composer.json, validates the package name and version constraint syntax and any supplied repository URL against host policy, and prepares the proposed JSON change without writing it to the provider. The result includes the proposed RepoFile; the history shows the package and constraint alongside the performed and remaining checks. It does not run Composer dependency resolution, update the lockfile, install packages, exercise package lifecycle, run tests or deploy. A syntactically valid requirement can still conflict with the host. Complete these steps in the host’s verification workflow before relying on compatibility.

Review the proposed requirement against the host repository, run Composer dependency resolution there and review the resulting lockfile, then run the host’s installation/lifecycle checks and tests before deployment. Use that repository’s documented CI and deployment checks; this package does not supply or attest those checks. Host publish hooks can add checks, but the default preview does not claim them.

Only one publish runs against a repository at a time; a second one waits briefly and then fails with a message to try again. If a publish stops part-way (for example the branch was created but the pull request was not opened), its authorisation is handed back so the same request can be retried before it expires; the retry reuses an open pull request, or chooses the next free branch name when the abandoned branch has no pull request. Existing branches are never reset or deleted. GitHub neutral and skipped checks, and GitLab skipped jobs, do not block auto-merge, but at least one check must pass. A publication whose checks are still pending after pending_timeout_hours (24 by default) is marked Checks never finished and is no longer polled.

You can cancel a non-final pull-request publication while it still has a provider pull request. Cancellation closes that pull request and marks the Capell record cancelled; it cannot cancel a direct commit or a successful publication, and it is not a rollback.

If a publication is Failed, open its provider reference and inspect the repository checks or deployment pipeline. Fix provider credentials, branch protection, Composer resolution, or the external CI failure there, then retry from the workflow that requested the package change. If OAuth reports an invalid session or token exchange failure, start the connection again; expired GitLab and Bitbucket tokens are refreshed automatically when a usable refresh token is available, but a failed refresh keeps the existing connection rather than silently replacing it.

Access and refresh tokens are stored encrypted and are never included when a connection is serialised. If they can no longer be decrypted (for example after the application key changes), the connection shows a reconnect message and every provider call refuses to run until you disconnect and connect it again. OAuth sign-in attempts expire after ten minutes. Capell also stores the provider, repository coordinates, default branch, install policy, package name and constraint, branch, commit SHA, pull-request reference, status, and timestamps. Treat view access as repository metadata access. Any extra Composer repository URL supplied by an integration must use HTTPS on an approved host; credential-bearing and unapproved URLs are rejected.