Skip to content

Commit 33db79e

Browse files
committed
Merge remote-tracking branch 'giteaofficial/main'
* giteaofficial/main: [skip ci] Updated translations via Crowdin Show fullname on issue edits and gpg/ssh signing info (go-gitea#18827) Update go-org to 1.6.0 (go-gitea#18824) Fix login with email for ldap users (go-gitea#18800) [skip ci] Updated licenses and gitignores Immediately Hammer if second kill is sent (go-gitea#18823)
2 parents 7667437 + 15a4b1d commit 33db79e

File tree

21 files changed

+724
-212
lines changed

21 files changed

+724
-212
lines changed

go.mod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ require (
8585
github.com/mrjones/oauth v0.0.0-20190623134757-126b35219450 // indirect
8686
github.com/msteinert/pam v0.0.0-20201130170657-e61372126161
8787
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646
88-
github.com/niklasfasching/go-org v1.5.0
88+
github.com/niklasfasching/go-org v1.6.0
8989
github.com/olekukonko/tablewriter v0.0.5 // indirect
9090
github.com/oliamb/cutter v0.2.2
9191
github.com/olivere/elastic/v7 v7.0.25
@@ -123,9 +123,9 @@ require (
123123
go.uber.org/multierr v1.7.0 // indirect
124124
go.uber.org/zap v1.19.0 // indirect
125125
golang.org/x/crypto v0.0.0-20211117183948-ae814b36b871
126-
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2
126+
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd
127127
golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914
128-
golang.org/x/sys v0.0.0-20211117180635-dee7805ff2e1
128+
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e
129129
golang.org/x/text v0.3.7
130130
golang.org/x/time v0.0.0-20210611083556-38a9dc6acbc6 // indirect
131131
golang.org/x/tools v0.1.0

go.sum

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko=
203203
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
204204
github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY=
205205
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
206+
github.com/chaseadamsio/goorgeous v2.0.0+incompatible/go.mod h1:6QaC0vFoKWYDth94dHFNgRT2YkT5FHdQp/Yx15aAAi0=
206207
github.com/chi-middleware/proxy v1.1.1 h1:4HaXUp8o2+bhHr1OhVy+VjN0+L7/07JDcn6v7YrTjrQ=
207208
github.com/chi-middleware/proxy v1.1.1/go.mod h1:jQwMEJct2tz9VmtCELxvnXoMfa+SOdikvbVJVHv/M+0=
208209
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
@@ -915,8 +916,8 @@ github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OS
915916
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 h1:zYyBkD/k9seD2A7fsi6Oo2LfFZAehjjQMERAvZLEDnQ=
916917
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646/go.mod h1:jpp1/29i3P1S/RLdc7JQKbRpFeM1dOBd8T9ki5s+AY8=
917918
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
918-
github.com/niklasfasching/go-org v1.5.0 h1:V8IwoSPm/d61bceyWFxxnQLtlvNT+CjiYIhtZLdnMF0=
919-
github.com/niklasfasching/go-org v1.5.0/go.mod h1:sSb8ylwnAG+h8MGFDB3R1D5bxf8wA08REfhjShg3kjA=
919+
github.com/niklasfasching/go-org v1.6.0 h1:NCWpmDDNjHNsrei6VmnYXzOiyZUxV8LVU19REGQ8dKA=
920+
github.com/niklasfasching/go-org v1.6.0/go.mod h1:gSHyFcAbr2thIpfljLsP/BB8uwAMyooq6ydIrUDdOCs=
920921
github.com/nwaples/rardecode v1.1.0 h1:vSxaY8vQhOcVr4mm5e8XllHWTiM4JF507A0Katqw7MQ=
921922
github.com/nwaples/rardecode v1.1.0/go.mod h1:5DzqNKiOdpKKBH87u8VlvAnPZMXcGRhxWkRpHbbfGS0=
922923
github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78=
@@ -1035,8 +1036,9 @@ github.com/rs/xid v1.3.0 h1:6NjYksEUlhurdVehpc7S7dk6DAmcKv8V9gG0FsVN2U4=
10351036
github.com/rs/xid v1.3.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg=
10361037
github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU=
10371038
github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc=
1038-
github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo=
10391039
github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
1040+
github.com/russross/blackfriday v1.6.0 h1:KqfZb0pUVN2lYqZUYRddxF4OR8ZMURnJIG5Y3VRLtww=
1041+
github.com/russross/blackfriday v1.6.0/go.mod h1:ti0ldHuxg49ri4ksnFxlkCfN+hvslNlmVHqNRXXJNAY=
10401042
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
10411043
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
10421044
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
@@ -1358,8 +1360,9 @@ golang.org/x/net v0.0.0-20210326060303-6b1517762897/go.mod h1:uSPa2vr4CLtc/ILN5o
13581360
golang.org/x/net v0.0.0-20210331060903-cb1fcc7394e5/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
13591361
golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
13601362
golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
1361-
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 h1:CIJ76btIcR3eFI5EgSo6k1qKw9KJexJuRLI9G7Hp5wE=
13621363
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
1364+
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd h1:O7DYs+zxREGLKzKoMQrtrEacpb0ZVXA5rIwylE2Xchk=
1365+
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
13631366
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
13641367
golang.org/x/oauth2 v0.0.0-20181106182150-f42d05182288/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
13651368
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -1465,11 +1468,13 @@ golang.org/x/sys v0.0.0-20210525143221-35b2ab0089ea/go.mod h1:oPkhp1MJrh7nUepCBc
14651468
golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
14661469
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
14671470
golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
1468-
golang.org/x/sys v0.0.0-20211117180635-dee7805ff2e1 h1:kwrAHlwJ0DUBZwQ238v+Uod/3eZ8B2K5rYsUHBQvzmI=
14691471
golang.org/x/sys v0.0.0-20211117180635-dee7805ff2e1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
1472+
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e h1:fLOSk5Q00efkSvAm+4xcoXD+RRmLmmulPn5I3Y9F2EM=
1473+
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
14701474
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
1471-
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 h1:v+OssWQX+hTHEmOBgwxdZxK4zHq3yOs8F9J7mk0PY8E=
14721475
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
1476+
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY=
1477+
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
14731478
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
14741479
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
14751480
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=

models/issues/content_history.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ func QueryIssueContentHistoryEditedCountMap(dbCtx context.Context, issueID int64
137137
type IssueContentListItem struct {
138138
UserID int64
139139
UserName string
140+
UserFullName string
140141
UserAvatarLink string
141142

142143
HistoryID int64
@@ -148,7 +149,7 @@ type IssueContentListItem struct {
148149
// FetchIssueContentHistoryList fetch list
149150
func FetchIssueContentHistoryList(dbCtx context.Context, issueID, commentID int64) ([]*IssueContentListItem, error) {
150151
res := make([]*IssueContentListItem, 0)
151-
err := db.GetEngine(dbCtx).Select("u.id as user_id, u.name as user_name,"+
152+
err := db.GetEngine(dbCtx).Select("u.id as user_id, u.name as user_name, u.full_name as user_full_name,"+
152153
"h.id as history_id, h.edited_unix, h.is_first_created, h.is_deleted").
153154
Table([]string{"issue_content_history", "h"}).
154155
Join("LEFT", []string{"user", "u"}, "h.poster_id = u.id").

models/issues/content_history_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,9 @@ func TestContentHistory(t *testing.T) {
4343
when the refactor of models are done, this test will be possible to be run then with a real `User` model.
4444
*/
4545
type User struct {
46-
ID int64
47-
Name string
46+
ID int64
47+
Name string
48+
FullName string
4849
}
4950
_ = dbEngine.Sync2(&User{})
5051

modules/graceful/manager.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ func (g *Manager) RunAtHammer(hammer func()) {
193193

194194
func (g *Manager) doShutdown() {
195195
if !g.setStateTransition(stateRunning, stateShuttingDown) {
196+
g.DoImmediateHammer()
196197
return
197198
}
198199
g.lock.Lock()

modules/graceful/manager_unix.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,12 @@ func (g *Manager) DoGracefulRestart() {
168168
if setting.GracefulRestartable {
169169
log.Info("PID: %d. Forking...", os.Getpid())
170170
err := g.doFork()
171-
if err != nil && err.Error() != "another process already forked. Ignoring this one" {
172-
log.Error("Error whilst forking from PID: %d : %v", os.Getpid(), err)
171+
if err != nil {
172+
if err.Error() == "another process already forked. Ignoring this one" {
173+
g.DoImmediateHammer()
174+
} else {
175+
log.Error("Error whilst forking from PID: %d : %v", os.Getpid(), err)
176+
}
173177
}
174178
} else {
175179
log.Info("PID: %d. Not set restartable. Shutting down...", os.Getpid())

options/gitignore/Android

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ output.json
1818
# IntelliJ
1919
*.iml
2020
.idea/
21+
misc.xml
22+
deploymentTargetDropDown.xml
23+
render.experimental.xml
2124

2225
# Keystore files
2326
*.jks

options/gitignore/CDK

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# CDK asset staging directory.
2+
# For more information about AWS-CDK, see https://docs.aws.amazon.com/cdk/
3+
.cdk.staging/
4+
cdk.out/

options/gitignore/Gradle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ gradle-app.setting
88
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
99
!gradle-wrapper.jar
1010

11+
# Avoid ignore Gradle wrappper properties
12+
!gradle-wrapper.properties
13+
1114
# Cache of project
1215
.gradletasknamecache
1316

options/gitignore/Perl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ cover_db/
1313
# Devel::NYTProf
1414
nytprof.out
1515

16-
# Dizt::Zilla
16+
# Dist::Zilla
1717
/.build/
1818

1919
# Module::Build

options/gitignore/Python

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ dmypy.json
145145
cython_debug/
146146

147147
# PyCharm
148-
# JetBrains specific template is maintainted in a separate JetBrains.gitignore that can
148+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
149149
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
150150
# and can be added to the global gitignore or merged into this file. For a more nuclear
151151
# option (not recommended) you can uncomment the following to ignore the entire idea folder.

options/gitignore/Terraform

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ crash.*.log
1313
# password, private keys, and other secrets. These should not be part of version
1414
# control as they are data points which are potentially sensitive and subject
1515
# to change depending on the environment.
16-
#
1716
*.tfvars
17+
*.tfvars.json
1818

1919
# Ignore override files as they are usually used to override resources locally and so
2020
# are not checked in
@@ -24,7 +24,6 @@ override.tf.json
2424
*_override.tf.json
2525

2626
# Include override files you do wish to add to version control using negated pattern
27-
#
2827
# !example_override.tf
2928

3029
# Include tfplan files to ignore the plan output of command: terraform plan -out=tfplan

options/gitignore/Toit

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.packages
2+
*_pb.toit

options/gitignore/VisualStudio

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ node_modules/
301301
*.dsw
302302
*.dsp
303303

304-
# Visual Studio 6 technical files
304+
# Visual Studio 6 technical files
305305
*.ncb
306306
*.aps
307307

0 commit comments

Comments
 (0)