Skip to content

Add default_branch support for Project API

Vasilii Iakliushin requested to merge 26261_support_default_branch into master

What does this MR do?

Contributes to #26261 (closed)

Set default_branch value as a default branch name for non-empty repositories.

Screenshots (strongly suggested)

curl --request POST --header "PRIVATE-TOKEN: <private_token>" -d '{ "name": "project-test003", "initialize_with_readme": "true", "default_branch": "stable" }' -H "Content-Type: application/json" "http://127.0.0.1:3000/api/v4/projects"

Screenshot_2021-06-10_at_16.02.33

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Vasilii Iakliushin

Merge request reports