-
- Downloads
Add default_branch support for Project API
Contributes to #26261 Set `default_branch` value as a default branch name for non-empty repositories. Changelog: fixed
parent
74736916
No related branches found
No related tags found
Showing
- app/services/projects/create_service.rb 2 additions, 1 deletionapp/services/projects/create_service.rb
- doc/api/projects.md 2 additions, 1 deletiondoc/api/projects.md
- lib/api/projects.rb 1 addition, 0 deletionslib/api/projects.rb
- spec/requests/api/projects_spec.rb 45 additions, 0 deletionsspec/requests/api/projects_spec.rb
- spec/services/projects/create_service_spec.rb 1 addition, 1 deletionspec/services/projects/create_service_spec.rb
... | ... | @@ -1171,7 +1171,7 @@ POST /projects |
| `ci_config_path` | string | **{dotted-circle}** No | The path to CI configuration file. | | ||
| `container_expiration_policy_attributes` | hash | **{dotted-circle}** No | Update the image cleanup policy for this project. Accepts: `cadence` (string), `keep_n` (integer), `older_than` (string), `name_regex` (string), `name_regex_delete` (string), `name_regex_keep` (string), `enabled` (boolean). Valid values for `cadence` are: `1d` (every day), `7d` (every week), `14d` (every two weeks), `1month` (every month), or `3month` (every quarter). | | ||
| `container_registry_enabled` | boolean | **{dotted-circle}** No | Enable container registry for this project. | | ||
| `default_branch` | string | **{dotted-circle}** No | The [default branch](../user/project/repository/branches/default.md) name. | | ||
| `default_branch` | string | **{dotted-circle}** No | The [default branch](../user/project/repository/branches/default.md) name. Requires `initialize_with_readme` to be `true`. | | ||
|
||
| `description` | string | **{dotted-circle}** No | Short project description. | | ||
| `emails_disabled` | boolean | **{dotted-circle}** No | Disable email notifications. | | ||
| `external_authorization_classification_label` **(PREMIUM)** | string | **{dotted-circle}** No | The classification label for the project. | | ||
... | ... | @@ -1246,6 +1246,7 @@ POST /projects/user/:user_id |
| `ci_config_path` | string | **{dotted-circle}** No | The path to CI configuration file. | | ||
| `container_registry_enabled` | boolean | **{dotted-circle}** No | Enable container registry for this project. | | ||
| `description` | string | **{dotted-circle}** No | Short project description. | | ||
| `default_branch` | string | **{dotted-circle}** No | The [default branch](../user/project/repository/branches/default.md) name. Requires `initialize_with_readme` to be `true`. | | ||
| `emails_disabled` | boolean | **{dotted-circle}** No | Disable email notifications. | | ||
| `external_authorization_classification_label` **(PREMIUM)** | string | **{dotted-circle}** No | The classification label for the project. | | ||
| `forking_access_level` | string | **{dotted-circle}** No | One of `disabled`, `private`, or `enabled`. | | ||
... | ... |
-
mentioned in merge request kubitus-project/kubitus-installer!39 (merged)