0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-02-04 02:21:52 +01:00

1916 Commits

Author SHA1 Message Date
Lunny Xiao
2cbd55f155
Merge branch 'main' into lunny/some_refactors 2026-01-16 11:16:51 -08:00
Gregorius Bima Kharisma Wicaksana
65422fde4d
Fix CODEOWNERS review request attribution using comment metadata (#36348)
Fixes #36333

## Problem

When CODEOWNERS automatically assigns reviewers to a pull request, the
timeline incorrectly shows the PR author as the one who requested the
review (e.g., "PR_AUTHOR requested review from CODE_OWNER"). This is
misleading since the action was triggered automatically by CODEOWNERS
rules, not by the PR author.

## Solution

Store CODEOWNERS attribution in comment metadata instead of changing the
doer user:
- Add `SpecialDoerName` field to `CommentMetaData` struct (value:
`"CODEOWNERS"` for CODEOWNERS-triggered requests)
- Pass `isCodeOwners=true` to `AddReviewRequest` and
`AddTeamReviewRequest` functions
- Template can check this metadata to show appropriate attribution
message

---------

Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-01-16 14:52:57 +00:00
TheFox0x7
69c5921d71
Add ability to download subpath archive (#36371)
closes: https://github.com/go-gitea/gitea/issues/4478

---------

Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-01-16 09:31:12 +00:00
Lunny Xiao
5eb5ec922f
Merge branch 'main' into lunny/some_refactors 2026-01-15 21:12:05 -08:00
Lunny Xiao
67e75f30a8
Fix bug on notification read (#36339)
When a user has been revoked permission to access a repository, the
related notification could still be visited. But the repository's
information should not be leaked any more.
2026-01-15 21:11:13 -08:00
Lunny Xiao
d61c3b15f5
Merge branch 'main' into lunny/some_refactors 2026-01-15 18:41:37 -08:00
Zeno
3f46de8265
Add chunked transfer encoding support for LFS uploads (#36380)
Enable chunked transfer encoding for Git LFS uploads by adding
Transfer-Encoding: chunked header to upload action responses. This
prevents large file uploads (100+ MB) from being blocked by reverse
proxies like Cloudflare that buffer non-chunked requests.

Fix https://github.com/go-gitea/gitea/issues/22233

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-01-16 07:15:18 +08:00
Lunny Xiao
9f1434bb5a
Merge branch 'main' into lunny/some_refactors 2026-01-14 11:40:34 -08:00
Lunny Xiao
14e8c9b767
Release attachments must belong to the intended repo (#36347) 2026-01-14 11:37:53 -08:00
Lunny Xiao
733c5b608a
Merge branch 'main' into lunny/some_refactors 2026-01-14 09:25:47 -08:00
Lunny Xiao
07ac29da32
Fix bug when compare in the pull request (#36363)
The pull request comparison should not use `direct compare`.
2026-01-14 16:56:23 +00:00
Lunny Xiao
8a98ac2213
clean watches when make a repository private and check permission when send release emails (#36319) 2026-01-14 16:11:22 +00:00
Lunny Xiao
e4a568141b Merge branch 'lunny/some_refactors' of github.com:lunny/gitea into lunny/some_refactors 2026-01-13 17:20:48 -08:00
Lunny Xiao
791bd4325e
Fix parally problem 2026-01-13 17:20:30 -08:00
Lunny Xiao
95ea2df00a
Add more check for stopwatch read or list (#36340) 2026-01-13 13:13:39 +00:00
TheFox0x7
040fc93046
fill missing has_code in repository api (#36338)
fixes: https://github.com/go-gitea/gitea/issues/36332

---------

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Giteabot <teabot@gitea.io>
2026-01-12 22:52:44 +00:00
wxiaoguang
7a23e247e6
Fix notifications pagination query parameters (#36351)
Fix #36350
2026-01-12 22:17:42 +00:00
Lunny Xiao
81dacb14c9
Merge branch 'main' into lunny/some_refactors 2026-01-12 12:23:52 -08:00
silverwind
1d399bb1d1
Improve diff file headers (#36215)
- reduce file name font size from 15px to 14px
- fix labels and buttons being cut off when their size is constrained
- change labels from monospace to sans-serif font
- move diff stats to right and change them from sum of changes to +/-
- change filemode to label and change text to match other labels

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-01-12 20:29:35 +08:00
Lunny Xiao
da036f3f35
LFS locks must belong to the intended repo (#36344) 2026-01-11 12:57:58 +02:00
Lunny Xiao
40b7c1755d
Merge branch 'main' into lunny/some_refactors 2026-01-10 18:25:14 -08:00
wxiaoguang
eec8ee056c
Fix some trivial problems (#36336)
1. correctly parse git protocol's "OldCommit NewCommit RefName" line, it
should be explicitly split by space
2. add missing "return" in CreatePullRequest
3. add comments for "/user.keys" and "/user.gpg" outputs
4. trim space for the "commit status context name" to follow the same
behavior of git_model.NewCommitStatus
2026-01-09 20:58:21 +02:00
wxiaoguang
f6d3c70818
Fix diff view style handling (#36324)
Fix #36323
2026-01-09 04:37:16 +00:00
wxiaoguang
e226720cff
Refactor cat-file batch operations and support --batch-command approach (#35775)
Replace #34651 and address more problems including fix framework bugs and changing to QueryInfo and QueryContent calls.

---------

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2026-01-08 13:37:36 -08:00
Lunny Xiao
926228a66b
Merge branch 'main' into lunny/some_refactors 2026-01-05 15:54:15 -08:00
Joakim Olsson
1ee7f8e966
fix: prevent panic when GitLab release has more links than sources (#36295)
The code incorrectly assumed rel.Assets.Links and rel.Assets.Sources
arrays have equal length. This causes index out of bounds panic when
migrating GitLab releases with more links than sources, which is common
with GoReleaser-generated releases.

Fixes #36292

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-01-05 21:48:12 +08:00
Lunny Xiao
05e3a773b6 Merge branch 'lunny/some_refactors' of github.com:lunny/gitea into lunny/some_refactors 2026-01-04 23:15:15 -08:00
Lunny Xiao
1a51a6fd32
Revert unnecessary change 2026-01-04 23:14:38 -08:00
Lunny Xiao
426bb491c0
Move assign project when creating pull request to the same database transaction (#36244) 2026-01-04 16:45:36 +00:00
Lauris BH
f2a69d828c
Merge branch 'main' into lunny/some_refactors 2026-01-04 16:59:10 +02:00
wxiaoguang
b79dbfa990
Fix link/origin referrer and login redirect (#36279)
Fix #35998

1. Fix `<a rel>` :
    * "_blank" already means "noopener"
* "noreferrer" is already provided by page's `<meta name="referrer">`
2. Fix "redirect_to" mechisam
* Use "referer" header to determine the redirect link for a successful
login
3. Simplify code and merge duplicate logic
2026-01-03 11:43:04 +08:00
Lunny Xiao
bda42c57b4
Fix some bugs 2026-01-02 19:38:03 -08:00
Lunny Xiao
f9d77d7501 Merge branch 'main' into lunny/some_refactors 2026-01-02 18:58:21 -08:00
Lunny Xiao
68bb75168a
improvement 2026-01-02 18:50:54 -08:00
Lunny Xiao
8373f7deb3
improve the compare page (#36261)
- The compare page head title should be `compare` but not `new pull
request`.
- Use `UnstableGuessRefByShortName` instead of duplicated functions
calls.
- Direct-compare, tags, commits compare will not display `New Pull
Request` button any more.

The new screenshot
<img width="1459" height="391" alt="image"
src="https://github.com/user-attachments/assets/64e9b070-9c0b-41d1-b4b8-233b96270e1b"
/>

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-01-01 10:32:19 -08:00
luo jiyin
98981eb749
mailer: pass request context to generateAdditionalHeadersForIssue (#36274)
Fixes #36273

Use the caller-provided context when building X-Gitea-Issue-Link,
instead of `context.TODO()`.
2026-01-01 04:28:25 +00:00
Max P.
91d871611e
feat(debian): use explicit, stronger defaults for newly generated repo signing keys (#36236)
Make Debian repository signing key generation use explicit stronger defaults
and embed the creation time in the OpenPGP comment for newly created keys.

---------

Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-01-01 02:36:14 +00:00
Lunny Xiao
5bf1c5010e
Fix lint 2025-12-29 12:24:36 -08:00
Lunny Xiao
d3fb475186 Merge branch 'main' into lunny/some_refactors 2025-12-29 12:16:07 -08:00
Lunny Xiao
1771569300
Some refactor for repo path (#36251)
- Use `gitrepo.IsRepositoryExist` instead of `util.IsExit` or
`util.IsDir`
- Use `gitrepo.OpenRepository` instead of `git.OpenRepository`
- Use `gitrepo.DeleteRepository` instead of `util.RemoveAll`
- Use `gitrepo.RenameRepository` instead of `util.Rename`
2025-12-29 18:49:54 +00:00
Lunny Xiao
73279fb770 Merge branch 'main' into lunny/some_refactors 2025-12-28 11:27:42 -08:00
Lunny Xiao
c7b3cdf7b1
Use gitrepo's push function (#36245)
extract from #36186
2025-12-28 13:24:28 +02:00
Ivan Tkatchev
19e1997ee2
Add an option to automatically verify SSH keys from LDAP (#35927)
This pull request adds an option to automatically verify SSH keys from
LDAP authentication sources.

This allows a correct authentication and verification workflow for
LDAP-enabled organizations; under normal circumstances SSH keys in LDAP
are not managed by users manually.
2025-12-27 12:33:08 +00:00
sollyu
64fcf847ce
Use the requested host for LFS links (#36242)
Use the dynamically parsed host in the request for LFS links, but not
use the hard-coded AppURL.

Make LFS server support multi-domain or run Gitea behind a reverse-proxy
with different ROOT_URL.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-12-26 04:48:20 +00:00
Lunny Xiao
776e406363
Refactor compare router param parse (#36105)
---------

Signed-off-by: Lunny Xiao <xiaolunwen@gmail.com>
Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-12-25 17:51:30 -08:00
silverwind
42d294941c
Replace CSRF cookie with CrossOriginProtection (#36183)
Removes the CSRF cookie in favor of
[`CrossOriginProtection`](https://pkg.go.dev/net/http#CrossOriginProtection)
which relies purely on HTTP headers.

Fixes: https://github.com/go-gitea/gitea/issues/11188
Fixes: https://github.com/go-gitea/gitea/issues/30333
Helps: https://github.com/go-gitea/gitea/issues/35107

TODOs:

- [x] Fix tests
- [ ] Ideally add tests to validates the protection

---------

Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-12-25 12:33:34 +02:00
Lunny Xiao
5e85f8c07c
Fix bug 2025-12-24 18:22:37 -08:00
Lunny Xiao
10d4361a5c
Fix lint 2025-12-22 19:28:20 -08:00
Lunny Xiao
b4df643ad1
Fix bug 2025-12-22 19:03:34 -08:00
Lunny Xiao
7228fb1498
Fix bug 2025-12-18 21:55:06 -08:00