Commit Graph
19450 Commits
Author SHA1 Message Date
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
bytedream 2848fdf91f Merge branch 'main' into non-text-edit
# Conflicts:
#	routers/web/repo/editor.go
2025-05-06 04:32:04 +02:00
bytedreamandGitHub 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-PetersenandGitHub 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 XiaoandGitHub 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 XiaoandGitHub 51aafb4278 Fix bug when API get pull changed files for deleted head repository (#34333) 2025-05-04 19:17:17 +00:00
Lunny XiaoandGitHub 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
bytedreamandGitHub 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 ShohamandGitHub 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
bytedreamandGitHub 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-PetersenandGitHub 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-PetersenandGitHub 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
wxiaoguangandGitHub 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 BryantandGitHub 1f52304f90 Fix button alignments (#34307)
Continue with #34206.
2025-04-29 16:57:47 +00:00
Mingzhu YanandGitHub 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 XiaoandGitHub 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
2b76993415 support the open-icon of folder (#34168)
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-04-28 19:51:32 -07:00
Lunny XiaoandGitHub 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
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
ChristopherHXandGitHub 4ed07244b9 actions artifacts api list/download check status upload confirmed (#34273)
* fixes a fixture status to upload confirmed
* add another fixture as noise to break tests as soon they are exposed
to api
* v4 delete test added check that artifact is no longer visible in
internal api with status pending delete
* removal of http 404 on empty list: actions/upload-artifact@v4 now
backoff on http 404 of ListArtifacts endpoint
* fixes artifacts with pending delete etc. are able to be found and
downloaded if the storage is not freed
2025-04-28 16:31:53 +00:00
533b8b2d3d Fix button alignments (#34276)
Continue with #34206.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2025-04-27 19:39:03 +00:00
Lunny XiaoandGitHub 0376c09fc2 Update token creation API swagger documentation (#34288)
Fix #34231
2025-04-27 05:32:15 +00:00
GiteaBot bf8f111f53 [skip ci] Updated translations via Crowdin 2025-04-27 00:38:03 +00:00
44ece1e6f3 Explicitly not update indexes when sync database schemas (#34281)
Fix #34275

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-04-26 09:50:45 -07:00
silverwindandGitHub 27ff5e2e84 Introduce --page-space-bottom at 64px (#30692)
Previously we would always leave 80px space before the page footer, but
this is problematic with small viewport heights on projects page for
example. I think it' ideal that we use `--page-spacing` which is already
in use for spacing on top of the page.

The `secondary-nav` margin is also adjusted as I see no value why this
shouldn't be the same value.
2025-04-25 10:53:26 -07:00
GiteaBot 8cea1aeea5 [skip ci] Updated translations via Crowdin 2025-04-25 00:35:36 +00:00
a9343896f4 Option to delay conflict checking of old pull requests until page view (#27779)
`[repository.pull-request] DELAY_CHECK_FOR_INACTIVE_DAYS` is a new
setting to delay the mergeable check for pull requests that have been
inactive for the specified number of days.

This avoids potentially long delays for big repositories with many pull
requests. and reduces system load overall when there are many
repositories or pull requests.

When viewing the PR, checking will start immediately and the PR merge
box will automatically reload when complete. Accessing the PR through
the API will also start checking immediately.

The default value of `7` provides a balance between system load, and
keeping behavior similar to what it was before both for users and API
access. With `0` all conflict checking will be delayed, while `-1`
always checks immediately to restore the previous behavior.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-04-24 19:26:57 +00:00
wxiaoguangandGitHub d1ad8e1e80 Update unrs-resolver (#34279) 2025-04-24 14:02:38 +02:00
Lunny XiaoandGitHub e73c1139ac Fix panic when comment is nil (#34257)
Fix #34254
2025-04-24 01:58:00 +00:00
e625250ffc Fix various trivial frontend problems (#34263)
1. Fix #20606
2. Fix #34246
3. Fix missing spaces, fix misspells, no visual change.
4. Fix missing "not-mobile", fix #34265

---------

Co-authored-by: silverwind <me@silverwind.io>
2025-04-24 09:11:54 +08:00
wxiaoguangandGitHub 58d2a87c6c update go&js dependencies (#34262) 2025-04-23 21:22:40 +00:00
wxiaoguangandGitHub b758241f28 Fix runner list tmpl (#34270)
Fix  #34269

And fix some layout problems.
2025-04-23 15:34:18 +00:00