0
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-07-21 14:34:43 +02:00

19463 Commits

Author SHA1 Message Date
bytedream
614a4b34d9 Update 2025-05-08 12:51:58 +02:00
bytedream
fb3e80106d Update comments and names 2025-05-08 12:35:52 +02:00
bytedream
3ad1e7e215 Enable commit button only if something has changed 2025-05-08 12:28:18 +02:00
bytedream
9811c28627 Merge branch 'main' into non-text-edit 2025-05-08 10:43:14 +02:00
bytedream
2fbc8f9e87
Fix LFS file not stored in LFS when uploaded/edited via API or web UI (#34367)
Files that should be stored in LFS and are uploaded/edited from the API
or web UI aren't stored in LFS. This may be a regression from #34154.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-05-08 13:07:53 +08:00
GiteaBot
82071ee730 [skip ci] Updated translations via Crowdin 2025-05-08 00:36:14 +00:00
Kerwin Bryant
bbfc21e74f
Fix "The sidebar of the repository file list does not have a fixed height #34298" (#34321)
There is a known issue where scrolling to the bottom of the page is
affected by unknown elements in the footer area:

24145f8110/templates/base/footer.tmpl (L11-L18)

![after](https://github.com/user-attachments/assets/4cdbce32-d22e-4907-a78b-c8e301017fac)
2025-05-07 21:33:30 +00:00
Tobias Balle-Petersen
020e774b91
feat: add label 'state' to metric 'gitea_users' (#34326)
This PR adds the label _state_ to the metric _gitea_users_. With the
change, _gitea_users_ would be reported like this:

```
...
# HELP gitea_users Number of Users
# TYPE gitea_users gauge
gitea_users{state="active"} 20
gitea_users{state="inactive"} 10
...
```

The metrics above would be from a Gitea instance with 30 user accounts.
20 of the accounts are active and 10 of the accounts are not active.

Resolve #34325
2025-05-07 18:00:53 +00:00
silverwind
dd886d729f
Update JS and PY dependencies (#34391)
Result of `make update-js update-py svg`. Quick test of the UI worked.
2025-05-07 13:21:38 -04:00
Lunny Xiao
2a660b4a1b
Upgrade go-github v61 -> v71 (#34385)
There will be a possible bug when migrating from Github
https://github.com/google/go-github/issues/3229
This PR upgrades go-github from v61 to v71 to resolve that problem.
2025-05-06 20:10:14 -07:00
Yarden Shoham
6bd8fe5353
Bump @github/relative-time-element to v4.4.7 (#34384)
Tested, it works as before.
Changelog:
https://github.com/github/relative-time-element/releases/tag/4.4.7

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
2025-05-06 12:44:25 -04:00
bytedream
3d64a84929 Update lfs pointer checks 2025-05-06 14:09:15 +02:00
bytedream
4d17f51417 Remove unnecessary entry blob open 2025-05-06 14:02:03 +02:00
bytedream
1efe0e7ea7 Close data blobs 2025-05-06 13:29:34 +02:00
6543
a2024953c5
gitignore: Visual Studio settings folder (#34375) 2025-05-06 03:29:48 -04:00
NorthRealm
6b2c506e05
Grey out expired artifact on Artifacts list (#34314)
Grey out expired artifact on Artifacts list.

![1](https://github.com/user-attachments/assets/79c00e39-29f5-4264-b7b2-7ed638ab71c1)

![2](https://github.com/user-attachments/assets/686b745f-d6d7-4921-8e1b-3472ac8b6c17)

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-05-05 21:53:17 -07:00
bytedream
2848fdf91f Merge branch 'main' into non-text-edit
# Conflicts:
#	routers/web/repo/editor.go
2025-05-06 04:32:04 +02:00
bytedream
12bf0b8e42
Fix only text/* being viewable in web UI (#34374)
Regression from #34356, files like SVGs should be editable too
(https://github.com/go-gitea/gitea/pull/34356#discussion_r2072766240).
2025-05-06 00:15:22 +03:00
bytedream
691073d736 Typo fix 2025-05-05 21:17:24 +02:00
bytedream
2698321eb1 Syntax and comment changes 2025-05-05 21:12:29 +02:00
bytedream
02fe2dbe37 Revert unnecessary locale key rename 2025-05-05 20:43:20 +02:00
bytedream
e960fe34c5 Fix file content only read on new file 2025-05-05 18:55:47 +02:00
bytedream
6f3b69b900 Fix empty binary content after move 2025-05-05 18:39:40 +02:00
Tobias Balle-Petersen
712fccadd6
add maintainer tobiasbp (#34372)
This PR adds me as a _maintainer_ as suggested by @techknowlogick. 

A couple of my recent PRs:
* https://github.com/go-gitea/gitea/pull/34324
* https://github.com/go-gitea/gitea/pull/34323
2025-05-05 09:17:45 -07:00
GiteaBot
833c2a432b [skip ci] Updated translations via Crowdin 2025-05-05 00:38:37 +00:00
bytedream
07845a262d Unify locale keys 2025-05-05 02:14:30 +02:00
bytedream
349d5b1597 Do not show editor for locked lfs file by other user 2025-05-05 02:07:01 +02:00
bytedream
5dc082a2ad Make LFS file paths editable 2025-05-05 02:01:26 +02:00
bytedream
96bbf81700 Merge branch 'main' into non-text-edit
# Conflicts:
#	routers/web/repo/editor.go
2025-05-05 01:40:21 +02:00
Lunny Xiao
62f73491f3
Use lfs label for lfs file rather than a long description (#34363)
Before


![image](https://github.com/user-attachments/assets/ed6c9221-5a6a-4717-8178-e5528fd180bf)

After


![image](https://github.com/user-attachments/assets/baa94350-ead4-46bf-b4b7-1bfd3aa5dcac)
2025-05-05 00:07:29 +03:00
Lunny Xiao
51aafb4278
Fix bug when API get pull changed files for deleted head repository (#34333) 2025-05-04 19:17:17 +00:00
Lunny Xiao
41f3d062a2
Fix bug when visiting comparation page (#34334)
The `ci.HeadGitRepo` was opened and closed in the function
`ParseCompareInfo` but reused in the function `PrepareCompareDiff`.
2025-05-04 18:52:00 +00:00
bytedream
180aa00abf
Fix LFS files being editable in web UI (#34356)
It's possible to edit "raw" lfs files in the web UI when accessing the path manually.

![image](https://github.com/user-attachments/assets/62610e9e-24db-45ec-ad04-28062073164c)
2025-05-04 11:23:28 -07:00
Yarden Shoham
3446f14ba0
Bump @github/relative-time-element to v4.4.6 (#34352)
Tested, it works as before.

Changelog:
https://github.com/github/relative-time-element/releases/tag/v4.4.6

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
2025-05-03 10:31:16 -07:00
bytedream
cf44789a00 Fix new file not being editable 2025-05-03 03:20:22 +02:00
bytedream
dcaadb801f Remove duplicated context data 2025-05-03 02:57:33 +02:00
bytedream
7684e1720d Do not read file if it is too large 2025-05-03 01:43:26 +02:00
bytedream
f53085691e Move lfs cannot edit context data 2025-05-02 23:42:39 +02:00
bytedream
c6598c27d3 Enable path editing of non text files 2025-05-02 23:22:12 +02:00
bytedream
cbb2e52911
Fix repo search input height (#34330)
before:

![before](https://github.com/user-attachments/assets/1abdcb8a-d005-4f35-8d2e-1581fde26e0c)

after:

![after](https://github.com/user-attachments/assets/41dab645-c5a7-4c45-9215-1340fb411130)


The difference is minimal, only a few pixels above and beneath, but it
stands out when switching fast between the tabs on the explore route.
2025-05-01 20:41:54 +00:00
Tobias Balle-Petersen
3e49fba578
feat: return time of last usage for public keys and access tokens in the api (#34323)
In the Gitea GUI, the user can see the time that _AccessTokens_ and
_PublicKeys_ were last used. This information is not returned by the
_/users/{username}/tokens_ and _/user/keys_ endpoints in the API. This
PR adds the missing data.

The time of last usage for for _tokens_ & _keys_ seem to be stored in
the _Updated_ field of the structs internally. For consistency, I have
used the name _updated_at_ for the new field returned by the _API_.
However, for the _API_ user, I don't think that name reflects the data
returned, as I believe it is the time of last usage. I propose that we
use the name _last_used_at_ instead. Let's hear reviewers opinion on
that.

* PublicKey
  1. _last_used_at_: string($date-time)
* AccessToken
  1. _created_at_: string($date-time) (for parity with public keys)
  2. _last_used_at_: string($date-time)

Fix #34313
2025-05-01 21:42:17 +03:00
Tobias Balle-Petersen
e67f74efc8
fix: do not return archive download URLs in API if downloads are disabled (#34324)
If archive downloads are are disabled using
_DISABLE_DOWNLOAD_SOURCE_ARCHIVES_, archive links are still returned by
the API.

This PR changes the data returned, so the fields _zipball_url_ and
_tarball_url_ are omitted if archive downloads have been disabled.

Resolve #32159
2025-04-30 10:06:37 -07:00
wxiaoguang
ba5c3f8087
Fix some dropdown problems on the issue sidebar (#34308)
Also fix #34300
2025-04-30 02:00:36 +00:00
GiteaBot
ce6699db01 [skip ci] Updated translations via Crowdin 2025-04-30 00:35:28 +00:00
Kerwin Bryant
1f52304f90
Fix button alignments (#34307)
Continue with #34206.
2025-04-29 16:57:47 +00:00
Mingzhu Yan
7bd2ce7109
fix go version (#34299)
go cmd will download and cache a copy of the Go toolchain, go1.24 is not
a valid version since https://github.com/golang/go/issues/57631.
2025-04-29 12:24:53 +00:00
Lunny Xiao
648df8a5e1
Fix the ci build (#34309)
Fix
https://github.com/go-gitea/gitea/actions/runs/14722306878/job/41318217870

A fork has been created under https://gitea.com/gitea/go-xsd-duration
2025-04-28 20:47:16 -07:00
Kerwin Bryant
2b76993415
support the open-icon of folder (#34168)
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-04-28 19:51:32 -07:00
Lunny Xiao
44d7d2973a
Fix wrong review requests when updating the pull request (#34286)
Fix #34224

The previous implementation in #33744 will get the pushed commits
changed files. But it's not always right when push a merged commit. This
PR reverted the logic in #33744 and will always get the PR's changed
files and get code owners.
v1.25.0-dev
2025-04-28 22:57:56 +00:00
wxiaoguang
0148d03f21
Enforce two-factor auth (2FA: TOTP or WebAuthn) (#34187)
Fix #880

Design:

1. A global setting `security.TWO_FACTOR_AUTH`.
* To support org-level config, we need to introduce a better "owner
setting" system first (in the future)
2. A user without 2FA can login and may explore, but can NOT read or
write to any repositories via API/web.
3. Keep things as simple as possible.
* This option only aggressively suggest users to enable their 2FA at the
moment, it does NOT guarantee that users must have 2FA before all other
operations, it should be good enough for real world use cases.
* Some details and tests could be improved in the future since this
change only adds a check and seems won't affect too much.

---------

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2025-04-28 15:31:59 -07:00