diff options
Diffstat (limited to 'models/repo.go')
-rw-r--r-- | models/repo.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/models/repo.go b/models/repo.go index 507521357e..3e593ce4ed 100644 --- a/models/repo.go +++ b/models/repo.go @@ -1098,6 +1098,7 @@ type CreateRepoOptions struct { Description string OriginalURL string Gitignores string + IssueLabels string License string Readme string IsPrivate bool @@ -1394,6 +1395,13 @@ func CreateRepository(doer, u *User, opts CreateRepoOptions) (_ *Repository, err return nil, fmt.Errorf("initRepository: %v", err) } + // Initialize Issue Labels if selected + if len(opts.IssueLabels) > 0 { + if err = initalizeLabels(sess, repo.ID, opts.IssueLabels); err != nil { + return nil, fmt.Errorf("initalizeLabels: %v", err) + } + } + _, stderr, err := process.GetManager().ExecDir(-1, repoPath, fmt.Sprintf("CreateRepository(git update-server-info): %s", repoPath), git.GitExecutable, "update-server-info") |