complate list of gitignores and licenses

This commit is contained in:
Unknwon 2015-08-28 16:44:04 +08:00
parent 4cfa2ca40d
commit 46bee50e45
223 changed files with 10197 additions and 3818 deletions

View file

@ -44,7 +44,7 @@ var (
)
var (
Gitignores, Licenses []string
Gitignores, Licenses, Readmes []string
)
var (
@ -52,9 +52,9 @@ var (
)
func LoadRepoConfig() {
// Load .gitignore and license files.
types := []string{"gitignore", "license"}
typeFiles := make([][]string, 2)
// Load .gitignore and license files and readme templates.
types := []string{"gitignore", "license", "readme"}
typeFiles := make([][]string, 3)
for i, t := range types {
files, err := bindata.AssetDir("conf/" + t)
if err != nil {
@ -78,8 +78,10 @@ func LoadRepoConfig() {
Gitignores = typeFiles[0]
Licenses = typeFiles[1]
Readmes = typeFiles[2]
sort.Strings(Gitignores)
sort.Strings(Licenses)
sort.Strings(Readmes)
}
func NewRepoContext() {

View file

@ -69,6 +69,9 @@ type User struct {
Created time.Time `xorm:"CREATED"`
Updated time.Time `xorm:"UPDATED"`
// Remember visibility choice for convenience.
LastRepoVisibility bool
// Permissions.
IsActive bool
IsAdmin bool