Skip to content

Commit f5c855d

Browse files
committed
Set the default branch for repositories generated from templates
1 parent 60fbaa9 commit f5c855d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

modules/repository/generate.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,7 @@ func GenerateRepository(ctx context.Context, doer, owner *user_model.User, templ
249249
Name: opts.Name,
250250
LowerName: strings.ToLower(opts.Name),
251251
Description: opts.Description,
252+
DefaultBranch: templateRepo.DefaultBranch,
252253
IsPrivate: opts.Private,
253254
IsEmpty: !opts.GitContent || templateRepo.IsEmpty,
254255
IsFsckEnabled: templateRepo.IsFsckEnabled,

0 commit comments

Comments
 (0)