19872 Commits

Author SHA1 Message Date
ChristopherHX
84812e42df
Fix SSH signing key path will be displayed in the pull request UI (#35381)
Closes #35361

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-09-12 03:00:18 +00:00
GiteaBot
16e1207449 [skip ci] Updated translations via Crowdin 2025-09-12 00:33:19 +00:00
silverwind
9bb08aa822
Update image name in integration README (#35465)
Followup to https://github.com/go-gitea/gitea/pull/35402.
2025-09-11 17:56:43 +02:00
GiteaBot
f04b9aaa1c [skip ci] Updated translations via Crowdin 2025-09-11 00:34:46 +00:00
Lunny Xiao
89d7929711
Fix package link setting can only list limited repositories (#35394)
Fix #24801

<img width="1123" height="503" alt="image"
src="https://github.com/user-attachments/assets/823f4214-e08a-4506-9018-057c50e7fc52"
/>

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Giteabot <teabot@gitea.io>
2025-09-11 01:50:17 +02:00
silverwind
593a52c2f0
Vertically center date in file view latest commit (#35456) 2025-09-10 20:20:23 +00:00
silverwind
4d43d85941
Bump setup-node to v5 (#35448)
See https://github.com/actions/setup-node/releases/tag/v5.0.0

Caching is now enabled by default when `packageManager` is present in
package.json, and we have that. `cache-dependency-path` is unneccesary
because the action will automatically detect it.
2025-09-10 16:11:14 +00:00
Lunny Xiao
2653ac95e0
Extend comment treepath length (#35389)
Extend the maximum length of comment.treepath from 255 to 4000
characters.

All databases supported by Gitea allow VARCHAR fields of 4000, so
compatibility is ensured. Git itself does not impose a strict limit on
path length. On Windows, the `core.longpaths` setting has already been
enabled to handle long file paths.

Fix #33716

---------

Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Giteabot <teabot@gitea.io>
2025-09-10 13:31:59 +00:00
silverwind
b76e69fee7
Fix overflow in notifications list (#35446)
Before:

<img width="1339" height="159" alt="Screenshot 2025-09-10 at 02 29 09"
src="https://github.com/user-attachments/assets/097f0929-f387-428f-a53d-74cf88d0b013"
/>

After:

<img width="1335" height="114" alt="Screenshot 2025-09-10 at 02 29 17"
src="https://github.com/user-attachments/assets/2185c9aa-eca0-43da-b244-674e7b81aef8"
/>
2025-09-10 13:05:35 +00:00
Lunny Xiao
274f4aea7e
Fix a compare page 404 bug when the pull request disabled (#35441) 2025-09-09 21:04:32 -07:00
Lunny Xiao
e35e724e42
Use db.WithTx/WithTx2 instead of TxContext when possible (#35428) 2025-09-10 03:15:01 +00:00
GiteaBot
fb247f640e [skip ci] Updated translations via Crowdin 2025-09-10 00:33:42 +00:00
silverwind
47df15cabc
Update JS and PY dependencies (#35444)
Tested all affected dependencies.
2025-09-10 02:30:20 +02:00
koalajoe23
2802f96e97
check user and repo for redirects when using git via SSH transport (#35416)
fixes #30565 

When using git with a gitea hosted repository, the HTTP-Transport did
honor the user and repository redirects, which are created when renaming
a user or repo and also when transferring ownership of a repo to a
different organization. This is extremely helpful, as repo URLs remain
stable and do not have to be migrated on each client's worktree and
other places, e.g. CI at once.

The SSH transport - which I favor - did not know of these redirections
and I implemented a lookup during the `serv` command.
2025-09-09 20:13:41 +00:00
Lunny Xiao
b9efbe9fe6
Fix push commits comments when changing the pull request target branch (#35386)
When changing the pull request target branch, the pushed commits
comments will not be changed resulted the number are inconsistent
between commits tab number and the pushed commits comments number.

This PR will remove all the previous pushed commits comments and
calculate new comments when changing the target branch.

Before:

<img width="928" height="585" alt="image"
src="https://github.com/user-attachments/assets/35e4d31f-31a1-4d14-83b0-1786721ab0d9"
/>

After:
<img width="816" height="623" alt="image"
src="https://github.com/user-attachments/assets/24b6dafe-9238-4e7e-833d-68472457afab"
/>
2025-09-09 19:40:54 +00:00
Lunny Xiao
e4cb48a7e0
Fix bug when issue disabled, pull request number in the commit message cannot be redirected (#35420)
Fix #35419

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-09-09 12:14:06 -07:00
GiteaBot
4c369c0a92 [skip ci] Updated translations via Crowdin 2025-09-09 00:34:36 +00:00
silverwind
bde1f82850
Update gofumpt, add go.mod ignore directive (#35434)
gofumpt now
[supports](https://github.com/mvdan/gofumpt/releases/tag/v0.9.0) the
[ignore](https://tip.golang.org/ref/mod#go-mod-file-ignore) directive
added in go 1.25, make use of it which speeds up `make fmt` by around
30%. Likely this also has similar speed gains in other go-related
commands which use the `./...` pattern.

The change in `build/code-batch-process.go` was introduced by `gofumpt`
because of this change:

> A new rule is introduced to "clothe" naked returns for the sake of
clarity. While there is nothing wrong with naming results in function
signatures, using lone return statements can be confusing to the reader.
2025-09-08 13:40:08 +02:00
Akhan Zhakiyanov
87362b4dc1
fix: add author.name field to Swift Package Registry API response (#35410)
Fixes #35159

Swift Package Manager expects an 'author.name' field in package
metadata, but Gitea was only providing schema.org format fields
(givenName, middleName, familyName). This caused SPM to fail with
keyNotFound error when fetching package metadata.

Changes:
- Add 'name' field to Person struct (inherited from
https://schema.org/Thing)
- Populate 'name' field in API response using existing String() method
- Maintains backward compatibility with existing schema.org fields
- Provides both formats for maximum compatibility

The fix ensures Swift Package Manager can successfully resolve packages
while preserving full schema.org compliance.
2025-09-07 18:24:25 +00:00
silverwind
801da7fdab
Update js dependencies (#35429) 2025-09-07 18:50:44 +02:00
silverwind
38ad58575a
Support Node.js 22.6 with type stripping (#35427)
This solves the [docker build
failure](https://github.com/go-gitea/gitea/actions/runs/17514788636/job/49750917680)
on `linux/riscv64` by enabling the experimental flag on Node.js before
22.18.
2025-09-07 08:02:06 +00:00
GiteaBot
0c31499498 [skip ci] Updated translations via Crowdin 2025-09-07 00:37:41 +00:00
TheFox0x7
664522ec6b
apply as maintainer (#35424)
Applying as suggested some time ago by techknowlogick.
[List of all merged PRs so
far](https://github.com/go-gitea/gitea/pulls?q=is%3Apr+author%3ATheFox0x7)
2025-09-06 09:56:18 -07:00
Lunny Xiao
c290682521
Upgrade golang to 1.25.1 and add descriptions for the swagger structs' fields (#35418) 2025-09-06 16:52:41 +00:00
silverwind
b8f1c9f048
Migrate tools and configs to typescript, require node.js >= 22.18.0 (#35421)
Migrate all JS config and tools to TS and fix a number of type issues.
This required Node.js 22.18.0 or greater where [type-stripping was
enabled](https://nodejs.org/en/blog/release/v22.18.0) by default.

Given that Node 22 is the current LTS, I think it's ok to assume that
the user has a recent version of it.

Webpack currently requires the `--disable-interpret` flag to work,
should be fixed eventually with
https://github.com/webpack/webpack-cli/issues/4525.
`fast-glob` is replaced by `fs.globSync`, available in Node 22.0.0 or
greater.
2025-09-06 12:58:25 +00:00
GiteaBot
1640e9a490 [skip ci] Updated translations via Crowdin 2025-09-06 00:33:13 +00:00
silverwind
89b4be057b
Switch to @resvg/resvg-wasm for generate-images (#35415)
Use the WASM module of [`resvg-js`](https://github.com/thx/resvg-js) to
replace `fabric` and the problematic native `canvas` dependency. WASM
works cross-platform so we can include it in the main `package.json`.
2025-09-05 21:06:02 +00:00
ulnanlu
09d1f359d5
fix(webhook/discord): fixed username cannot be empty error (#35412)
username field is not required by discord and used to override the
default username. sending it as blank causes a 400 error. it should be
omitted instead when it's not set.

Ref:
https://discord.com/developers/docs/resources/webhook#execute-webhook-jsonform-params

Closes #35411
2025-09-05 11:19:31 -07:00
lsd-techno
998b6b8889
add /.pnpm-store to .gitignore (#35414)
add `/.pnpm-store` to .gitignore to not drive git diff crazy with 10k+
changes after .pnpm-store update, introduced by #35274
2025-09-05 16:14:05 +02:00
NorthRealm
07347634aa
Refactor and update mail templates (#35150)
- Moved mail templates to new directories.
- Added new devtest ymls.
- Embedded styles as much as possible.
- Added new translation keys for actions email.

---------

Signed-off-by: NorthRealm <155140859+NorthRealm@users.noreply.github.com>
Co-authored-by: delvh <dev.lh@web.de>
2025-09-04 20:20:42 -07:00
Luke H-W
5fe3296055
Disable Field count validation of CSV viewer (#35228)
Default behaviour rejected all rows (Records) with more or fewer columns
(Fields) than the first row, preventing them from parsing at all and
silently hiding them. While RFC4180 section 2.4 says each line _should_
contain the same number of fields, enforcing this on the viewer is
unhelpful.
This pull request disables that validation, allowing the viewer to
render lines with fewer columns than the maximum number within the file.
As it's a simple HTML table, this works without additional changes (i.e.
no need to manually determine the maximum number of columns), but the
default appearance of rows with fewer columns may be undesirable to some
people, especially when using CSS that has `td {border-right: none}`.
<img width="1408" height="156" alt="Screenshot without cell right
borders"
src="https://github.com/user-attachments/assets/d4c19bbc-3fd2-4fd1-83a6-1125e953e95b"
/>
<img width="1397" height="158" alt="Screenshot with cell right borders"
src="https://github.com/user-attachments/assets/86aaafcb-d7e8-4228-99a8-7527c823a07c"
/>

Fixes #16559, #30358.

Unfortunately, retaining empty lines is less trivial, so the line
numbers on the leftmost column will still not match the source file
whenever those are present, though a future PR could address that.
2025-09-04 09:54:58 -07:00
Lunny Xiao
3e3c36bc30
split admin config settings templates to make it maintain easier (#35294) 2025-09-04 15:42:26 +00:00
silverwind
e9655df082
Update tools/package.json dependencies, remove imagemin-zopfli (#35406)
imagemin-zopfli brings a lot of [vulnerable
dependencies](https://github.com/go-gitea/gitea/security/dependabot) and
it is unmaintained. The removal brings a size increase to these images,
but I think ultimately this size does not matter enough. I verified this
passes `pnpm audit` now.
2025-09-04 09:17:33 -04:00
techknowlogick
879b896656
bump devcontainer to go 1.25 (#35404) 2025-09-04 04:21:00 +00:00
techknowlogick
361e59fd53
Switch to pnpm (#35274)
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: silverwind <me@silverwind.io>
2025-09-04 01:17:14 +00:00
silverwind
ca6c0dee2e
Switch bitnami images to bitnamilegacy on CI (#35402)
As per https://github.com/bitnami/containers/issues/83267, my
understanding is that the `docker.io/bitnami` images will be deleted on
September 29.

To prevent this failure mode, use the images on the `bitnamilegacy` org
instead which are snapshots from when they stopped updating them.
Long-term, we should replace these images with official ones.
2025-09-03 14:17:16 +00:00
Lunny Xiao
e96ef97989
Upgrade dependencies (#35384)
- ~Upgrade golang to 1.25~ blocked by the issue
https://github.com/go-swagger/go-swagger/issues/3220
- Upgrade minor versions of most dependencies
- Upgrade github.com/google/go-github version to v74
- Fix meilisearch because of sdk interface change
- Use github.com/Necoro/html2text which is a fork instead of html2text
because of https://github.com/jaytaylor/html2text/issues/67 which
resulted in complie failure.
- Fix some deprecated methods of gitlab go client.
2025-09-02 23:13:38 -04:00
GiteaBot
086ff87e58 [skip ci] Updated translations via Crowdin 2025-09-03 00:32:59 +00:00
GiteaBot
8a534132c8 [skip ci] Updated translations via Crowdin 2025-09-02 00:34:51 +00:00
junoberryferry
ec75bdbe68
Use github.com/mholt/archives replace github.com/mholt/archiver (#35390)
Fix #32620

---------

Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: junoberryferry <user@example.tld>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-09-01 19:40:12 +00:00
Lunny Xiao
1717af72c4
Move some functions from package git to gitrepo (#33910)
Follow #33874
2025-09-01 19:13:18 +00:00
Lunny Xiao
d2e994db2c
Move git config/remote to gitrepo package and add global lock to resolve possible conflict when updating repository git config file (#35151)
Partially fix #32018 

`git config` and `git remote` write operations create a temporary file
named `config.lock`. Since these operations are not atomic, they must
not be run in parallel. If two requests attempt to modify the same
repository concurrently—such as during a compare operation—one may fail
due to the presence of an existing `config.lock` file.

In cases where `config.lock` is left behind due to an unexpected program
exit, a global lock mechanism could allow us to safely remove the stale
lock file when a related error is detected. While this behavior is not
yet implemented in this PR, it is planned for a future enhancement.

---------

Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-09-01 18:47:04 +00:00
Lunny Xiao
4e1b8db1fc
Move HasWiki to repository service package (#33912)
Move HasWiki out of the models package to avoid referencing the absolute
wiki path directly.
2025-09-01 11:12:58 -07:00
Michal Suchánek
ea96ff6b0c
Rename UpdateBranch API to RenameBranch API (#35374)
Discussed in #35368, originally implemented in #32433
2025-09-01 16:12:05 +00:00
GiteaBot
fd7ebaf427 [skip ci] Updated translations via Crowdin 2025-09-01 00:43:05 +00:00
confusedsushi
dca375aad2
when sorting issues by nearest due date, issues without due date should be sorted ascending (#35267)
When sorting issues and pull requests by the nearest due date, the
issues and PRs without a due date are currently sorted _descending_ by
their creation date. This seems counter intuitive to me. When sorting by
nearest due date I want to see the issues/PRs in the order they should
be worked on. For issues/PRs without a due date that order should be
first come first served rather than last come first served.

This PR now changes the ordering of issues/PRs which don't have a due
date to _ascending_ by their creation date. So that the oldest is shown
first and the newest last.

This now also makes the sort order nearest due date a true opposite to
farthest due date. At farthest due date the newest is shown first and
the oldest last.

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-08-29 19:05:18 -07:00
GiteaBot
fe7883c54f [skip ci] Updated translations via Crowdin 2025-08-30 00:32:53 +00:00
Lunny Xiao
0c6326e6ab
Upgrade xz to v0.5.15 (#35377) 2025-08-29 17:44:33 +00:00
wxiaoguang
1f50048ac9
Refactor db package (#35380)
Remove unnecessary code
2025-08-30 01:04:06 +08:00
Lunny Xiao
aef4a3514c
Remove the duplicated function GetTags (#35375)
This PR removes the GetTags function from the git module and keeps only
GetTagInfos. All previous usages of GetTags have been replaced with
database-based tag functions.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-08-29 01:11:42 +00:00