diff options
author | zeripath <art27@cantab.net> | 2020-03-26 19:14:51 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-26 19:14:51 +0000 |
commit | 52cfd2743c0e85b36081cf80a850e6a5901f1865 (patch) | |
tree | 9b13df2465992cf00fdeb375dd04bd7c17c09f65 /modules/structs/repo.go | |
parent | b1c331c84596f73aeab60178daf92f3539e026b9 (diff) | |
download | gitea-52cfd2743c0e85b36081cf80a850e6a5901f1865.tar.gz gitea-52cfd2743c0e85b36081cf80a850e6a5901f1865.zip |
Option to set default branch at repository creation (#10803)
* Option to set default branch at repository creation
* Handle template repos with non-default master branch
* Add DefaultBranch handling on creation to API
Fix #9542
Signed-off-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'modules/structs/repo.go')
-rw-r--r-- | modules/structs/repo.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/structs/repo.go b/modules/structs/repo.go index 04cc594f22..cabb5e12f9 100644 --- a/modules/structs/repo.go +++ b/modules/structs/repo.go @@ -112,6 +112,8 @@ type CreateRepoOption struct { License string `json:"license"` // Readme of the repository to create Readme string `json:"readme"` + // DefaultBranch of the repository (used when initializes and in template) + DefaultBranch string `json:"default_branch" binding:"GitRefName;MaxSize(100)"` } // EditRepoOption options when editing a repository's properties |