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/auth | |
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/auth')
-rw-r--r-- | modules/auth/repo_form.go | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/modules/auth/repo_form.go b/modules/auth/repo_form.go index 63a560728a..84ab35f649 100644 --- a/modules/auth/repo_form.go +++ b/modules/auth/repo_form.go @@ -27,15 +27,16 @@ import ( // CreateRepoForm form for creating repository type CreateRepoForm struct { - UID int64 `binding:"Required"` - RepoName string `binding:"Required;AlphaDashDot;MaxSize(100)"` - Private bool - Description string `binding:"MaxSize(255)"` - AutoInit bool - Gitignores string - IssueLabels string - License string - Readme string + UID int64 `binding:"Required"` + RepoName string `binding:"Required;AlphaDashDot;MaxSize(100)"` + Private bool + Description string `binding:"MaxSize(255)"` + DefaultBranch string `binding:"GitRefName;MaxSize(100)"` + AutoInit bool + Gitignores string + IssueLabels string + License string + Readme string RepoTemplate int64 GitContent bool |