Commit Graph

19398 Commits

Author SHA1 Message Date
GiteaBot
04fab1818b [skip ci] Updated translations via Crowdin 2025-04-23 00:34:59 +00:00
wxiaoguang
4832cb9e27
Display when a release attachment was uploaded (#34261)
Fix #34260
2025-04-22 23:03:49 +08:00
badhezi
1b1d53ab89
Fix Set Email Preference dropdown and button placement (#34255)
Resolves https://github.com/go-gitea/gitea/issues/34209

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-04-22 10:24:29 +00:00
GiteaBot
310fdeb453 [skip ci] Updated translations via Crowdin 2025-04-22 00:35:41 +00:00
Kerwin Bryant
714245844f
Update compare.tmpl (#34251)
before:

![1745215925689](https://github.com/user-attachments/assets/36a02f59-b23e-444c-b00a-dd69b81dd910)

after:

![1745215793514](https://github.com/user-attachments/assets/d3f7c228-923a-40bd-9f4c-353947478d0f)
2025-04-21 23:14:38 +00:00
wxiaoguang
9705adb27f
Make public URL generation configurable (#34250)
Follow up #32564

Co-authored-by: Jannis Pohl <838818+jannispl@users.noreply.github.com>
Co-authored-by: Denys Konovalov <kontakt@denyskon.de>
2025-04-22 06:49:37 +08:00
Denys Konovalov
9a071a596f
Add API endpoint to request contents of multiple files simultaniously (#34139)
Adds an API POST endpoint under `/repos/{owner}/{repo}/file-contents`
which receives a list of paths and returns a list of the contents of
these files.

This API endpoint will be helpful for applications like headless CMS
(reference: https://github.com/sveltia/sveltia-cms/issues/198) which
need to retrieve a large number of files by reducing the amount of
needed API calls.

Close #33495

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-04-22 01:20:11 +08:00
YaFou
e947f309b1
Add API routes to lock and unlock issues (#34165)
This pull request adds a GitHub-compatible API endpoint to lock and
unlock an issue.

The following routes exist now:
- `PUT /api/v1/repos/{owner}/{repo}/issues/{id}/lock` to lock an issue
- `DELETE /api/v1/repos/{owner}/{repo}/issues/{id}/lock` to unlock an issue

Fixes #33677
Fixes #20012

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-04-21 00:43:43 +00:00
Jannis Pohl
d1a3bd6814
Make ROOT_URL support using request Host header (#32564)
Resolve #32554

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-04-20 11:43:48 +00:00
Dejan Kitic
af6be75adb
Valid email address should only start with alphanumeric (#28174)
This fixes issue #27847 where regular expression allowed email address
to start with special symbols. Valid email addresses should start with
alphanumeric character, and as such will be rendered as email.

Added test cases from the bug report to validate, such input will not be
rendered anymore as email address.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-04-20 19:18:14 +08:00
Lunny Xiao
6d3c6741ec
Fix notify watch failure when the content is too long (#34233)
Fix #28193

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-04-20 02:49:57 +00:00
Eric Hawicz
166ec1b4c3
Add "--fullname" arg to gitea admin user create (#34241)
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-04-19 23:36:30 +08:00
wxiaoguang
c9aa9068b3
Fix various UI problems (#34243)
Also fix #34242
2025-04-19 08:43:22 +00:00
D
eda6d65818
markup: improve code block readability and isolate copy button (#34009)
Fix #33197

Improve the rendering of code blocks in markdown content 
for better readability and UI stability across screen sizes.

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-04-19 05:53:39 +00:00
Kemal Zebari
f0544dbfca
Don't assume the default wiki branch is master in the wiki API (#34244)
Resolves #34218.

In the recent past, the default wiki branch was made to be changeable.
This change reflects this.
2025-04-19 03:13:00 +00:00
GiteaBot
8b7c0d8f8d [skip ci] Updated translations via Crowdin 2025-04-19 00:32:56 +00:00
Kerwin Bryant
aeb7005245
Optimize the calling code of queryElems (#34235) 2025-04-19 08:17:07 +08:00
ChristopherHX
21b43fce08
Actions Runner rest api (#33873)
Implements runner apis based on
https://docs.github.com/en/rest/actions/self-hosted-runners?apiVersion=2022-11-28#list-self-hosted-runners-for-an-organization

- Add Post endpoints for registration-token, google/go-github revealed
this as problem
  - We should deprecate Get Endpoints, leaving them for compatibility
- Get endpoint of admin has api path /admin/runners/registration-token
that feels wrong, /admin/actions/runners/registration-token seems more
consistent with user/org/repo api
- Get Runner Api
- List Runner Api
- Delete Runner Api

- Tests admin / user / org / repo level endpoints

Related to #33750 (implements point 1 and 2)
Via needs discovered in #32461, this runner api is needed to allow
cleanup of runners that are deallocated without user interaction.

---------

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-04-18 15:22:41 +00:00
wxiaoguang
ba0deab616
Fix some trivial problems (#34237)
1. Using existing "content" variable in `swift.go`
2. Do not report 500 server error in `GetPullDiffStats` middleware,
otherwise a PR missing ref won't be able to view.
3. Fix the abused "label button" when listing commits, there was too
much padding space, see the screenshot below.
2025-04-18 22:56:50 +08:00
Wolfgang Reithmeier
2683adfcb4
Swift files can be passed either as file or as form value (#34068)
Fix #33990

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-04-18 20:09:56 +08:00
Kerwin Bryant
dd0caf7e16
Fix various misalignments and overflows (#34227)
---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-04-17 10:32:41 +00:00
Lunny Xiao
42f45f1489
Update net package (#34228) 2025-04-17 06:06:58 -04:00
Kerwin Bryant
bde014e46d
Fix button alignments and remove unnecessary styles (#34206)
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-04-16 08:14:10 +00:00
badhezi
a4f22a3e80
Fix project board links to related Pull Requests (#34213)
Resolves https://github.com/go-gitea/gitea/issues/34181
2025-04-16 07:31:33 +00:00
Kerwin Bryant
e8c42ae601
Fix empty repo clone panel border (#34219)
Remove duplicate border

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-04-16 07:05:40 +00:00
Hyungsub (Danny) Kim
dcfa42dd8f
Fix: quoted replies incorrectly render user input as part of the quote (#34216)
Updated the quote insertion logic so that it adds one more line break
(`\n`) work like Github. This way, the cursor lands on a new line and
the user's reply is no longer interpreted as part of the quote.

Fixes #34177
2025-04-16 14:32:58 +08:00
GiteaBot
f1cd90d3bd [skip ci] Updated translations via Crowdin 2025-04-16 00:35:25 +00:00
Kerwin Bryant
3a651cfd02
Fix two missed null value checks on the wiki page. (#34205)
before:

![image](https://github.com/user-attachments/assets/83e5513f-a4fa-406d-a010-8ec8cd873203)

after:

![image](https://github.com/user-attachments/assets/6bca76c7-0445-429a-92b1-1a9f96d6daca)
2025-04-15 09:54:29 -07:00
wxiaoguang
d2d381fd4b
Improve "lock conversation" UI (#34207)
Fix #34203
2025-04-15 15:01:12 +00:00
Kerwin Bryant
2b99a58f54
Mark parent directory as viewed when all files are viewed (#33958)
Fix #25644 

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-04-15 22:35:22 +08:00
bytedream
18a673bad1
Restore form inputs on organization create error (#34201)
Keeps the entered inputs when the "organization create" request
returns an error.

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-04-15 08:21:51 +00:00
Kerwin Bryant
421d0e5849
Align User Details Page Header Layout with Design Specifications (#34192) 2025-04-15 01:16:33 -04:00
techknowlogick
3b5aaa836e
bump vite to 6.2.6 (#34202) 2025-04-15 00:33:07 +00:00
Meng Zhuo
921d3a394d
feat: add riscv64 support (#34199) 2025-04-14 16:32:54 +00:00
Kerwin Bryant
33df23c1f0
Update RepoContributors.vue (#34194) 2025-04-14 14:51:49 +00:00
Rowan Bohde
c57304ac3f
Add middleware for request prioritization (#33951)
This adds a middleware for overload protection that is intended to help protect against malicious scrapers.
It does this via [`codel`](https://github.com/bohde/codel), which will perform the following:

1. Limit the number of in-flight requests to some user-defined max
2. When in-flight requests have reached their begin queuing requests.
    Logged-in requests having priority above logged-out requests
3. Once a request has been queued for too long,
    it has a probabilistic chance to be rejected based on how overloaded the entire system is.

When a server experiences more traffic than it can handle,
this keeps latency low for logged-in users and rejects just
enough requests from logged-out users to not overload the service.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Giteabot <teabot@gitea.io>
2025-04-14 16:25:48 +02:00
Kerwin Bryant
3a9fcac11b
Update protected_branch.tmpl (#34193)
Show correct message for new/edit. Add "required" to rule name.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-04-14 13:41:00 +00:00
wxiaoguang
58a3952458
Fix package upload temp path (#34196)
Fix #34195

The temp dir should be created when it is used.
2025-04-14 18:55:02 +08:00
Lunny Xiao
f6474cf2e9
Fix bug when migrating repository (#34182)
This PR fixed a bug which is a regression from #31035
2025-04-14 04:48:03 +00:00
TheFox0x7
8a6df00c53
fix github migration error when using multiple tokens (#34144)
Git authorization was not taking into account multiple token feature,
leading to auth failures

Closes: https://github.com/go-gitea/gitea/issues/34141

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-04-13 23:20:14 +00:00
KN4CK3R
bec9233c29
Add package version api endpoints (#34173)
Fixes #33544

Adds two new api endpoints to list a versions of a package and to get
the latest version of a package by API.

⚠️ BREAKING ⚠️ 
the `size` field for this endpoint changes from `Size` to `size`.
2025-04-13 20:00:44 +00:00
wxiaoguang
34349c085c
Fix incorrect file links (#34189)
Fix #34188

The name "FileName" is ambiguous: sometimes it is "base name without
path", sometimes it is "full name with path".

The ambiguous name causes various problems.

This PR clarifies the usage: `FileTreePath`: the full name with path.
2025-04-13 12:27:31 -07:00
KN4CK3R
a2651c14ce
Add cache for common package queries (#22491)
This adds a cache for common package queries in `GetPackageDescriptor`.
Code which needs to process a list of packages benefits from this
change. This skips 350 queries in the package integration tests for
example.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-04-13 09:40:36 +00:00
Tomeamis
4dca869ed1
Allow admins and org owners to change org member public status (#28294)
Allows admins and org owners to change org member public status.

Before, this would return `Error 403: Cannot publicize another member`
despite the fact that the same user could make the same change through
the GUI.

Fixes #28372

---------

Co-authored-by: Tomáš Ženčák <zencak@ica.cz>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-04-13 08:07:29 +00:00
Kerwin Bryant
d0688cb2b3
Fix span svg layout (#34185) 2025-04-13 12:44:57 +08:00
hiifong
aada0370e7
fix webhook url (#34186)
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-04-13 02:24:32 +00:00
Kerwin Bryant
f4196a8843
Optimize overflow-menu (#34183)
Optimized the overflow-menu:
1. Close the tippy when a menu item inside the tippy is clicked.
2. When a menu item inside the tippy is selected, move the active state
of the menu to the tippy's button.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-04-13 01:59:36 +00:00
Lunny Xiao
93a2def96b
Move and rename UpdateRepository (#34136) 2025-04-12 18:22:18 +00:00
Kerwin Bryant
5015992db5
Update milestones.tmpl (#34184) 2025-04-12 11:34:42 +08:00
GiteaBot
7a587bc2d3 [skip ci] Updated translations via Crowdin 2025-04-12 00:33:41 +00:00