Commit Graph

18187 Commits

Author SHA1 Message Date
aceArt-GmbH
9d362ca8d9
Backport: Fix dates displaying in a wrong manner when we're close to the end of… (#31750)
… the month (31331)

Backport #31331

Fix #31197 on v1.22

Co-authored-by: lukas <lukas.walter@aceart.de>
2024-08-01 18:54:30 +00:00
techknowlogick
edf96fcf6a
bump vue-bar-graph (#31705) (#31753)
backport vue-bar-graph bump to remove gsap dep
2024-08-01 21:34:32 +03:00
Giteabot
6203ae764a
Distinguish LFS object errors to ignore missing objects during migration (#31702) (#31745)
Backport #31702 by @wolfogre

Fix #31137.

Replace #31623 #31697.

When migrating LFS objects, if there's any object that failed (like some
objects are losted, which is not really critical), Gitea will stop
migrating LFS immediately but treat the migration as successful.

This PR checks the error according to the [LFS api
doc](https://github.com/git-lfs/git-lfs/blob/main/docs/api/batch.md#successful-responses).

> LFS object error codes should match HTTP status codes where possible:
> 
> - 404 - The object does not exist on the server.
> - 409 - The specified hash algorithm disagrees with the server's
acceptable options.
> - 410 - The object was removed by the owner.
> - 422 - Validation error.

If the error is `404`, it's safe to ignore it and continue migration.
Otherwise, stop the migration and mark it as failed to ensure data
integrity of LFS objects.

And maybe we should also ignore others errors (maybe `410`? I'm not sure
what's the difference between "does not exist" and "removed by the
owner".), we can add it later when some users report that they have
failed to migrate LFS because of an error which should be ignored.

Co-authored-by: Jason Song <i@wolfogre.com>
2024-07-31 23:06:37 +08:00
Giteabot
8591c918f6
Fix the display of project type for deleted projects (#31732) (#31734)
Backport #31732 by @yp05327

Fix: #31727
After:

![image](https://github.com/user-attachments/assets/1dfb4b31-3bd6-47f7-b126-650f33f453e2)

Co-authored-by: yp05327 <576951401@qq.com>
2024-07-30 14:05:14 +08:00
Giteabot
ec467c344f
Set owner id to zero when GetRegistrationToken for repo (#31725) (#31729)
Backport #31725 by @wolfogre

Fix #31707.

It's split from #31724.

Although #31724 could also fix #31707, it has change a lot so it's not a
good idea to backport it.

Co-authored-by: Jason Song <i@wolfogre.com>
2024-07-30 09:57:43 +08:00
Giteabot
7b37f77f1a
Fix API endpoint for registration-token (#31722) (#31728)
Backport #31722 by @wolfogre

Partially fix #31707. Related to #30656.

Co-authored-by: Jason Song <i@wolfogre.com>
2024-07-29 21:15:07 +03:00
yp05327
d3f0867204
Add permission check when creating PR (#31033) (#31720)
Backport #31033

user should be a collaborator of the base repo to create a PR
2024-07-29 14:11:29 +08:00
Giteabot
7e9a895007
Make GetRepositoryByName more safer (#31712) (#31718)
Backport #31712 by @lunny

Fix #31708

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2024-07-29 11:52:34 +08:00
wxiaoguang
0fb1c1fbfd
Fix "Filter by commit" Dropdown (#31695) (#31696)
A separate backport of #31695 for 1.22
Fix #31673
2024-07-25 09:44:34 +08:00
Giteabot
60267859fc
Properly filter issue list given no assignees filter (#31522) (#31685)
Backport #31522 by @kemzeb

Quick fix #31520. This issue is related to #31337.

Co-authored-by: Kemal Zebari <60799661+kemzeb@users.noreply.github.com>
2024-07-24 15:55:21 +08:00
Giteabot
17b04644ed
Enable direnv (#31672) (#31679)
Backport #31672 by @techknowlogick

This lets developers who have direnv enabled to load our nix flake
automatically when entering it

Co-authored-by: techknowlogick <techknowlogick@gitea.com>
2024-07-23 11:35:28 -04:00
techknowlogick
c71c95d5e5
fix redis deps (#31662) (#31663)
fix https://github.com/go-gitea/gitea/issues/31658

backports #31662
2024-07-19 20:14:58 +00:00
Giteabot
00aade2cab
Fix a branch divergence cache bug (#31659) (#31661)
Backport #31659 by @Zettat123

Fix #31599
Fix #31472

A branch divergence is counted based on the default branch. If the
default branch is updated, all divergence caches of the repo need to be
deleted.

Co-authored-by: Zettat123 <zettat123@gmail.com>
2024-07-19 13:12:23 -04:00
Giteabot
c2b1b94c5a
Remove unneccessary uses of word-break: break-all (#31637) (#31652)
Backport #31637 by @silverwind

Fixes: https://github.com/go-gitea/gitea/issues/31636

1. Issue sidebar topic is disussed in
https://github.com/go-gitea/gitea/issues/31636
2. Org description already has `overflow-wrap: anywhere` to ensure no
overflow.

Co-authored-by: silverwind <me@silverwind.io>
2024-07-18 12:58:11 +02:00
Giteabot
c2445ae3d4
Fix: Allow org team names of length 255 in create team form (#31564) (#31603)
Backport #31564 by @tobiasbp

Gitea 1.22.1 was supposed to allow for team names of length 255 (up from
30) after the following PR was merged in:
https://github.com/go-gitea/gitea/pull/31410. However, the length of
team names was still limited to 30 as described in this issue:
https://github.com/go-gitea/gitea/issues/31554.

One more change to _gitea_ needs to be made to allow for the longer team
names, as there is a 30 character limit here:
2c92c7c522/services/forms/org.go (L65)

This PR changes that value to 255.

Co-authored-by: Tobias Balle-Petersen <tobias.petersen@unity3d.com>
2024-07-10 12:28:27 -04:00
wxiaoguang
43c63c33ae
Use old behavior for telegram webhook (#31588)
Fix #31182
2024-07-09 11:23:33 +08:00
Jimmy Praet
2dc6993467
Return an empty string when a repo has no avatar in the repo API (#31187) (#31567)
Backport #31187

Resolves #31167.

https://github.com/go-gitea/gitea/pull/30885 changed the behavior of
`repo.AvatarLink()` where it can now take the empty string and append it
to the app data URL. This does not point to a valid avatar image URL,
and, as the issue mentions, previous Gitea versions returned the empty
string.

Co-authored-by: Kemal Zebari <60799661+kemzeb@users.noreply.github.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-07-05 14:40:45 +02:00
Giteabot
6486c8b7b3
Fix slow patch checking with commits that add or remove many files (#31548) (#31560)
Backport #31548 by @brechtvl

Running git update-index for every individual file is slow, so add and
remove everything with a single git command.

When such a big commit lands in the default branch, it could cause PR
creation and patch checking for all open PRs to be slow, or time out
entirely. For example, a commit that removes 1383 files was measured to
take more than 60 seconds and timed out. With this change checking took
about a second.

This is related to #27967, though this will not help with commits that
change many lines in few files.

Co-authored-by: Brecht Van Lommel <brecht@blender.org>
2024-07-05 11:24:01 +02:00
Lunny Xiao
35c5192b25
Add changelog for 1.22.1 (#31517)
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2024-07-04 10:17:07 +08:00
silverwind
e2905761c3
Update golang.org/x/image to v0.18.0 (#31542) 2024-07-02 19:42:16 -04:00
rayden84
50ecae7357
remove typo (#31524) 2024-06-29 15:54:15 +00:00
Giteabot
dceadd2ebe
Fix avatar radius problem on the new issue page (#31506) (#31508)
Backport #31506 by charles7668

Co-authored-by: charles <30816317+charles7668@users.noreply.github.com>
2024-06-27 23:34:40 +08:00
Giteabot
3cecfa3df4
use correct l10n string (#31487) (#31490)
Backport #31487 by CyberFlameGO

Co-authored-by: CyberFlame <cyberflameu@gmail.com>
2024-06-26 13:45:48 +00:00
silverwind
d9e6657879
Upgrade github.com/hashicorp/go-retryablehttp (#31499) 2024-06-26 13:15:42 +00:00
wxiaoguang
151b786837
Fix dropzone JS error when attachment is disabled (#31486)
Fix #31485
2024-06-26 18:09:25 +08:00
Giteabot
58b1ee5ebd
Fix overflow menu flickering on mobile (#31484) (#31488)
Backport #31484 by brechtvl

Co-authored-by: Brecht Van Lommel <brecht@blender.org>
2024-06-26 01:13:04 +08:00
Giteabot
1825c316a6
Fix poor table column width due to breaking words (#31473) (#31477)
Backport #31473 by brechtvl

Co-authored-by: Brecht Van Lommel <brecht@blender.org>
Co-authored-by: silverwind <me@silverwind.io>
2024-06-25 08:00:17 +08:00
Giteabot
d1dd3fa49c
Fix deprecated Dockerfile ENV format (#31450) (#31452)
Backport #31450 by @silverwind

See
https://docs.docker.com/reference/build-checks/legacy-key-value-format/.
Fixes these warnings seen during the docker build:

```
 4 warnings found (use --debug to expand):
 - LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 5)
 - LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 9)
 - LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 75)
 - LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 76)
 ```

Introduced in: https://github.com/moby/buildkit/pull/4923

Co-authored-by: silverwind <me@silverwind.io>
2024-06-24 00:53:37 +00:00
Giteabot
eaeb4d1b96
Fix web notification icon not updated once you read all notifications (#31447) (#31466)
Backport #31447 by kiatt210

Fix #29065
Remove status filtering from GetUIDsAndNotificationCounts sql.

Co-authored-by: kiatt210 <40639725+kiatt210@users.noreply.github.com>
Co-authored-by: kiatt210 <kiatt210@github.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-06-24 00:08:37 +08:00
techknowlogick
688085c15e
Switch to upstream of gorilla/feeds (#31400) (#31464)
backport #31400
2024-06-23 16:47:43 +08:00
Giteabot
8d60c7d568
Switch to "Write" tab when edit comment again (#31445) (#31461)
Backport #31445 by wxiaoguang

Fix #19031

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-06-22 23:47:36 +08:00
Giteabot
be302f3025
Support relative paths to videos from Wiki pages (#31061) (#31453)
Backport #31061 by @sergeyvfx

This change fixes cases when a Wiki page refers to a video stored in the
Wiki repository using relative path. It follows the similar case which
has been already implemented for images.

Test plan:
- Create repository and Wiki page
- Clone the Wiki repository
- Add video to it, say `video.mp4`
- Modify the markdown file to refer to the video using `<video
src="video.mp4">`
- Commit the Wiki page
- Observe that the video is properly displayed

Co-authored-by: Sergey Sharybin <sergey.vfx@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-06-22 00:03:31 +03:00
Giteabot
a3529d662f
Fix the link for .git-blame-ignore-revs bypass (#31432) (#31442)
Backport #31432 by wxiaoguang

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-06-21 14:47:11 +08:00
Giteabot
a4f977e00b
Fix the wrong line number in the diff view page when expanded twice. (#31431) (#31440)
Backport #31431 by @charles7668

close #31149

The problem is caused by the `data-query=` string affecting the parsing
of the `last_left` parameter. When the page is first rendered,
`data-query=` does not exist. However, after clicking expand, the
returned HTML contains this string, causing the line numbers to start
from 1 upon expanding a second time.

before fix

![圖片](https://github.com/go-gitea/gitea/assets/30816317/36842bde-cc30-43ba-91b0-c60a50a6dc0f)

after fix

![圖片](https://github.com/go-gitea/gitea/assets/30816317/b73d7e40-ec01-48ae-9992-09c19ee477ad)

Co-authored-by: charles <30816317+charles7668@users.noreply.github.com>
2024-06-20 20:33:51 +00:00
Giteabot
b83482b4ba
Fix labels and projects menu overflow on issue page (#31435) (#31439)
Backport #31435 by brechtvl

It was correct only on the new issue page.

Resolves #31415

Co-authored-by: Brecht Van Lommel <brecht@blender.org>
2024-06-20 16:59:49 +00:00
Giteabot
9ecaeda66e
[Fix] Account Linking UpdateMigrationsByType (#31428) (#31434)
Backport #31428 by Sumit189

Co-authored-by: Sumit <sumit.18.paul@gmail.com>
2024-06-20 13:53:15 +00:00
Giteabot
7fbcc58062
Fix markdown math brackets render problem (#31420) (#31430)
Backport #31420 by charles7668

Co-authored-by: charles <30816317+charles7668@users.noreply.github.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-06-20 17:45:08 +08:00
Giteabot
05f32114d1
Increase max length of org team names from 30 to 255 characters (#31410) (#31421)
Backport #31410 by tobiasbp

This PR modifies the structs for editing and creating org teams to allow
team names to be up to 255 characters. The previous maximum length was
30 characters.

Co-authored-by: Tobias Balle-Petersen <tobias.petersen@unity3d.com>
2024-06-20 01:27:13 +00:00
Giteabot
5c79c2b431
Fix new issue/pr avatar (#31419) (#31424)
Backport #31419 by @silverwind

The avatar on "New Issue" and "New Pull Request" pages was inconsistent.
Removed the extra margin and the new CSS rules now use common parent
`<form id="#new-issue">` because `.repository.new.issue` is not present
on pull request page.

Before:

<img width="181" alt="Screenshot 2024-06-19 at 13 56 17"
src="https://github.com/go-gitea/gitea/assets/115237/5270d352-db5b-45b3-9d06-4790c17ae9b4">
<img width="213" alt="Screenshot 2024-06-19 at 13 54 02"
src="https://github.com/go-gitea/gitea/assets/115237/012f5607-aef0-4f48-90e3-8d4022480203">


After:

<img width="195" alt="Screenshot 2024-06-19 at 13 54 16"
src="https://github.com/go-gitea/gitea/assets/115237/e7590c66-3b28-4790-9970-33bd567eeb31">
<img width="212" alt="Screenshot 2024-06-19 at 13 54 22"
src="https://github.com/go-gitea/gitea/assets/115237/8e1cfede-614c-4cea-9af2-ada6da7a7361">

Co-authored-by: silverwind <me@silverwind.io>
2024-06-19 21:18:10 +00:00
Giteabot
3813b27862
Reduce air verbosity (#31417) (#31425)
Backport #31417 by @silverwind

Make `air` log less. Uses the option added in
https://github.com/air-verse/air/pull/367.

Co-authored-by: silverwind <me@silverwind.io>
2024-06-20 04:57:28 +08:00
wxiaoguang
042e9fcd81
Fix rendered wiki page link (#31398) (#31407)
Backport #31398

Fix #31395
2024-06-19 11:23:24 +08:00
Giteabot
e8e43a7ee4
Fix double border in system status table (#31363) (#31401)
Backport #31363 by silverwind

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-06-18 06:29:43 +08:00
Lunny Xiao
a9d1e4311e
Fix bug filtering issues which have no project (#31337) (#31367) 2024-06-17 10:23:15 +00:00
Giteabot
ed0fc0ec46
Fix natural sort (#31384) (#31394)
Backport #31384 by wxiaoguang

Fix #31374

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-06-17 07:41:47 +00:00
wxiaoguang
fa307167f9
Fix missing images in editor preview due to wrong links (#31299) (#31393)
Backport #31299

Parse base path and tree path so that media links can be correctly
created with /media/.

Resolves #31294

---------

Co-authored-by: Brecht Van Lommel <brecht@blender.org>
2024-06-17 15:07:21 +08:00
Giteabot
3f44844244
Allow downloading attachments of draft releases (#31369) (#31380)
Backport #31369 by Zettat123

Fix #31362

Co-authored-by: Zettat123 <zettat123@gmail.com>
2024-06-16 20:55:14 +08:00
wxiaoguang
52925e9c7c
Fix duplicate sub-path for avatars (#31365) (#31368)
Backport #31365, only backport necessary changes.
2024-06-15 03:44:44 +00:00
wxiaoguang
188e515efc
Fix repo graph JS (#31377)
Fix #31376
Regression of #30395
2024-06-14 18:21:40 +02:00
wxiaoguang
cdd057c7a3
Backport Iif (#31353) 2024-06-13 14:52:34 +08:00
Giteabot
6d0d4640f6
Fixed incorrect localization explorer.go (#31348) (#31350)
Backport #31348 by @kerwin612

see: https://github.com/go-gitea/gitea/pull/29701/files#r1637325139

Co-authored-by: Kerwin Bryant <kerwin612@qq.com>
2024-06-13 02:16:17 +00:00