Skip to content

Commit 976d700

Browse files
committed
Merge branch 'main' into lunny/config_provider
2 parents ed14463 + ce9c1dd commit 976d700

Some content is hidden

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

45 files changed

+472
-1111
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ cpu.out
7171
/tests/e2e/test-artifacts
7272
/tests/e2e/test-snapshots
7373
/tests/*.ini
74+
/tests/**/*.git/**/*.sample
7475
/node_modules
7576
/yarn.lock
7677
/yarn-error.log

MAINTAINERS

+2-1
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,12 @@ Patrick Schratz <patrick.schratz@gmail.com> (@pat-s)
4141
Janis Estelmann <admin@oldschoolhack.me> (@KN4CK3R)
4242
Steven Kriegler <sk.bunsenbrenner@gmail.com> (@justusbunsi)
4343
Jimmy Praet <jimmy.praet@telenet.be> (@jpraet)
44-
Leon Hofmeister <dev.lh@web.de> (@delvh)
44+
Leon Hofmeister <dev.lh@web.de> (@delvh)
4545
Wim <wim@42.be> (@42wim)
4646
Jason Song <i@wolfogre.com> (@wolfogre)
4747
Yarden Shoham <git@yardenshoham.com> (@yardenshoham)
4848
Yu Tian <zettat123@gmail.com> (@Zettat123)
4949
Eddie Yang <576951401@qq.com> (@yp05327)
5050
Dong Ge <gedong_1994@163.com> (@sillyguodong)
5151
Xinyi Gong <hestergong@gmail.com> (@HesterG)
52+
wxiaoguang <wxiaoguang@gmail.com> (@wxiaoguang)

assets/go-licenses.json

+5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

go.mod

