From 52cfd2743c0e85b36081cf80a850e6a5901f1865 Mon Sep 17 00:00:00 2001 From: zeripath Date: Thu, 26 Mar 2020 19:14:51 +0000 Subject: 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 --- modules/auth/repo_form.go | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'modules/auth') 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 -- cgit v1.2.3