0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-01-25 02:00:54 +01:00

20220 Commits

Author SHA1 Message Date
Excellencedev
efb93b5da1 Fixes 2025-12-30 04:38:04 +01:00
Excellencedev
4fb498987d
Merge branch 'main' into fix-24635 2025-12-30 03:55:07 +01: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
0ad94dfc70
Move catfile batch to a sub package of git module (#36232) 2025-12-29 10:19:42 -08:00
alphazeba
d0cb198c89
fix: prevent 100% width radio buttons (#36262)
as part of [Remove fomantic form
module](eddf875992 (diff-c34b74004deb63fb4f8a8549ef9d822b9839db0b69ae2c0cdacc05ce3d5d5682))
radio buttons get caught in crossfire and recieve `width: 100%` this is
particularly noticeable on the `user/settings/applications` page which
has many radio buttons.

This continues using an opt out `input:not([type="checkbox"],
[type="radio"])` to prevent this.

Signed-off-by: alphazeba <33792307+alphazeba@users.noreply.github.com>
2025-12-29 09:51:10 +02:00
GiteaBot
85dd16b3fc [skip ci] Updated translations via Crowdin 2025-12-29 00:43:22 +00:00
Lunny Xiao
c7b3cdf7b1
Use gitrepo's push function (#36245)
extract from #36186
2025-12-28 13:24:28 +02:00
Gregorius Bima Kharisma Wicaksana
83527d3f8a
Support closing keywords with URL references (#36221)
## Summary

This PR adds support for closing keywords (`closes`, `fixes`, `reopens`,
etc.) with full URL references in markdown links.

**Before:**
- `closes #123`  works
- `closes org/repo#123`  works  
- `Closes [this issue](https://gitea.io/user/repo/issues/123)`  didn't
work
- `Fixes [#456](https://gitea.io/org/project/issues/456)`  didn't work

**After:**
All of the above now work correctly.

## Problem

When users reference issues using full URLs in markdown links (e.g.,
`Closes [this issue](https://gitea.io/user/repo/issues/123)`), the
closing keywords were not detected. This was because the URL processing
code explicitly stated:

```go
// Note: closing/reopening keywords not supported with URLs
```

Both methods of writing the reference render the same in the UI, so
users expected the closing keywords to behave the same.

## Solution

The fix works by:
1. Passing the original (unstripped) content to
`findAllIssueReferencesBytes`
2. When processing URL links from markdown, finding the URL position in
the original content
3. For markdown links `[text](url)`, finding the opening bracket `[`
position
4. Using that position to detect closing keywords before the link

## Testing

Added test cases for:
- `Closes [this issue](url)` - single URL with closing keyword
- `This fixes [#456](url)` - keyword in middle of text
- `Reopens [PR](url)` - reopen keyword with pull request URL
- Multiple URLs where only one has a closing keyword

All existing tests continue to pass.

Fixes #27549
2025-12-27 09:05:24 -08: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
Lunny Xiao
00cc84e37c
remove nolint (#36252) 2025-12-26 22:55:30 -08:00
Excellencedev
f9f24dd466 Make all CI green again 2025-12-26 13:15:32 +01:00
Excellencedev
ae43a09aa8 ... 2025-12-26 12:49:27 +01:00
Excellencedev
621c0e2b50 ... 2025-12-26 12:13:12 +01:00
Excellencedev
640004f70f test fix 2025-12-26 12:05:51 +01:00
Excellencedev
26e47a58ef .... 2025-12-26 11:23:32 +01:00
Excellencedev
c7d20802af LOGS 2025-12-26 09:54:36 +01:00
Excellencedev
4ccb766bf2 Re-implement changes for feedback 2025-12-26 09:18:59 +01:00
Excellencedev
7df7f72a71
Merge branch 'main' into fix-24635
Signed-off-by: Excellencedev <ademiluyisuccessandexcellence@gmail.com>
2025-12-26 08:23:33 +01: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
ff3d68b98a
Fix panic when get editor config file (#36241)
Fix #36239
2025-12-25 19:26:23 -08: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
GiteaBot
fbbed8c4c4 [skip ci] Updated translations via Crowdin 2025-12-25 21:37:43 +00:00
Lunny Xiao
324dcf6f64
Use flatten translation keys (#36225)
Crowdin does not remove empty lines in nested JSON translation files.
Therefore, we use flattened translation keys instead. We have also
updated the key-loading logic to ensure that empty values are not
applied during translation.

---------

Signed-off-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: TheFox0x7 <thefox0x7@gmail.com>
Co-authored-by: silverwind <me@silverwind.io>
2025-12-25 12:51:33 -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
Excellencedev
e52ff98bcf Fix updated test 2025-12-24 13:30:36 +01:00
Excellencedev
973de056e8 review comment 2025-12-24 13:02:07 +01:00
Excellencedev
ebf7e2ea8c fix test 2025-12-24 06:26:31 +01:00
Excellencedev
43279bfb8b Use correct authentication 2025-12-24 05:57:51 +01:00
Excellencedev
9ada493d72 Add cross repo package access test 2025-12-24 05:29:27 +01:00
Excellencedev
9bd8b8109d Review comment fixes 2025-12-24 02:49:37 +01:00
Excellencedev
50f300b421
Merge branch 'main' into fix-24635 2025-12-23 19:04:14 +01:00
silverwind
eddf875992
Remove fomantic form module (#36222)
- Replace fomantic form CSS with custom module
- Moved code in `form.css` to `modules/form.css`, removed around 70% of
the previous module.
- Moved captcha styles previously in `form.css` to its own file.

There is probably more unused CSS, like form error state colors which to
my knowledge is not used anywhere, but I'm not sure about that one so I
kept it.

One notable change is the removal of `type` combinator here, which
lowers the selector specificity and I noticed one issue where selector
`.ui.search > .prompt` was winning, so I added a workaround for that
until the `search` module can be removed as well.

```css
.ui.form .fields.error .field input:not([type])
.ui.form .fields.error .field input[type="date"]
```

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Giteabot <teabot@gitea.io>
2025-12-23 18:21:47 +01:00
Max P.
957151937f
Fix panic in blame view when a file has only a single commit (#36230)
This PR fixes a panic in the repository blame view that occurs when
rendering files whose blame history consists of only a single commit.
2025-12-23 14:26:29 +08:00
Excellencedev
fe5230cc0b more ui fixes 2025-12-23 04:40:29 +01:00
Excellencedev
302f88892f fix ui 2025-12-22 18:47:42 +01:00
Excellencedev
5da2b95e29
Merge branch 'main' into fix-24635 2025-12-22 18:12:09 +01:00
DaanSelen
04607f7d4a
fix: spelling error in migrate-storage cmd utility (#36226)
Added closing quote which looks to be forgotten

Signed-off-by: DaanSelen <80752476+DaanSelen@users.noreply.github.com>
2025-12-22 10:55:41 +00:00
Excellencedev
a72803dec1
Merge branch 'main' into fix-24635 2025-12-22 08:09:37 +01:00
silverwind
60de6cefed
Fix WebAuthn error checking (#36219)
Fixes: https://github.com/go-gitea/gitea/issues/36216

Now `detectWebAuthnSupport` returns the error type and lets the caller
decide whether they call `webAuthnError` and show the error. It no
longer shows the error during page load when the user has not even
interacted with the feature.

The bug affects all users on HTTP, so I think a quick fix release for
this might be good.
2025-12-21 18:24:41 +00:00
GiteaBot
5151e30fb7 [skip ci] Updated translations via Crowdin 2025-12-21 17:09:57 +00:00
Gregorius Bima Kharisma Wicaksana
b6ffe0e4e9
refactor: extract helper functions from SearchIssues (#36158)
## Summary

This PR refactors the `SearchIssues` function in
`routers/api/v1/repo/issue.go` by extracting common logic into reusable
helper functions:

- `parseIssueIsClosed()`: Parses the "state" query parameter and returns
the corresponding `isClosed` option
- `parseIssueIsPull()`: Parses the "type" query parameter and returns
the corresponding `isPull` option
- `buildSearchIssuesRepoIDs()`: Builds the list of repository IDs for
issue search based on query parameters

### Benefits:
- Improved code readability
- Smaller, more focused functions
- Easier to test individual components
- Potential for reuse in other handlers

### Changes:
- Extracted 3 helper functions from the ~292 line `SearchIssues`
function
- No functional changes - behavior remains the same
- Proper error handling preserved

## Test plan
- [ ] Verify existing API tests pass
- [ ] Manual testing of `/repos/issues/search` endpoint

Ref: #35015

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-12-20 17:57:41 -08:00
GiteaBot
bf0b377879 [skip ci] Updated translations via Crowdin 2025-12-21 00:42:41 +00:00
Excellencedev
34d13de7e5
Merge branch 'main' into fix-24635 2025-12-20 19:28:37 +01:00
Lunny Xiao
0a3a9fb068 Revert "[skip ci] Updated translations via Crowdin"
This reverts commit d3656ebd95536b87dfc40c6df5ee22b2e62ae6c9.
2025-12-20 09:15:26 -08:00
Scion
495fee4555
Closed milestones with no issues now show as 100% completed (#36220)
Closed milestones with 0 issues currently display as having 0%
completion. This makes sense if the milestone is still open, but if the
milestone is closed it seems like that it should show 100% completeness
instead.

Before:
<img width="1708" height="252" alt="image"
src="https://github.com/user-attachments/assets/0b58c78f-0609-44ee-8d58-bd67534c6164"
/>
After:
<img width="1716" height="263" alt="image"
src="https://github.com/user-attachments/assets/3fb0044f-d76c-4888-9d60-640f2ca5fec6"
/>
2025-12-20 16:16:20 +00:00
Excellencedev
663d9b28f8 empty commit 2025-12-20 14:13:52 +01:00
Excellencedev
6d947234e2 regression 2025-12-20 13:08:06 +01:00
Excellencedev
d25de6fb86 test fix 2025-12-20 11:13:47 +01:00
Excellencedev
463c670d06 issue fix 2025-12-20 08:28:58 +01:00
Excellencedev
6cc6fd7f68 lint 2025-12-20 07:50:12 +01:00