NorthRealm
cc6c8d1b0d
Any other recipient?
2025-07-08 15:28:45 +08:00
NorthRealm
afe2deefbb
Merge branch 'patch3' into patch4
2025-07-08 15:16:42 +08:00
NorthRealm
2bac8d86d7
terrible
2025-07-08 15:00:35 +08:00
NorthRealm
d41aee8fa3
34982#discussion_r2191579495
2025-07-08 14:27:25 +08:00
NorthRealm
204f7ca886
stop if cannot render template
2025-07-08 14:25:03 +08:00
NorthRealm
8100f63457
silly
2025-07-08 14:21:57 +08:00
NorthRealm
53970ec4ed
Refactor
2025-07-08 14:09:38 +08:00
NorthRealm
a0737b1ff4
Decoration
2025-07-08 00:33:34 +08:00
NorthRealm
0126656260
Merge branch 'patch3' into patch4
2025-07-07 17:42:03 +08:00
NorthRealm
ed7b2bc242
Refactor
2025-07-07 17:41:26 +08:00
NorthRealm
bb5e10b519
fmt
2025-07-07 17:31:20 +08:00
NorthRealm
bf3559f0b5
MAILER
2025-07-07 17:12:30 +08:00
NorthRealm
bf468fee21
MAILER
2025-07-07 15:46:43 +08:00
NorthRealm
1f6c68d572
MAILER
2025-07-07 15:03:39 +08:00
NorthRealm
027c9fef2b
MAILER
2025-07-07 02:49:32 +08:00
NorthRealm
c8b64c7686
Refactor
2025-07-06 21:59:04 +08:00
wxiaoguang
81adb01713
Improve img lazy loading ( #34804 )
...
Related #32051 and #13526
2025-06-21 14:53:22 +08:00
silverwind
1f35435b81
Run gopls modernize on codebase ( #34751 )
...
Recent modernize fixes:
https://github.com/golang/tools/commits/master/gopls/internal/analysis/modernize
2025-06-18 01:48:09 +00:00
TheFox0x7
ee3c82f874
Enable addtional linters ( #34085 )
...
enable mirror, usestdlibbars and perfsprint
part of: https://github.com/go-gitea/gitea/issues/34083
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-04-01 10:14:01 +00:00
TheFox0x7
0fde8ecd55
Enable testifylint rules ( #34075 )
...
enable testifylint rules disabled in:
https://github.com/go-gitea/gitea/pull/34054
2025-03-31 01:53:48 -04:00
TheFox0x7
2a59dfbd47
enable staticcheck QFxxxx rules ( #34064 )
2025-03-29 17:32:28 -04:00
TheFox0x7
e7cf62f2f7
remove context from mail struct ( #33811 )
...
it can be passed by argument instead
2025-03-06 20:57:00 +00:00
sommerf-lf
7cdde20c73
Email option to embed images as base64 instead of link ( #32061 )
...
ref: #15081
ref: #14037
Documentation: https://gitea.com/gitea/docs/pulls/69
# Example
Content:

Result in Email:

Result with source code:
(first image is external image, 2nd is now embedded)

---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-03-05 16:29:29 +00:00
wxiaoguang
02657e85a4
Refactor mail code ( #33768 )
...
`mail.go` contains various different functions, it's time to split it.
2025-03-03 03:31:47 +00:00
TheFox0x7
cc1fdc84ca
Use test context in tests and new loop system in benchmarks ( #33648 )
...
Replace all contexts in tests with go1.24 t.Context()
---------
Co-authored-by: Giteabot <teabot@gitea.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-02-20 09:57:40 +00:00
Lunny Xiao
58c124cc4f
Move commits signature and verify functions to service layers ( #33605 )
...
No logic change, just move functions.
2025-02-16 12:24:07 +00:00
wxiaoguang
5dddcc1773
chore: fix some trivial problems and TODOs ( #33473 )
...
1. Fix incorrect `MentionCount` (actually it seems to be deadcode,
affects nothing)
2. Remove fallback sha1 support for time limit token
3. Use route middleware `reqRepoActionsWriter` for `ArtifactsDeleteView`
4. Use clearer message "Failed to authenticate user" instead of "Verify"
when auth fails
5. `tests/integration/benchmarks_test.go` is not quite right, actually
it is never used, so delete it.
6. Remove or update TODO comments
2025-02-02 18:16:56 +00:00
wxiaoguang
4ffc54f59a
Refactor user & avatar ( #33433 )
...
1. better GetPossibleUserByID logic
2. fix some function name & comment typos
3. do not re-generate avatar if one exists
2025-01-30 07:33:50 +08:00
TheFox0x7
2a02734f93
Refactor older tests to use testify ( #33140 )
...
Refactor checks to use assert/require
Use require.Eventually for waiting in elastic and meilisearch tests
Use require to exit early instead of assert
2025-01-09 09:21:47 +08:00
Zettat123
2d1a171dc7
Support for email addresses containing uppercase characters when activating user account ( #32998 )
...
Fix #32807
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-12-27 19:16:23 +08:00
wxiaoguang
9bfa9f450d
Refactor "string truncate" ( #32984 )
2024-12-26 11:56:03 +08:00
wxiaoguang
a163c53a60
Refactor template & test related code ( #32938 )
...
Move some legacy code from "base" package to proper packages.
2024-12-22 15:33:19 +00:00
Lunny Xiao
5ab7aa700f
Use new mail package instead of an unmintained one ( #32682 )
...
Resolve #18664
2024-12-05 06:33:43 +08:00
Lunny Xiao
79d593a9be
Split mail sender sub package from mailer service package ( #32618 )
...
Move all mail sender related codes into a sub package of
services/mailer. Just move, no code change.
Then we just have dependencies on go-mail package in the new sub
package. We can use other package to replace it because it's
unmaintainable. ref #18664
2024-11-30 01:15:41 +00:00
wxiaoguang
633785a5f3
Refactor markup render system ( #32612 )
...
This PR removes (almost) all path tricks, and introduces "renderhelper"
package.
Now we can clearly see the rendering behaviors for comment/file/wiki,
more details are in "renderhelper" tests.
Fix #31411 , fix #18592 , fix #25632 and maybe more problems. (ps: fix
#32608 by the way)
2024-11-24 16:18:57 +08:00
wxiaoguang
c4e27cb27b
Refactor markup render system ( #32589 )
...
This PR mainly moves some code and introduces `RenderContext.WithXxx`
functions
2024-11-22 05:48:09 +00:00
Calvin K
18aeca5320
Add reviewers selection to new pull request ( #32403 )
...
Users could add reviewers when creating new PRs.
---------
Co-authored-by: splitt3r <splitt3r@users.noreply.github.com>
Co-authored-by: Sebastian Sauer <sauer.sebastian@gmail.com>
Co-authored-by: bb-ben <70356237+bboerben@users.noreply.github.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-11-09 04:48:31 +00:00
Lunny Xiao
276500c314
Move AddCollabrator and CreateRepositoryByExample to service layer ( #32419 )
...
- [x] Move `CreateRepositoryByExample` to service layer
- [x] Move `AddCollabrator` to service layer
- [x] Add a new parameter for `AddCollabrator` so that changing mode
immediately after that will become unnecessary.
2024-11-07 11:28:11 +08:00
KN4CK3R
55f1fcf0ad
Add missing comment reply handling ( #32050 )
...
Fixes #31937
- Add missing comment reply handling
- Use `onGiteaRun` in the test because the fixtures are not present
otherwise (did this behaviour change?)
Compare without whitespaces.
2024-09-17 20:56:26 +00:00
6543
0f53324182
Add option to change mail from user display name ( #31528 )
...
Make it posible to let mails show e.g.:
`Max Musternam (via gitea.kithara.com) <gitea@kithara.com>`
Docs: https://gitea.com/gitea/docs/pulls/23
---
*Sponsored by Kithara Software GmbH*
2024-07-14 23:27:00 +02:00
Sunny Wan
4913edaa70
Display app name in the registration email title ( #31562 )
...
I changed the title of the registation email from "Welcome to Gitea" to
"Welcome to (appname)". I did this by substituting 'Gitea' in
register_notify to %s and formating the registration title in mail.go. I
changed this for all the languages I could, but I struggled to changed
the translation file for Farsi. I have attached the screenshots of
before and after and the related issue below.
Related issue:
https://github.com/go-gitea/gitea/issues/31108
Before change:

After:

---------
Signed-off-by: Sunny Wan <Sunnywan2020@gmail.com>
Co-authored-by: 6543 <6543@obermui.de>
2024-07-11 23:23:31 +00:00
6543
4696bcb3f7
Use FullName in Emails to address the recipient if possible ( #31527 )
...
Before we had just the plain mail address as recipient. But now we
provide additional Information for the Mail clients.
---
*Sponsored by Kithara Software GmbH*
2024-07-08 08:38:45 +00:00
6543
aace3bccc3
Add option for mailer to override mail headers ( #27860 )
...
Add option to override headers of mails, gitea send out
---
*Sponsored by Kithara Software GmbH*
2024-06-03 20:42:52 +02:00
Lunny Xiao
015efcd8bf
Use repo as of renderctx's member rather than a repoPath on metas ( #29222 )
...
Use a `gitrepo.Repository` in the markup's RenderContext but not store
the repository's path.
2024-05-30 07:04:01 +00:00
wxiaoguang
677032d36a
Fix incorrect message id for releaes email ( #30825 )
...
Make generateMessageIDForRelease outputs the same format as
generateMessageIDForIssue (old `createReference`)
2024-05-02 15:24:21 +00:00
KN4CK3R
85c59d6c21
Use relative links for commits, mentions, and issues in markdown ( #29427 )
...
Fixes #29404
Use relative links for
- commits
- mentions
- issues
---------
Co-authored-by: silverwind <me@silverwind.io>
2024-03-13 10:34:58 +00:00
Lunny Xiao
29f149bd9f
Move context from modules to services ( #29440 )
...
Since `modules/context` has to depend on `models` and many other
packages, it should be moved from `modules/context` to
`services/context` according to design principles. There is no logic
code change on this PR, only move packages.
- Move `code.gitea.io/gitea/modules/context` to
`code.gitea.io/gitea/services/context`
- Move `code.gitea.io/gitea/modules/contexttest` to
`code.gitea.io/gitea/services/contexttest` because of depending on
context
- Move `code.gitea.io/gitea/modules/upload` to
`code.gitea.io/gitea/services/context/upload` because of depending on
context
2024-02-27 08:12:22 +01:00
KN4CK3R
f79c9e817a
Use crypto/sha256 ( #29386 )
...
Go 1.21 improved the performance of `crypto/sha256`. It's now similar to
`minio/sha256-simd`, so we should just use the standard libs.
https://go.dev/doc/go1.21#crypto/sha256
https://go-review.googlesource.com/c/go/+/408795
https://github.com/multiformats/go-multihash/pull/173
2024-02-25 13:32:13 +00:00
Jimmy Praet
2e33671f2c
Add attachment support for code review comments ( #29220 )
...
Fixes #27960 , #24411 , #12183
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-02-25 06:00:55 +00:00
wxiaoguang
f3eb835886
Refactor locale&string&template related code ( #29165 )
...
Clarify when "string" should be used (and be escaped), and when
"template.HTML" should be used (no need to escape)
And help PRs like #29059 , to render the error messages correctly.
2024-02-14 21:48:45 +00:00