Commit Graph

19077 Commits (e741448a14903b2f10259417eb31bc7cae428e2d)

Author SHA1 Message Date
wxiaoguang e741448a14
Fix various problems (artifact order, api empty slice, assignee check, fuzzy prompt, mirror proxy, adopt git) (#33569)
* Make artifact list output a stable order
* Fix #33506
* Fix #33521
* Fix #33288
* Fix #33196
* Fix #33561
2025-02-13 03:26:27 +08:00
silverwind bcd1317d17
Switch to `@vitest/eslint-plugin` (#33573)
Package has been renamed and now also provides the globals so we can
replace two dependencies with one.

Ref: https://github.com/vitest-dev/eslint-plugin-vitest/issues/537
2025-02-12 11:08:34 -05:00
wxiaoguang f58f5bb3d8
Avoid duplicate SetContextValue call (#33564)
And fix FIXME and TODO
2025-02-12 14:25:46 +08:00
Zettat123 06f1065636
Add a transaction to `pickTask` (#33543)
In the old `pickTask`, when getting secrets or variables failed, the
task could get stuck in the `running` status (task status is `running`
but the runner did not fetch the task). To fix this issue, these steps
should be in one transaction.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-02-12 00:09:43 +08:00
wxiaoguang 245ac321c3
Fix context usage (#33554)
Some old code use direct type-casting to get context, it causes
problems.

This PR fixes all legacy problems and use correct `ctx.Value` to get
low-level contexts.

Fix #33518
2025-02-11 16:46:03 +08:00
Jason Song e9b98aef44
Enhance routers for the Actions runner operations (#33549)
- Find the runner before deleting
- Move the main logic from `routers/web/repo/setting/runners.go` to
`routers/web/shared/actions/runners.go`.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-02-11 01:39:10 +00:00
GiteaBot 217ffe5492 [skip ci] Updated translations via Crowdin 2025-02-11 00:32:23 +00:00
silverwind b3302748fa
Run yamllint with strict mode, fix issue (#33551)
Previously yamllint would issue warnings for certain things, while still
exiting with zero. Now warnings are treated like errors and will cause
non-zero exit:

```
  -s, --strict          return non-zero exit code on warnings as well as errors
```
2025-02-10 22:33:40 +00:00
Jason Song c422f179dd
Enhance routers for the Actions variable operations (#33547)
- Find the variable before updating or deleting
- Move the main logic from `routers/web/repo/setting/variables.go` to
`routers/web/shared/actions/variables.go`.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Giteabot <teabot@gitea.io>
2025-02-11 04:44:04 +08:00
jason19970210 e3adb686bb
enhancement: add additional command hints for PowerShell & CMD (#33548)
- resolving wrong signature calculations for SSH key verification

Fixed #22693

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Giteabot <teabot@gitea.io>
2025-02-11 04:14:37 +08:00
wxiaoguang 30993e9508
Feature: Support workflow event dispatch via API (#33545)
Fix: https://github.com/go-gitea/gitea/issues/31765 (Re-open #32059)

---------

Co-authored-by: Bence Santha <git@santha.eu>
Co-authored-by: Bence Sántha <7604637+bencurio@users.noreply.github.com>
Co-authored-by: Christopher Homberger <christopher.homberger@web.de>
2025-02-11 03:05:42 +08:00
Kerwin Bryant 085f273d19
Optimize the dashboard (#32990)
before:

![image](https://github.com/user-attachments/assets/d0b432e4-a521-4540-a489-d18b9c265674)

after:

![image](https://github.com/user-attachments/assets/dbb8b387-d150-41e2-b12b-f9d8450e36d7)
-----

![image](https://github.com/user-attachments/assets/40dcd71e-344b-4043-9811-77227c71aed9)
-----

Optimize the dashboard by adding welcoming messages or quick action
entry points (such as adding a new repository or organization) to ensure
that new users are not greeted by a blank page upon logging in.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-02-11 01:24:34 +08:00
Lunny Xiao 72518a8dab
Rework suggestion backend (#33538)
Fix #33522 

The suggestion backend logic now is

- If the keyword is empty, returned the latest 5 issues/prs with index
desc order
- If the keyword is digital, find all issues/prs which `index` has a
prefix with that, with index asc order
- If the keyword is non-digital or if the queried records less than 5,
searching issues/prs title with a `like`, with index desc order

## Empty keyword
<img width="310" alt="image"
src="https://github.com/user-attachments/assets/1912c634-0d98-4eeb-8542-d54240901f77"
/>

## Digital
<img width="479" alt="image"
src="https://github.com/user-attachments/assets/0356a936-7110-4a24-b21e-7400201bf9b8"
/>

## Digital and title contains the digital
<img width="363" alt="image"
src="https://github.com/user-attachments/assets/6e12f908-28fe-48de-8ccc-09cbeab024d4"
/>

## non-Digital
<img width="435" alt="image"
src="https://github.com/user-attachments/assets/2722bb53-baa2-4d67-a224-522a65f73856"
/>
<img width="477" alt="image"
src="https://github.com/user-attachments/assets/06708dd9-80d1-4a88-b32b-d29072dd1ba6"
/>

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-02-10 16:24:05 +00:00
wxiaoguang 704b65e012
Revert "Feature: Support workflow event dispatch via API (#32059)" (#33541)
This reverts commit 523751dc82.
2025-02-10 17:44:42 +08:00
Bence Sántha 523751dc82
Feature: Support workflow event dispatch via API (#32059)
ref: https://github.com/go-gitea/gitea/issues/31765

---------

Signed-off-by: Bence Santha <git@santha.eu>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Christopher Homberger <christopher.homberger@web.de>
2025-02-10 05:23:57 +08:00
wxiaoguang 06088ec672
Remove "class-name" from svg icon (#33540)
Only use "class" attribute
2025-02-09 22:39:54 +02:00
Kerwin Bryant a52720b5b4
Add "No data available" display when list is empty (#33517)
Add a "No data available" message to be displayed when the list has no
data. This improves the user experience by providing clear feedback in
an empty state.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-02-09 00:13:41 +08:00
mscherer 063c23e1bc
Add a option "--user-type bot" to admin user create, improve role display (#27885)
Partially solve #13044

Fix #33295

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-02-07 08:41:55 +00:00
TheFox0x7 1ec8d80fa3
refactor: decouple context from migration structs (#33399)
Use context as much as possible.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-02-07 05:37:32 +00:00
Lunny Xiao 466cc725bc
Move gitgraph from modules to services layer (#33527)
Just move, no code change.
2025-02-07 03:05:25 +00:00
Alexander McRae a1f1bccd7a
Add go wrapper around git diff-tree --raw -r -M (#33369)
* Implemented calling git diff-tree
 * Ensures wrapper function is called with valid arguments
 * Parses output into go struct, using strong typing when possible
2025-02-07 00:58:28 +00:00
GiteaBot dbc18f400a [skip ci] Updated translations via Crowdin 2025-02-07 00:31:35 +00:00
ChristopherHX 0070ffe560
Update MAINTAINERS (#33529)
* Add myself to the maintainers file
2025-02-07 08:10:49 +08:00
Kerwin Bryant 40426addfa
Add cropping support when modifying the user/org/repo avatar (#33498)
Fixed #33321

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-02-06 21:07:44 +08:00
GiteaBot 943cc4f989 [skip ci] Updated translations via Crowdin 2025-02-06 00:31:49 +00:00
John Smith a025fa70ab
Add alphabetical project sorting (#33504)
Fixes #33500
2025-02-05 19:09:43 +00:00
wxiaoguang fa0c8ae50f
Refactor gitdiff test (#33507) 2025-02-05 16:09:58 +00:00
techknowlogick 7e596bd7a9
add `timetzdata` build tag to binary releases (#33463)
`timetzdata` is already used in the docker images, this includes them
for the binary release files too.

Related to #33235 (I don't have a windows machine setup to test this
though)

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-02-05 04:17:08 +00:00
Lunny Xiao 6999651b6d
Fix unnecessary comment when moving issue on the same project column (#33496)
Fix #33482
2025-02-05 11:51:10 +08:00
GiteaBot a6819570be [skip ci] Updated translations via Crowdin 2025-02-05 00:32:05 +00:00
wxiaoguang 09a3b07f10
Refactor web route handler (#33488) 2025-02-05 02:14:03 +08:00
Henrique Corrêa d0f4e92563
Reject star-related requests if stars are disabled (#33208)
This PR fixes #33205.

If stars are disabled:
* The `.../repo/stars` page returns a 403 Forbidden error
* Star-related API endpoints return a 403 Forbidden error saying `Stars are disabled.`
* Same for action endpoints

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-02-04 13:21:23 +08:00
Lunny Xiao a4676db7dd
Fix commit status events (#33320)
Fix #32873 
Fix #33201 
~Fix #33244~
~Fix #33302~

depends on ~#33396~

A part of this PR should be backported to v1.23 manually.
2025-02-04 03:25:59 +00:00
GiteaBot 3c46cd6aae [skip ci] Updated translations via Crowdin 2025-02-04 00:31:03 +00:00
Lunny Xiao 3ebfc77e83
Disable cron task to update license (#33486)
Help #33467
The file can be changed or removed after that issue is resolved.
2025-02-03 22:52:20 +02:00
GiteaBot ed84f3737a [skip ci] Updated licenses and gitignores 2025-02-03 00:32:15 +00:00
Typed SIGTERM 50873c1925
Correct bot label `vertical-align` (#33477) 2025-02-02 18:42:30 +00:00
wxiaoguang 5dddcc1773
chore: fix some trivial problems and TODOs (#33473)
1. Fix incorrect `MentionCount` (actually it seems to be deadcode,
affects nothing)
2. Remove fallback sha1 support for time limit token
3. Use route middleware `reqRepoActionsWriter` for `ArtifactsDeleteView`
4. Use clearer message "Failed to authenticate user" instead of "Verify"
when auth fails
5. `tests/integration/benchmarks_test.go` is not quite right, actually
it is never used, so delete it.
6. Remove or update TODO comments
2025-02-02 18:16:56 +00:00
K Kovacs 34692a20b1
Worktime tracking for the organization level (#19808)
Dear Gitea team,

first of all, thanks for the great work you're doing with this project.

I'm planning to introduce Gitea at a client site, and noticed that while
there is time recording, there are no project-manager-friendly reports
to actually make use of that data, as were also mentioned by others in
#4870 #8684 and #13531.

Since I had a little time last weekend, I had put together something
that I hope to be a useful contribution to this great project (while of
course useful for me too).

This PR adds a new "Worktime" tab to the Organisation level. There is a
date range selector (by default set to the current month), and there are
three possible views:

- by repository,
- by milestone, and
- by team member.

Happy to receive any feedback!

There are several possible future improvements of course (predefined
date ranges, charts, a member time sheet, matrix of repos/members, etc)
but I hope that even in this relatively simple state this would be
useful to lots of people.

<img width="1161" alt="Screen Shot 2022-05-25 at 22 12 58"
src="https://user-images.githubusercontent.com/118010/170366976-af00c7af-c4f3-4117-86d7-00356d6797a5.png">

Keep up the good work!

Kristof

---------

Co-authored-by: user <user@kk-git1>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-02-03 01:51:12 +08:00
wxiaoguang 869f8fdbe4
Skip deletion error for action artifacts (#33476) 2025-02-02 09:48:19 -05:00
Lunny Xiao aec0b7ec34
Update .changelog file to add performance label group (#33472) 2025-02-02 06:40:39 +00:00
6543 fcfe1fb0fc
actions view: move loading of task attributes etc... into own func (#31494)
just a smal refactor to make the function length smaler ... and code
more reusable in the future
2025-02-02 03:39:01 +00:00
GiteaBot 9cd88ef8c7 [skip ci] Updated translations via Crowdin 2025-02-02 00:33:31 +00:00
Typed SIGTERM 47bf836310
Update feishu icon (#33470) 2025-02-01 14:08:32 +00:00
Bruno Sofiato 040c830dec
Inclusion of rename organization api (#33303)
This adds an endpoint (`/orgs/{org}/rename`) to rename organizations.

I've modeled the endpoint using the rename user endpoint --
`/admin/users/{username}/rename` -- as base.

It is the 1st time I wrote a new API endpoint (I've tried to follow the
rename users endpoint code while writing it). So feel free to ping me if
there is something wrong or missing.

Resolves #32995

---------

Signed-off-by: Bruno Sofiato <bruno.sofiato@gmail.com>
Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-02-01 00:59:49 +00:00
GiteaBot 5b83203f37 [skip ci] Updated translations via Crowdin 2025-02-01 00:33:46 +00:00
wxiaoguang 1ab5938e82
Hide/disable unusable UI elements when a repository is archived (#33459)
And by the way, remove some jQuery code
2025-01-31 20:47:31 +08:00
wxiaoguang 0e8738b4b6
Fix SSH LFS memory usage (#33455)
Fix #33448
2025-01-31 19:05:48 +08:00
wxiaoguang 4f3cc26b4e
Revert empty lfs ref name (#33454)
Fix #33453
2025-01-31 18:03:11 +08:00
silverwind 05e9063013
Update `@github/text-expander-element`, adapt type imports (#33449)
Followup to https://github.com/go-gitea/gitea/pull/33435, upstream issue
is fixed so the imports are clean now.
2025-01-31 02:50:18 +00:00