Commit Graph

19855 Commits (4666bc17e453bef4d676e151fecd79392b51ff16)

Author SHA1 Message Date
6543 4666bc17e4
Merge branch 'main' into lunny/milestone_order_due_date 2025-09-07 09:47:15 +02: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
Lunny Xiao d91604ed2f
Merge branch 'main' into lunny/milestone_order_due_date 2025-09-04 21:30:32 -07: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
GiteaBot 09c3189ab7 [skip ci] Updated translations via Crowdin 2025-08-29 00:34:50 +00:00
Fabian Meyer e19d0e4f56
Allow foreachref parser to grow its buffer (#35365)
Fixes #35221, let the scanner's buffer grow up to 4x (256 kiB), and add an error check

---------

Signed-off-by: Fabian Meyer <fabian.meyer@lawo.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-08-28 10:18:54 +00:00
wxiaoguang dca1af7cad
Remove global context from db package (#35371) 2025-08-28 09:44:02 +00:00
Lunny Xiao fb056bf4ed
Use gitrepo.SetDefaultBranch when set default branch of wiki repository (#33911) 2025-08-28 06:06:39 +00:00
Lunny Xiao 7636d581d9
Deleting branch could delete broken branch which has database record but git branch is missing (#35360)
For some reasons, branches between database and git are not synced. If a
branch exists in database but not in the git, it should be able to be
deleted.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-08-27 22:32:22 -07:00
wxiaoguang 0cbaa0b662
Remove incorrect "db.DefaultContext" usages (#35366) 2025-08-28 03:52:43 +00:00
cui 7aef7ea2d4
Refactor to use reflect.TypeFor (#35370) 2025-08-27 20:13:31 -07:00
GiteaBot 89cc9663f8 [skip ci] Updated translations via Crowdin 2025-08-28 00:34:46 +00:00
wxiaoguang 60246730b5
Remove wrong "git.DefaultContext" (#35364) 2025-08-27 16:31:21 +00:00
wxiaoguang e837c998b7
Fix context usages (#35348) 2025-08-27 11:00:01 +00:00
LyricWulf da5ce5c8e7
Instance signing rule `pubkey` should allow all public keys, not just GPG (#35357)
Instance signing rule `pubkey` is described as "Only sign if the user
has a public key", however if the user only has SSH public keys, this
check will fail, as it only checks for GPG keys.

Changed the `pubkey` checks to call a helper `userHasPubkeys` which
sequentially checks for GPG, then SSH keys.

Related #34341

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-08-26 15:06:37 -07:00
Lunny Xiao c4fbccc4ec
Allow deleting comment with content via API like web did (#35346)
Fix #35296
2025-08-25 10:43:11 +00:00
NorthRealm c7b99c8cc7
Prevent duplicate actions email (#35215)
Trying to prevent duplicate action emails by adding an extra check on job status.

---------

Signed-off-by: NorthRealm <155140859+NorthRealm@users.noreply.github.com>
Co-authored-by: Christopher Homberger <christopher.homberger@web.de>
2025-08-24 09:30:56 -07:00
techknowlogick ed8d4dc37a
rename nightly docker tag for main branch (#35344)
fixes https://github.com/go-gitea/gitea/issues/35338
2025-08-24 13:40:50 +08:00
Lunny Xiao 3a969a58c2
Fix atom/rss mixed error (#35345) 2025-08-23 22:29:52 +00:00
techknowlogick a2d88cd597
Remove deprecated auth sources (#35272)
Entra ID users should use the OIDC oauth2 provider.

They will still be shown if the instance has a previous Azure AD source
configured.

---------

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2025-08-23 20:39:05 +00:00
Lunny Xiao e1fd9e3cd1
Always return the relevant status information, even if no status exists. (#35335) 2025-08-23 18:48:44 +00:00
GiteaBot 4b19e292b9 [skip ci] Updated translations via Crowdin 2025-08-23 00:34:05 +00:00
Lunny Xiao 0739595dcd
Upgrade mermaid from 11.9.0 to 11.10.0 (#35329) 2025-08-22 12:53:09 +02:00