Skip to content

Commit 7c721f9

Browse files
Merge branch 'master' into api-repo-topics
2 parents 244cbd3 + e3115cc commit 7c721f9

File tree

447 files changed

+15351
-13582
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

447 files changed

+15351
-13582
lines changed

.golangci.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,6 @@ issues:
8686
- path: models/issue_comment_list.go
8787
linters:
8888
- dupl
89-
# "Destroy" is misspelled in github.com/go-macaron/session/session.go:213 so it's not our responsability to fix it
90-
- path: modules/session/virtual.go
91-
linters:
92-
- misspell
93-
text: '`Destory` is a misspelling of `Destroy`'
94-
- path: modules/session/memory.go
95-
linters:
96-
- misspell
97-
text: '`Destory` is a misspelling of `Destroy`'
9889
- linters:
9990
- misspell
10091
text: '`Unknwon` is a misspelling of `Unknown`'

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,20 @@ This changelog goes through all the changes that have been made in each release
44
without substantial changes to our git log; to see the highlights of what has
55
been added to each release, please refer to the [blog](https://blog.gitea.io).
66

7+
## [1.9.2](https://github.com/go-gitea/gitea/releases/tag/v1.9.2) - 2019-08-22
8+
* BUGFIXES
9+
* Fix wrong sender when send slack webhook (#7918) (#7924)
10+
* Upload support text/plain; charset=utf8 (#7899)
11+
* Lfs/lock: round locked_at timestamp to second (#7872) (#7875)
12+
* Fix non existent milestone with 500 error (#7867) (#7873)
13+
* SECURITY
14+
* Fix No PGP signature on 1.9.1 tag (#7874)
15+
* Release built with go 1.12.9 to fix security fixes in golang std lib, ref: https://groups.google.com/forum/#!msg/golang-announce/oeMaeUnkvVE/a49yvTLqAAAJ
16+
* ENHANCEMENT
17+
* Fix pull creation with empty changes (#7920) (#7926)
18+
* BUILD
19+
* Drone/docker: prepare multi-arch release + provide arm64 image (#7571) (#7884)
20+
721
## [1.9.1](https://github.com/go-gitea/gitea/releases/tag/v1.9.1) - 2019-08-14
822
* BREAKING
923
* Add pagination for admin api get orgs and fix only list public orgs bug (#7742) (#7752)

cmd/cmd.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ func initDB() error {
3838

3939
func initDBDisableConsole(disableConsole bool) error {
4040
setting.NewContext()
41-
models.LoadConfigs()
41+
setting.InitDBConfig()
4242

4343
setting.NewXORMLogService(disableConsole)
4444
if err := models.SetEngine(); err != nil {

cmd/convert.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ func runConvert(ctx *cli.Context) error {
3131
log.Trace("AppWorkPath: %s", setting.AppWorkPath)
3232
log.Trace("Custom path: %s", setting.CustomPath)
3333
log.Trace("Log path: %s", setting.LogRootPath)
34-
models.LoadConfigs()
34+
setting.InitDBConfig()
3535

36-
if models.DbCfg.Type != "mysql" {
36+
if !setting.Database.UseMySQL {
3737
fmt.Println("This command can only be used with a MySQL database")
3838
return nil
3939
}

cmd/dump.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ import (
1717
"code.gitea.io/gitea/models"
1818
"code.gitea.io/gitea/modules/setting"
1919

20-
"github.com/Unknwon/cae/zip"
21-
"github.com/Unknwon/com"
20+
"github.com/unknwon/cae/zip"
21+
"github.com/unknwon/com"
2222
"github.com/urfave/cli"
2323
)
2424

@@ -58,7 +58,6 @@ It can be used for backup and capture Gitea server image to send to maintainer`,
5858
func runDump(ctx *cli.Context) error {
5959
setting.NewContext()
6060
setting.NewServices() // cannot access session settings otherwise
61-
models.LoadConfigs()
6261

6362
err := models.SetEngine()
6463
if err != nil {
@@ -104,8 +103,8 @@ func runDump(ctx *cli.Context) error {
104103
}
105104

106105
targetDBType := ctx.String("database")
107-
if len(targetDBType) > 0 && targetDBType != models.DbCfg.Type {
108-
log.Printf("Dumping database %s => %s...", models.DbCfg.Type, targetDBType)
106+
if len(targetDBType) > 0 && targetDBType != setting.Database.Type {
107+
log.Printf("Dumping database %s => %s...", setting.Database.Type, targetDBType)
109108
} else {
110109
log.Printf("Dumping database...")
111110
}

cmd/migrate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ func runMigrate(ctx *cli.Context) error {
3030
log.Trace("AppWorkPath: %s", setting.AppWorkPath)
3131
log.Trace("Custom path: %s", setting.CustomPath)
3232
log.Trace("Log path: %s", setting.LogRootPath)
33-
models.LoadConfigs()
33+
setting.InitDBConfig()
3434

3535
if err := models.NewEngine(migrations.Migrate); err != nil {
3636
log.Fatal("Failed to initialize ORM engine: %v", err)

cmd/serv.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ import (
2222
"code.gitea.io/gitea/modules/private"
2323
"code.gitea.io/gitea/modules/setting"
2424

25-
"github.com/Unknwon/com"
2625
"github.com/dgrijalva/jwt-go"
26+
"github.com/unknwon/com"
2727
"github.com/urfave/cli"
2828
)
2929

cmd/web.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ import (
1818
"code.gitea.io/gitea/routers"
1919
"code.gitea.io/gitea/routers/routes"
2020

21-
"github.com/Unknwon/com"
2221
context2 "github.com/gorilla/context"
22+
"github.com/unknwon/com"
2323
"github.com/urfave/cli"
2424
"golang.org/x/crypto/acme/autocert"
2525
ini "gopkg.in/ini.v1"

contrib/pr/checkout.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ import (
2727
"code.gitea.io/gitea/routers"
2828
"code.gitea.io/gitea/routers/routes"
2929

30-
"github.com/Unknwon/com"
3130
"github.com/go-xorm/xorm"
3231
context2 "github.com/gorilla/context"
32+
"github.com/unknwon/com"
3333
"gopkg.in/src-d/go-git.v4"
3434
"gopkg.in/src-d/go-git.v4/config"
3535
"gopkg.in/src-d/go-git.v4/plumbing"
@@ -79,16 +79,16 @@ func runPR() {
7979
setting.CheckLFSVersion()
8080
//models.LoadConfigs()
8181
/*
82-
models.DbCfg.Type = "sqlite3"
83-
models.DbCfg.Path = ":memory:"
84-
models.DbCfg.Timeout = 500
82+
setting.Database.Type = "sqlite3"
83+
setting.Database.Path = ":memory:"
84+
setting.Database.Timeout = 500
8585
*/
8686
db := setting.Cfg.Section("database")
8787
db.NewKey("DB_TYPE", "sqlite3")
8888
db.NewKey("PATH", ":memory:")
89-
setting.LogSQL = true
90-
models.LoadConfigs()
89+
9190
routers.NewServices()
91+
setting.Database.LogSQL = true
9292
//x, err = xorm.NewEngine("sqlite3", "file::memory:?cache=shared")
9393

9494
var helper testfixtures.Helper = &testfixtures.SQLite{}

custom/conf/app.ini.sample

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,10 @@ LOG_SQL = true
275275
DB_RETRIES = 10
276276
; Backoff time per DB retry (time.Duration)
277277
DB_RETRY_BACKOFF = 3s
278+
; Max idle database connections on connnection pool, default is 0
279+
MAX_IDLE_CONNS = 0
280+
; Database connection max life time, default is 3s
281+
CONN_MAX_LIFETIME = 3s
278282

279283
[indexer]
280284
; Issue indexer type, currently support: bleve or db, default is bleve
@@ -401,6 +405,9 @@ DEFAULT_ALLOW_CREATE_ORGANIZATION = true
401405
; Private is only for member of the organization
402406
; Public is for everyone
403407
DEFAULT_ORG_VISIBILITY = public
408+
; Default value for DefaultOrgMemberVisible
409+
; True will make the membership of the users visible when added to the organisation
410+
DEFAULT_ORG_MEMBER_VISIBLE = false
404411
; Default value for EnableDependencies
405412
; Repositories will use dependencies by default depending on this setting
406413
DEFAULT_ENABLE_DEPENDENCIES = true

0 commit comments

Comments
 (0)