mirror of
https://github.com/go-gitea/gitea.git
synced 2026-04-04 03:35:05 +02:00
add group_id field to repo creation forms
This commit is contained in:
parent
92e1da2bd3
commit
902cf739b8
@ -288,6 +288,7 @@ func CreatePost(ctx *context.Context) {
|
||||
IsTemplate: form.Template,
|
||||
TrustModel: repo_model.DefaultTrustModel,
|
||||
ObjectFormatName: form.ObjectFormatName,
|
||||
GroupID: form.ParentGroupID,
|
||||
})
|
||||
if err == nil {
|
||||
log.Trace("Repository created [%d]: %s/%s", repo.ID, ctxUser.Name, repo.Name)
|
||||
@ -450,6 +451,7 @@ func SearchRepo(ctx *context.Context) {
|
||||
Template: optional.None[bool](),
|
||||
StarredByID: ctx.FormInt64("starredBy"),
|
||||
IncludeDescription: ctx.FormBool("includeDesc"),
|
||||
GroupID: ctx.FormInt64("group_id"),
|
||||
}
|
||||
|
||||
if ctx.FormString("template") != "" {
|
||||
@ -540,16 +542,18 @@ func SearchRepo(ctx *context.Context) {
|
||||
for i, repo := range repos {
|
||||
results[i] = &repo_service.WebSearchRepository{
|
||||
Repository: &api.Repository{
|
||||
ID: repo.ID,
|
||||
FullName: repo.FullName(),
|
||||
Fork: repo.IsFork,
|
||||
Private: repo.IsPrivate,
|
||||
Template: repo.IsTemplate,
|
||||
Mirror: repo.IsMirror,
|
||||
Stars: repo.NumStars,
|
||||
HTMLURL: repo.HTMLURL(ctx),
|
||||
Link: repo.Link(),
|
||||
Internal: !repo.IsPrivate && repo.Owner.Visibility == api.VisibleTypePrivate,
|
||||
ID: repo.ID,
|
||||
FullName: repo.FullName(),
|
||||
Fork: repo.IsFork,
|
||||
Private: repo.IsPrivate,
|
||||
Template: repo.IsTemplate,
|
||||
Mirror: repo.IsMirror,
|
||||
Stars: repo.NumStars,
|
||||
HTMLURL: repo.HTMLURL(ctx),
|
||||
Link: repo.Link(),
|
||||
Internal: !repo.IsPrivate && repo.Owner.Visibility == api.VisibleTypePrivate,
|
||||
GroupSortOrder: repo.GroupSortOrder,
|
||||
GroupID: repo.GroupID,
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@ -43,6 +43,7 @@ type CreateRepoForm struct {
|
||||
|
||||
ForkSingleBranch string `binding:"MaxSize(255)"`
|
||||
ObjectFormatName string
|
||||
ParentGroupID int64
|
||||
}
|
||||
|
||||
// Validate validates the fields
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user