+2-1
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,11 @@ require (
104104
github.com/yuin/goldmark-highlighting/v2 v2.0.0-20220924101305-151362477c87
105105
github.com/yuin/goldmark-meta v1.1.0
106106
golang.org/x/crypto v0.7.0
107+
golang.org/x/image v0.7.0
107108
golang.org/x/net v0.8.0
108109
golang.org/x/oauth2 v0.6.0
109110
golang.org/x/sys v0.6.0
110-
golang.org/x/text v0.8.0
111+
golang.org/x/text v0.9.0
111112
golang.org/x/tools v0.6.0
112113
google.golang.org/grpc v1.53.0
113114
google.golang.org/protobuf v1.28.1

go.sum

+8-2
Original file line numberDiff line numberDiff line change
@@ -1331,6 +1331,8 @@ golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EH
13311331
golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU=
13321332
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
13331333
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
1334+
golang.org/x/image v0.7.0 h1:gzS29xtG1J5ybQlv0PuyfE3nmc6R4qB73m6LUUmvFuw=
1335+
golang.org/x/image v0.7.0/go.mod h1:nd/q4ef1AKKYl/4kft7g+6UyGbdiqWqTP1ZAbRoV7Rg=
13341336
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
13351337
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
13361338
golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
@@ -1415,6 +1417,7 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug
14151417
golang.org/x/net v0.0.0-20220826154423-83b083e8dc8b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk=
14161418
golang.org/x/net v0.0.0-20220906165146-f3363e06e74c/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk=
14171419
golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY=
1420+
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
14181421
golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ=
14191422
golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc=
14201423
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
@@ -1533,13 +1536,15 @@ golang.org/x/sys v0.0.0-20220825204002-c680a09ffe64/go.mod h1:oPkhp1MJrh7nUepCBc
15331536
golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
15341537
golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
15351538
golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
1539+
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
15361540
golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ=
15371541
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
15381542
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
15391543
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
15401544
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
15411545
golang.org/x/term v0.0.0-20220722155259-a9ba230a4035/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
15421546
golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc=
1547+
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
15431548
golang.org/x/term v0.6.0 h1:clScbb1cHjoCkyRbWwBEUZ5H/tIFu5TAXIqaZD0Gcjw=
15441549
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
15451550
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
@@ -1551,8 +1556,9 @@ golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
15511556
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
15521557
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
15531558
golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
1554-
golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68=
1555-
golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
1559+
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
1560+
golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE=
1561+
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
15561562
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
15571563
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
15581564
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=

models/migrations/base/testlogger.go

-5
Original file line numberDiff line numberDiff line change
@@ -165,11 +165,6 @@ func (log *TestLogger) Init(config string) error {
165165
return nil
166166
}
167167

168-
// Content returns the content accumulated in the content provider
169-
func (log *TestLogger) Content() (string, error) {
170-
return "", fmt.Errorf("not supported")
171-
}
172-
173168
// Flush when log should be flushed
174169
func (log *TestLogger) Flush() {
175170
}

models/user/user.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ const (
6262
EmailNotificationsOnMention = "onmention"
6363
// EmailNotificationsDisabled indicates that the user would not like to be notified via email.
6464
EmailNotificationsDisabled = "disabled"
65-
// EmailNotificationsEnabled indicates that the user would like to receive all email notifications and your own
65+
// EmailNotificationsAndYourOwn indicates that the user would like to receive all email notifications and your own
6666
EmailNotificationsAndYourOwn = "andyourown"
6767
)
6868

modules/avatar/avatar.go

+2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ import (
1818

1919
"github.com/nfnt/resize"
2020
"github.com/oliamb/cutter"
21+
22+
_ "golang.org/x/image/webp" // for processing webp images
2123
)
2224

2325
// AvatarSize returns avatar's size

modules/log/buffer.go

-71
This file was deleted.

modules/log/buffer_test.go

-63
This file was deleted.

modules/log/conn.go

-5
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,6 @@ func (log *ConnLogger) Init(jsonconfig string) error {
118118
return nil
119119
}
120120

121-
// Content returns the content accumulated in the content provider
122-
func (log *ConnLogger) Content() (string, error) {
123-
return "", fmt.Errorf("not supported")
124-
}
125-
126121
// Flush does nothing for this implementation
127122
func (log *ConnLogger) Flush() {
128123
}

modules/log/console.go

-5
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,6 @@ func (log *ConsoleLogger) Init(config string) error {
6565
return nil
6666
}
6767

68-
// Content returns the content accumulated in the content provider
69-
func (log *ConsoleLogger) Content() (string, error) {
70-
return "", fmt.Errorf("not supported")
71-
}
72-
7368
// Flush when log should be flushed
7469
func (log *ConsoleLogger) Flush() {
7570
}

modules/log/event.go

+4-6
Original file line numberDiff line numberDiff line change
@@ -247,12 +247,6 @@ func (m *MultiChannelledLog) GetEventLogger(name string) EventLogger {
247247
return m.loggers[name]
248248
}
249249

250-
// GetEventProvider returns a sub logger provider content from this MultiChannelledLog
251-
func (m *MultiChannelledLog) GetLoggerProviderContent(name string) (string, error) {
252-
channelledLogger := m.GetEventLogger(name).(*ChannelledLog)
253-
return channelledLogger.loggerProvider.Content()
254-
}
255-
256250
// GetEventLoggerNames returns a list of names
257251
func (m *MultiChannelledLog) GetEventLoggerNames() []string {
258252
m.rwmutex.RLock()
@@ -460,3 +454,7 @@ func (m *MultiChannelledLog) ResetLevel() Level {
460454
func (m *MultiChannelledLog) GetName() string {
461455
return m.name
462456
}
457+
458+
func (e *Event) GetMsg() string {
459+
return e.msg
460+
}

modules/log/file.go

-9
Original file line numberDiff line numberDiff line change
@@ -253,15 +253,6 @@ func (log *FileLogger) deleteOldLog() {
253253
})
254254
}
255255

256-
// Content returns the content accumulated in the content provider
257-
func (log *FileLogger) Content() (string, error) {
258-
b, err := os.ReadFile(log.Filename)
259-
if err != nil {
260-
return "", err
261-
}
262-
return string(b), nil
263-
}
264-
265256
// Flush flush file logger.
266257
// there are no buffering messages in file logger in memory.
267258
// flush file means sync file from disk.

modules/log/provider.go

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ package log
66
// LoggerProvider represents behaviors of a logger provider.
77
type LoggerProvider interface {
88
Init(config string) error
9-
Content() (string, error)
109
EventLogger
1110
}
1211

modules/log/smtp.go

-5
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,6 @@ func (log *SMTPLogger) sendMail(p []byte) (int, error) {
9595
)
9696
}
9797

98-
// Content returns the content accumulated in the content provider
99-
func (log *SMTPLogger) Content() (string, error) {
100-
return "", fmt.Errorf("not supported")
101-
}
102-
10398
// Flush when log should be flushed
10499
func (log *SMTPLogger) Flush() {
105100
}

0 commit comments

Comments
 (0)