2
0
Commit Graph

19063 Commits

Author SHA1 Message Date
Bence Sántha
00aa9fd415 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
95b338229f Remove "class-name" from svg icon (#33540)
Only use "class" attribute
2025-02-09 22:39:54 +02:00
Kerwin Bryant
b468f74a2e 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
e4885adcb1 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
841384620e 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
507ad54706 Move gitgraph from modules to services layer (#33527)
Just move, no code change.
2025-02-07 03:05:25 +00:00
Alexander McRae
800a5855cd 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
484e53b252 [skip ci] Updated translations via Crowdin 2025-02-07 00:31:35 +00:00
ChristopherHX
de773e9423 Update MAINTAINERS (#33529)
* Add myself to the maintainers file
2025-02-07 08:10:49 +08:00
Kerwin Bryant
97c3af3c69 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
581fdcd4c7 [skip ci] Updated translations via Crowdin 2025-02-06 00:31:49 +00:00
John Smith
3769d4eb6d Add alphabetical project sorting (#33504)
Fixes #33500
2025-02-05 19:09:43 +00:00
wxiaoguang
7062a6df53 Refactor gitdiff test (#33507) 2025-02-05 16:09:58 +00:00
techknowlogick
f297eaef9e 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
c3f783391c Fix unnecessary comment when moving issue on the same project column (#33496)
Fix #33482
2025-02-05 11:51:10 +08:00
GiteaBot
7e44b09091 [skip ci] Updated translations via Crowdin 2025-02-05 00:32:05 +00:00
wxiaoguang
aa727086f6 Refactor web route handler (#33488) 2025-02-05 02:14:03 +08:00
Henrique Corrêa
b3d3e55051 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
7d80de56c3 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
01b7948400 [skip ci] Updated translations via Crowdin 2025-02-04 00:31:03 +00:00
Lunny Xiao
f10d905879 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
d176ca155d [skip ci] Updated licenses and gitignores 2025-02-03 00:32:15 +00:00
Typed SIGTERM
dffe9832d0 Correct bot label vertical-align (#33477) 2025-02-02 18:42:30 +00:00
wxiaoguang
be01eea035 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
dc2a90be88 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
c5739aa83d Skip deletion error for action artifacts (#33476) 2025-02-02 09:48:19 -05:00
Lunny Xiao
3b60b25eb5 Update .changelog file to add performance label group (#33472) 2025-02-02 06:40:39 +00:00
6543
159f3501a2 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
30b55158b8 [skip ci] Updated translations via Crowdin 2025-02-02 00:33:31 +00:00
Typed SIGTERM
3065a85066 Update feishu icon (#33470) 2025-02-01 14:08:32 +00:00
Bruno Sofiato
4ec6772f50 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
356361574c [skip ci] Updated translations via Crowdin 2025-02-01 00:33:46 +00:00
wxiaoguang
0ccf4baed9 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
df4411b037 Fix SSH LFS memory usage (#33455)
Fix #33448
2025-01-31 19:05:48 +08:00
wxiaoguang
29a08b7ae8 Revert empty lfs ref name (#33454)
Fix #33453
2025-01-31 18:03:11 +08:00
silverwind
5b1706ff90 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
wxiaoguang
fe35823a5f Support choose email when creating a commit via web UI (more) (#33445)
Follow #33432
2025-01-31 02:36:18 +00:00
wxiaoguang
f2d12eb8e3 Fix issue sidebar dropdown keyboard support (#33447)
Just a quick fix, fix #33444
2025-01-30 22:54:50 +00:00
wxiaoguang
0577385628 Fix "redirect link" handling (#33440)
`a%2fb` should not redirect to `a/b`

---------

Co-authored-by: delvh <dev.lh@web.de>
2025-01-31 04:12:14 +08:00
Lunny Xiao
6800c46bc2 Refactor repository transfer (#33211)
- Both have `RejectTransfer` and `CancelTransfer` because the permission
checks are not the same. `CancelTransfer` can be done by the doer or
those who have admin permission to access this repository.
`RejectTransfer` can be done by the receiver user if it's an individual
or those who can create repositories if it's an organization.

- Some tests are wrong, this PR corrects them.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-01-30 05:40:44 +00:00
silverwind
3c5eba824f Enable two more strict options in tsconfig (#33438)
These have no violations so are safe to enable

- https://www.typescriptlang.org/tsconfig/#strictBindCallApply
- https://www.typescriptlang.org/tsconfig/#strictBuiltinIteratorReturn
2025-01-30 05:15:35 +00:00
Lunny Xiao
1854dfb56b Add tests for webhook and fix some webhook bugs (#33396)
This PR created a mock webhook server in the tests and added integration
tests for generic webhooks.
It also fixes bugs in package webhooks and pull request comment
webhooks.
2025-01-30 03:09:48 +00:00
wxiaoguang
28df251506 Support choose email when creating a commit via web UI (#33432)
Initial PR for #24469
2025-01-30 01:24:57 +00:00
Rowan Bohde
e28fe5eda2 Link to tree views of submodules if possible (#33424)
This is a follow-up to https://github.com/go-gitea/gitea/pull/33097. 

When linking a submodule at a commit in either the repo view, or a diff
when adding a new submodule, link to the tree view of that submodules
intead of the individual commit. This shows the user the full tree,
instead of the diff of the commit.

This makes the assumption that the tree for a given SHA is at
`<repo_url>/tree/<sha>`. This URL format is supported by both Github &
Gitlab, but not Gitea. To fix this, add a redirect from
`<username>/<repo>/tree/<ref>` to `<username>/<repo>/src/<ref>`, so that
Gitea can support this URL structure.
2025-01-30 00:09:52 +00:00
silverwind
349f535537 Update @github/text-expander-element to 2.9.0 (#33435)
Update and use their newly exported types. Tested, works.

The import path is a bit suboptimal, to be fixed once
https://github.com/github/text-expander-element/pull/75 is merged and
released.

Co-authored-by: Giteabot <teabot@gitea.io>
2025-01-29 23:38:53 +00:00
wxiaoguang
5ab5db5af5 Refactor user & avatar (#33433)
1. better GetPossibleUserByID logic
2. fix some function name & comment typos
3. do not re-generate avatar if one exists
2025-01-30 07:33:50 +08:00
GiteaBot
bf396db629 [skip ci] Updated translations via Crowdin 2025-01-29 00:31:19 +00:00
wxiaoguang
b0b7ae6e76 Refactor user package (#33423)
and avoid global variables
2025-01-29 01:14:35 +02:00
Zettat123
a5a3b597c0 Fix GetCommitBranchStart bug (#33298)
Fix #33265
Fix #33370

This PR also fixes some bugs in `TestGitGeneral`.
2025-01-28 02:59:15 +00:00
silverwind
2051d9ac18 Update stylelint config (#33419)
- Inherit stylelint config from
[`stylelint-config-recommended`](https://github.com/stylelint/stylelint-config-recommended),
removed all stylelint core rule options that were either already in
their config or disabled.
- `no-descending-specificity` diverges from their config, seems to much
work currently.
- Tweaked a few rules.
- Added
[`stylelint-define-config`](https://github.com/stylelint-types/stylelint-define-config)
so that typescript can validate the config.
2025-01-28 02:34:01 +00:00