Skip to content

Commit ae9d629

Browse files
committed
Merge remote-tracking branch 'origin/main' into zzc/dev/sidebar_board_option
2 parents 7e1b786 + 1f8ac27 commit ae9d629

File tree

23 files changed

+326
-86
lines changed

23 files changed

+326
-86
lines changed

.devcontainer/devcontainer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
"ghcr.io/devcontainers-contrib/features/poetry:2": {},
1111
"ghcr.io/devcontainers/features/python:1": {
1212
"version": "3.12"
13-
}
13+
},
14+
"ghcr.io/warrenbuckley/codespace-features/sqlite:1": {}
1415
},
1516
"customizations": {
1617
"vscode": {
@@ -25,7 +26,7 @@
2526
"Vue.volar",
2627
"ms-azuretools.vscode-docker",
2728
"vitest.explorer",
28-
"qwtel.sqlite-viewer",
29+
"cweijan.vscode-database-client2",
2930
"GitHub.vscode-pull-request-github",
3031
"Azurite.azurite"
3132
]

.gitpod.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ vscode:
4343
- Vue.volar
4444
- ms-azuretools.vscode-docker
4545
- vitest.explorer
46-
- qwtel.sqlite-viewer
46+
- cweijan.vscode-database-client2
4747
- GitHub.vscode-pull-request-github
4848

4949
ports:

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ COMMA := ,
2525

2626
XGO_VERSION := go-1.22.x
2727

28-
AIR_PACKAGE ?= github.com/cosmtrek/air@v1
28+
AIR_PACKAGE ?= github.com/air-verse/air@v1
2929
EDITORCONFIG_CHECKER_PACKAGE ?= github.com/editorconfig-checker/editorconfig-checker/cmd/editorconfig-checker@2.7.0
3030
GOFUMPT_PACKAGE ?= mvdan.cc/gofumpt@v0.6.0
31-
GOLANGCI_LINT_PACKAGE ?= github.com/golangci/golangci-lint/cmd/golangci-lint@v1.57.2
31+
GOLANGCI_LINT_PACKAGE ?= github.com/golangci/golangci-lint/cmd/golangci-lint@v1.59.0
3232
GXZ_PACKAGE ?= github.com/ulikunitz/xz/cmd/gxz@v0.5.11
3333
MISSPELL_PACKAGE ?= github.com/golangci/misspell/cmd/misspell@v0.5.1
3434
SWAGGER_PACKAGE ?= github.com/go-swagger/go-swagger/cmd/swagger@db51e79a0e37c572d8b59ae0c58bf2bbbbe53285

custom/conf/app.example.ini

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1687,6 +1687,16 @@ LEVEL = Info
16871687
;; convert \r\n to \n for Sendmail
16881688
;SENDMAIL_CONVERT_CRLF = true
16891689

1690+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1691+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1692+
;[mailer.override_header]
1693+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1694+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1695+
;; This is empty by default, use it only if you know what you need it for.
1696+
;Reply-To = test@example.com, test2@example.com
1697+
;Content-Type = text/html; charset=utf-8
1698+
;In-Reply-To =
1699+
16901700
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
16911701
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
16921702
;[email.incoming]

docs/content/administration/config-cheat-sheet.en-us.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -724,11 +724,13 @@ Define allowed algorithms and their minimum key length (use -1 to disable a type
724724

725725
## Mailer (`mailer`)
726726

727-
⚠️ This section is for Gitea 1.18 and later. If you are using Gitea 1.17 or older,
727+
:::warning
728+
This section is for Gitea 1.18 and later. If you are using Gitea 1.17 or older,
728729
please refer to
729730
[Gitea 1.17 app.ini example](https://github.com/go-gitea/gitea/blob/release/v1.17/custom/conf/app.example.ini)
730731
and
731732
[Gitea 1.17 configuration document](https://github.com/go-gitea/gitea/blob/release/v1.17/docs/content/doc/advanced/config-cheat-sheet.en-us.md)
733+
:::
732734

733735
- `ENABLED`: **false**: Enable to use a mail service.
734736
- `PROTOCOL`: **_empty_**: Mail server protocol. One of "smtp", "smtps", "smtp+starttls", "smtp+unix", "sendmail", "dummy". _Before 1.18, this was inferred from a combination of `MAILER_TYPE` and `IS_TLS_ENABLED`._
@@ -761,6 +763,21 @@ and
761763
- `SEND_BUFFER_LEN`: **100**: Buffer length of mailing queue. **DEPRECATED** use `LENGTH` in `[queue.mailer]`
762764
- `SEND_AS_PLAIN_TEXT`: **false**: Send mails only in plain text, without HTML alternative.
763765

766+
## Override Email Headers (`mailer.override_header`)
767+
768+
:::warning
769+
This is empty by default, use it only if you know what you need it for.
770+
:::
771+
772+
examples would be:
773+
774+
```ini
775+
[mailer.override_header]
776+
Reply-To = test@example.com, test2@example.com
777+
Content-Type = text/html; charset=utf-8
778+
In-Reply-To =
779+
```
780+
764781
## Incoming Email (`email.incoming`)
765782

766783
- `ENABLED`: **false**: Enable handling of incoming emails.

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ require (
2020
github.com/Azure/go-ntlmssp v0.0.0-20221128193559-754e69321358
2121
github.com/ProtonMail/go-crypto v1.0.0
2222
github.com/PuerkitoBio/goquery v1.9.1
23-
github.com/alecthomas/chroma/v2 v2.13.0
23+
github.com/alecthomas/chroma/v2 v2.14.0
2424
github.com/blakesmith/ar v0.0.0-20190502131153-809d4375e1fb
2525
github.com/blevesearch/bleve/v2 v2.3.10
2626
github.com/buildkite/terminal-to-html/v3 v3.11.0

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,11 @@ github.com/RoaringBitmap/roaring v0.4.23/go.mod h1:D0gp8kJQgE1A4LQ5wFLggQEyvDi06
8282
github.com/RoaringBitmap/roaring v0.7.1/go.mod h1:jdT9ykXwHFNdJbEtxePexlFYH9LXucApeS0/+/g+p1I=
8383
github.com/RoaringBitmap/roaring v1.9.0 h1:lwKhr90/j0jVXJyh5X+vQN1VVn77rQFfYnh6RDRGCcE=
8484
github.com/RoaringBitmap/roaring v1.9.0/go.mod h1:6AXUsoIEzDTFFQCe1RbGA6uFONMhvejWj5rqITANK90=
85-
github.com/alecthomas/assert/v2 v2.6.0 h1:o3WJwILtexrEUk3cUVal3oiQY2tfgr/FHWiz/v2n4FU=
86-
github.com/alecthomas/assert/v2 v2.6.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k=
85+
github.com/alecthomas/assert/v2 v2.7.0 h1:QtqSACNS3tF7oasA8CU6A6sXZSBDqnm7RfpLl9bZqbE=
86+
github.com/alecthomas/assert/v2 v2.7.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k=
8787
github.com/alecthomas/chroma/v2 v2.2.0/go.mod h1:vf4zrexSH54oEjJ7EdB65tGNHmH3pGZmVkgTP5RHvAs=
88-
github.com/alecthomas/chroma/v2 v2.13.0 h1:VP72+99Fb2zEcYM0MeaWJmV+xQvz5v5cxRHd+ooU1lI=
89-
github.com/alecthomas/chroma/v2 v2.13.0/go.mod h1:BUGjjsD+ndS6eX37YgTchSEG+Jg9Jv1GiZs9sqPqztk=
88+
github.com/alecthomas/chroma/v2 v2.14.0 h1:R3+wzpnUArGcQz7fCETQBzO5n9IMNi13iIs46aU4V9E=
89+
github.com/alecthomas/chroma/v2 v2.14.0/go.mod h1:QolEbTfmUHIMVpBqxeDnNBj2uoeI4EbYP4i6n68SG4I=
9090
github.com/alecthomas/repr v0.0.0-20220113201626-b1b626ac65ae/go.mod h1:2kn6fqh/zIyPLmm3ugklbEi5hg5wS435eygvNfaDQL8=
9191
github.com/alecthomas/repr v0.4.0 h1:GhI2A8MACjfegCPVq9f1FLvIBS+DrQ2KQBFZP1iFzXc=
9292
github.com/alecthomas/repr v0.4.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4=

modules/setting/mailer.go

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,15 @@ import (
1818
// Mailer represents mail service.
1919
type Mailer struct {
2020
// Mailer
21-
Name string `ini:"NAME"`
22-
From string `ini:"FROM"`
23-
EnvelopeFrom string `ini:"ENVELOPE_FROM"`
24-
OverrideEnvelopeFrom bool `ini:"-"`
25-
FromName string `ini:"-"`
26-
FromEmail string `ini:"-"`
27-
SendAsPlainText bool `ini:"SEND_AS_PLAIN_TEXT"`
28-
SubjectPrefix string `ini:"SUBJECT_PREFIX"`
21+
Name string `ini:"NAME"`
22+
From string `ini:"FROM"`
23+
EnvelopeFrom string `ini:"ENVELOPE_FROM"`
24+
OverrideEnvelopeFrom bool `ini:"-"`
25+
FromName string `ini:"-"`
26+
FromEmail string `ini:"-"`
27+
SendAsPlainText bool `ini:"SEND_AS_PLAIN_TEXT"`
28+
SubjectPrefix string `ini:"SUBJECT_PREFIX"`
29+
OverrideHeader map[string][]string `ini:"-"`
2930

3031
// SMTP sender
3132
Protocol string `ini:"PROTOCOL"`
@@ -151,6 +152,12 @@ func loadMailerFrom(rootCfg ConfigProvider) {
151152
log.Fatal("Unable to map [mailer] section on to MailService. Error: %v", err)
152153
}
153154

155+
overrideHeader := rootCfg.Section("mailer.override_header").Keys()
156+
MailService.OverrideHeader = make(map[string][]string)
157+
for _, key := range overrideHeader {
158+
MailService.OverrideHeader[key.Name()] = key.Strings(",")
159+
}
160+
154161
// Infer SMTPPort if not set
155162
if MailService.SMTPPort == "" {
156163
switch MailService.Protocol {

modules/structs/activity.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@ package structs
66
import "time"
77

88
type Activity struct {
9-
ID int64 `json:"id"`
10-
UserID int64 `json:"user_id"` // Receiver user
9+
ID int64 `json:"id"`
10+
UserID int64 `json:"user_id"` // Receiver user
11+
// the type of action
12+
//
13+
// enum: create_repo,rename_repo,star_repo,watch_repo,commit_repo,create_issue,create_pull_request,transfer_repo,push_tag,comment_issue,merge_pull_request,close_issue,reopen_issue,close_pull_request,reopen_pull_request,delete_tag,delete_branch,mirror_sync_push,mirror_sync_create,mirror_sync_delete,approve_pull_request,reject_pull_request,comment_pull,publish_release,pull_review_dismissed,pull_request_ready_for_review,auto_merge_pull_request
1114
OpType string `json:"op_type"`
1215
ActUserID int64 `json:"act_user_id"`
1316
ActUser *User `json:"act_user"`

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)