* Start work on templates Signed-off-by: jolheiser <[email protected]> * Continue work Signed-off-by: jolheiser <[email protected]> * Fix IsTemplate vs IsGenerated Signed-off-by: jolheiser <[email protected]> * Fix tabs vs spaces * Tabs vs Spaces * Add templates to API & start adding tests Signed-off-by: jolheiser <[email protected]> * Fix integration tests Signed-off-by: jolheiser <[email protected]> * Remove unused User Signed-off-by: jolheiser <[email protected]> * Move template tests to existing repos Signed-off-by: jolheiser <[email protected]> * Minor re-check updates and cleanup Signed-off-by: jolheiser <[email protected]> * make fmt Signed-off-by: jolheiser <[email protected]> * Test cleanup Signed-off-by: jolheiser <[email protected]> * Fix optionalbool Signed-off-by: jolheiser <[email protected]> * make fmt Signed-off-by: jolheiser <[email protected]> * Test fixes and icon change Signed-off-by: jolheiser <[email protected]> * Add new user and repo for tests Signed-off-by: jolheiser <[email protected]> * Fix tests (finally) Signed-off-by: jolheiser <[email protected]> * Update meta repo with env variables Signed-off-by: jolheiser <[email protected]> * Move generation to create page Combine with repo create template Modify API search to prioritize owner for repo Signed-off-by: jolheiser <[email protected]> * Fix tests and coverage Signed-off-by: jolheiser <[email protected]> * Fix swagger and JS lint Signed-off-by: jolheiser <[email protected]> * Fix API searching for own private repos Signed-off-by: jolheiser <[email protected]> * Change wording Signed-off-by: jolheiser <[email protected]> * Fix repo search test. User had a private repo that didn't show up Signed-off-by: jolheiser <[email protected]> * Another search test fix Signed-off-by: jolheiser <[email protected]> * Clarify git content Co-Authored-By: guillep2k <[email protected]> * Feedback updates Signed-off-by: jolheiser <[email protected]> * Add topics WIP Signed-off-by: jolheiser <[email protected]> * Finish adding topics Signed-off-by: jolheiser <[email protected]> * Update locale Signed-off-by: jolheiser <[email protected]>
20 lines
415 B
Go
20 lines
415 B
Go
// Copyright 2019 The Gitea Authors. All rights reserved.
|
|
// Use of this source code is governed by a MIT-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package migrations
|
|
|
|
import (
|
|
"xorm.io/xorm"
|
|
)
|
|
|
|
func addTemplateToRepo(x *xorm.Engine) error {
|
|
|
|
type Repository struct {
|
|
IsTemplate bool `xorm:"INDEX NOT NULL DEFAULT false"`
|
|
TemplateID int64 `xorm:"INDEX"`
|
|
}
|
|
|
|
return x.Sync2(new(Repository))
|
|
}
|