Projects
Git Connections

Set the branch a project deploys from

Changed on

Changes only the production branch, leaving the repository binding alone. PUT /projects/{id}/git-connection can also set it, but that is a full rebind: it needs connection_id, installation_id and a repository selector resent, and re-resolves the repository against GitHub for a field that does not depend on it.

The branch does not have to exist. It is validated as a Git branch name and nothing more, so a project can be pointed at a branch that is about to be pushed — the case a repository created empty depends on.

Setting the branch here marks it as the project's own choice, so a later default-branch rename on GitHub no longer moves it. Projects that never set one keep following the repository's default branch.

put/projects/{id}/git-connection/production-branch

Request

  • Base URL
    https://api.volcano.dev
  • Auth
    • HTTP bearer
    • or HTTP bearer

Path parameters

id, string uuid required

Project ID

Request body

SetProjectGitProductionBranchRequest required
production_branch, string required

The branch a push must land on to deploy. Validated as a Git branch name only — it does not have to exist yet.

Response

The project's repo connection, with the new branch

ProjectGitConnection required
repo_installation_id, integer required
repo_id, integer required

Stable GitHub repository id (repository.id), the authoritative binding.

repo_full_name, string required
root_directory, string required
production_branch, string required

The branch a push must land on to deploy. Follows the repository's GitHub default branch unless the project set its own, which a default-branch rename on GitHub then leaves alone.

updated_at, string date-time required

When the connection last changed: its repository, root directory or production branch. Naming the branch it already uses, and other changes to the project, leave it alone. A connection that has not changed since Volcano began tracking this reports the project's last change before then.

Changes

    • info

      the endpoint scheme security ProjectAccessToken was added to the API

    • breaking

      added the new path request parameter id

    • breaking

      the response's body type changed from no type to object for status

    17 more changes in this revision