Set the branch a project deploys from
Changed onChanges 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.
Request
- Base URLhttps://api.volcano.dev
- Auth
- HTTP bearer
- or HTTP bearer
Path parameters
Project ID
Request body
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
Stable GitHub repository id (repository.id), the authoritative binding.
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.
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
ProjectAccessTokenwas added to the API
- info
- breaking
added the new path request parameter
id - breaking
the response's body type changed from no type to
objectfor status
17 more changes in this revision
- breaking