1
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-02-02 15:09:33 -05:00

18226 Commits

Author SHA1 Message Date
Lunny Xiao
a3b7b98336
Fix broken image when editing comment with non-image attachments () ()
Backport  

Fix 

---------

Co-authored-by: yp05327 <576951401@qq.com>
2024-11-02 13:34:09 +08:00
Zettat123
898f852d03
Fix missing signature key error when pulling Docker images with SERVE_DIRECT enabled () ()
Backport 

Fix 

I did some tests and found that the `missing signature key` error is
caused by an incorrect `Content-Type` header. Gitea correctly sets the
`Content-Type` header when serving files.


348d1d0f32/routers/api/packages/container/container.go (L712-L717)
However, when `SERVE_DIRECT` is enabled, the `Content-Type` header may
be set to an incorrect value by the storage service. To fix this issue,
we can use query parameters to override response header values.

https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html <img
width="600px"

src="https://github.com/user-attachments/assets/f2ff90f0-f1df-46f9-9680-b8120222c555"
/>

In this PR, I introduced a new parameter to the `URL` method to support
additional parameters.

```
URL(path, name string, reqParams url.Values) (*url.URL, error)
```
2024-11-01 03:53:59 +00:00
6543
9d62d7a443
Respect UI.ExploreDefaultSort setting again () ()
Backport 

fix regression of https://github.com/go-gitea/gitea/pull/29430

---
*Sponsored by Kithara Software GmbH*
2024-10-31 13:49:09 +08:00
Lunny Xiao
bf53ab26fa
Fix disable 2fa bug () ()
Backport 
2024-10-25 17:54:56 +08:00
Zettat123
0d11ba93dd
Fix the permission check for user search API and limit the number of returned users for /user/search ()
Partially backport 

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-10-23 04:56:13 +00:00
Lunny Xiao
b7d12347f3
Add warn log when deleting inactive users () ()
Backport  

Add log for the problem 
2024-10-23 10:48:42 +08:00
6543
b6f8372d7d
API: enhance SearchIssues swagger docs () ()
Backport  

This will result in better api clients generated out of the openapi docs for SearchIssues

---
*Sponsored by Kithara Software GmbH*
2024-10-21 08:32:34 +08:00
YR Chen
0c12252c23
Update github.com/go-enry/go-enry to v2.9.1 () ()
Backport 

`go-enry` v2.9.1 includes latest file patterns from Linguist, which can
identify more generated file type, eg. `pdm.lock`.
2024-10-21 02:12:51 +08:00
Zettat123
99cac1f50c
Always update expiration time when creating an artifact () ()
Backport 

Fix 
2024-10-18 10:36:23 +08:00
a1012112796
2a99607add
make show stats work when only one file changed () ()
Backport 

fix https://github.com/go-gitea/gitea/issues/32226

in https://github.com/go-gitea/gitea/pull/27775 , it do some changes to
only show diff file tree when more than one file changed. But looks it
also break the `diff-file-list` logic, which looks not expected change.
so try fix it.

/cc @silverwind

example view:

![image](https://github.com/user-attachments/assets/281e9c4f-a269-4d36-94eb-a132058aea87)

Signed-off-by: a1012112796 <1012112796@qq.com>
2024-10-17 08:03:21 +00:00
cloudchamb3r
c1023b97aa
[v1.22 backport] Fix null errors on conversation holder () () ()
Backport 

fix 

Errors in the issue was due to unhandled null check. so i fixed it.

### Detailed description for Issue & Fix
To reproduce that issue, the comment must be deleted on Conversation
tab.
#### Before Delete
<img width="1032" alt="image"

src="https://github.com/user-attachments/assets/72df61ba-7db6-44c9-bebc-ca1178dd27f1">

#### After Delete (AS-IS)
<img width="1010" alt="image"

src="https://github.com/user-attachments/assets/36fa537e-4f8e-4535-8d02-e538c50f0dd8">

gitea already have remove logic for `timeline-item-group`, but because
of null ref exception the later logic that removes `timeline-item-group`
could be not be called correctly.
2024-10-17 13:34:39 +08:00
wxiaoguang
7e0fd4c208
Warn users when they try to use a non-root-url to sign in/up () () 2024-10-17 09:01:44 +08:00
wxiaoguang
db7349bc0d
Make owner/repo/pulls handlers use "PR reader" permission () ()
Backport  (no conflict)
2024-10-15 22:32:54 +08:00
Zettat123
55562f9c79
Update scheduled tasks even if changes are pushed by "ActionsUser" () ()
Backport 

Fix 

Co-authored-by: delvh <dev.lh@web.de>
2024-10-14 16:55:16 +08:00
Giteabot
24b65f122a
Only rename a user when they should receive a different name () ()
Backport  by @lunny

Fix 

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2024-10-13 19:27:37 +00:00
Giteabot
bcfe1f91d2
Fix dropdown content overflow () ()
Backport  by charles7668

close  

Co-authored-by: charles <30816317+charles7668@users.noreply.github.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-10-13 03:46:55 +00:00
Giteabot
f15d5f0c4a
Fix checkbox bug on private/archive filter () ()
Backport  by cloudchamb3r

fix 

Co-authored-by: cloudchamb3r <jizon0123@protonmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-10-11 21:13:09 +08:00
Lunny Xiao
494017e478
Add release note for v1.22.3 ()
Co-authored-by: sebastian-sauer <sauer.sebastian@gmail.com>
v1.22.3
2024-10-09 11:23:48 +08:00
Lunny Xiao
56051d9b3b
Fix bug when a token is given public only () ()
Backport 
2024-10-09 02:16:37 +00:00
Giteabot
4815c4aeae
Add null check for responseData.invalidTopics () ()
Backport  by @cloudchamb3r

<img width="553" alt="Screenshot 2024-10-08 at 10 49 10 AM"
src="https://github.com/user-attachments/assets/faeef64d-684a-4aba-b7fc-c7c6a0301abe">

`responseData.invalidTopics` can be null but it wasn't handled.

Co-authored-by: cloudchamb3r <jizon0123@protonmail.com>
2024-10-09 09:18:29 +08:00
Lunny Xiao
2e3a191097
Fix javascript error when an anonymous user visiting migration page () ()
backport 

This PR fixes javascript errors when an anonymous user visits the
migration page.
It also makes task view checking more restrictive.

The router moved from `/user/task/{id}/status` to
`/username/reponame/-/migrate/status` because it's a migrate status.

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-10-04 17:58:04 +00:00
Giteabot
361221c531
Fixed race condition when deleting documents by repoId in ElasticSearch () ()
Backport  by @bsofiato

Resolves 

Signed-off-by: Bruno Sofiato <bruno.sofiato@gmail.com>
Co-authored-by: Bruno Sofiato <bruno.sofiato@gmail.com>
2024-10-03 16:33:26 +00:00
Lunny Xiao
d86433cce2
Don't init singing keys if oauth2 provider disabled ()
Backport 
2024-10-03 11:34:56 -04:00
Lunny Xiao
85897f9b28
Upgrade some dependencies include minio-go ()
backport 

Co-authored-by: Manuel Valls Fernández <manuel@valls.dev>
2024-10-03 02:08:06 +00:00
Giteabot
4703e5270f
Ensure GetCSRF doesn't return an empty token () ()
Backport  by @wolfogre

Since page templates keep changing, some pages that contained forms with
CSRF token no longer have them.

It leads to some calls of `GetCSRF` returning an empty string, which
fails the tests. Like


3269b04d61/tests/integration/attachment_test.go (L62-L63)

The test did try to get the CSRF token and provided it, but it was
empty.

Co-authored-by: Jason Song <i@wolfogre.com>
2024-10-01 05:27:37 +00:00
Giteabot
9fc3915e04
Fix the logic of finding the latest pull review commit ID () ()
Backport  by @Zettat123

Fix 

Co-authored-by: Zettat123 <zettat123@gmail.com>
2024-10-01 13:10:03 +09:00
Lunny Xiao
a4a6c785b4
Don't join repository when loading action table data () ()
backport 
2024-09-30 11:04:08 +08:00
Giteabot
634454c48c
Fix wrong status of Set up Job when first step is skipped () ()
Backport  by @yp05327

Fix 

Co-authored-by: yp05327 <576951401@qq.com>
2024-09-25 10:19:35 +08:00
Zettat123
737c947287
Fix bug in getting merged pull request by commit () ()
Backport 

Fix 
2024-09-25 00:12:02 +08:00
Giteabot
1ef74004a2
Fix bug when deleting a migrated branch () ()
Backport  by @lunny

After migrating a repository with pull request, the branch is missed and
after the pull request merged, the branch cannot be deleted.

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2024-09-24 17:01:05 +08:00
Giteabot
5c73da7c54
Include collaboration repositories on dashboard source/forks/mirrors list () ()
Backport  by @lunny

Fix 

In the original implementation, only `All` will display your owned and
collaborated repositories. For other filters like `Source`, `Mirrors`
and etc. will only display your owned repositories.

This PR removed the limitations. Now except `collbrations`, other
filters will always display your owned and collaborated repositories.

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2024-09-24 15:17:30 +08:00
Giteabot
a32aaf4d43
Truncate commit message during Discord webhook push events () ()
Backport  by @kemzeb

Resolves .

Co-authored-by: Kemal Zebari <60799661+kemzeb@users.noreply.github.com>
2024-09-24 13:28:01 +08:00
Giteabot
0f834f052b
Allow set branch protection in an empty repository () ()
Backport  by @lunny

Resolve 

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2024-09-24 11:42:52 +09:00
Giteabot
a3c660f89a
Fix panic when cloning with wrong ssh format. () ()
Backport  by @lunny

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2024-09-24 01:58:58 +00:00
Giteabot
d5d5fb1925
Fix Bug in Issue/pulls list () () 2024-09-24 01:26:10 +00:00
Giteabot
ae37f31df6
use rebuilt mssql-2017 image () ()
Backport  by @techknowlogick

Co-authored-by: techknowlogick <techknowlogick@gitea.com>
2024-09-23 21:23:04 +00:00
Giteabot
1f8cbbab3d
Fix rename branch permission bug () ()
Backport  by @lunny

The previous implementation requires admin permission to rename branches
which should be write permission.

Fix 

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2024-09-22 19:43:13 +00:00
Giteabot
af0cab23ea
Fix wrong last modify time () ()
Backport  by @lunny

Fix  and more places which use `http.TimeFormat` wrongly.
`http.TimeFormat` requires a UTC time. refer to
https://pkg.go.dev/net/http#TimeFormat

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2024-09-22 19:12:57 +00:00
Giteabot
73066e3f97
Add bin to Composer Metadata () ()
Backport  by @maantje

This PR addresses the missing `bin` field in Composer metadata, which
currently causes vendor-provided binaries to not be symlinked to
`vendor/bin` during installation.

In the current implementation, running `composer install` does not
publish the binaries, leading to issues where expected binaries are not
available.

By properly declaring the `bin` field, this PR ensures that binaries are
correctly symlinked upon installation, as described in the [Composer
documentation](https://getcomposer.org/doc/articles/vendor-binaries.md).

Co-authored-by: Jamie Schouten <j4mie@hey.com>
2024-09-22 18:42:02 +00:00
Giteabot
919b82461a
Fix incorrect /tokens api () ()
Backport  by @KN4CK3R

Fixes 

- Add missing scopes output.
- Disallow empty scope.

Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
2024-09-22 18:02:09 +00:00
Lunny Xiao
69ba37e9fd
Fix mssql ci with a new mssql version on ci ()
backport from https://github.com/go-gitea/gitea/pull/32060
2024-09-23 01:32:26 +08:00
Giteabot
ea9e09abe5
Fix: database not update release when using git push --tags --force () ()
Backport  by @ExplodingDragon

link: https://codeberg.org/forgejo/forgejo/issues/4274

Co-authored-by: Exploding Dragon <explodingfkl@gmail.com>
2024-09-19 07:57:28 +08:00
wxiaoguang
2891edbbcb
Refactor CSRF protector () ()
 improves the CSRF handling and is worth to backport
2024-09-18 17:02:45 +00:00
Giteabot
8dbe83d205
Add missing comment reply handling () ()
Backport  by @KN4CK3R

Fixes 

- Add missing comment reply handling
- Use `onGiteaRun` in the test because the fixtures are not present
otherwise (did this behaviour change?)

Compare without whitespaces.

Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
2024-09-18 09:23:28 +00:00
Giteabot
2831ae369e
Lazy load avatar images () ()
Backport  by @hiifong

Before:

https://github.com/user-attachments/assets/7b1681ba-4781-432a-ae20-c07e94c1dbb6

After:

https://github.com/user-attachments/assets/5154e160-e22c-460e-b0d9-28768486c178

Co-authored-by: hiifong <i@hiif.ong>
2024-09-18 16:52:44 +08:00
Giteabot
e6395e1e81
Handle invalid target when creating releases using API () ()
Backport  by @kemzeb

A 500 status code was thrown when passing a non-existent target to the
create release API. This snapshot handles this error and instead throws
a 404 status code.

Discovered while working on .

Co-authored-by: Kemal Zebari <60799661+kemzeb@users.noreply.github.com>
2024-09-17 02:23:40 +00:00
Giteabot
8a39a4812f
Do not escape relative path in RPM primary index () ()
Backport  by @KN4CK3R

Fixes 

Do not escape the relative path.

Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
2024-09-17 08:19:35 +08:00
Giteabot
3d7d0c36e7
Check if the due_date is nil when editing issues () ()
Backport  by @Zettat123

Fix 

Co-authored-by: Zettat123 <zettat123@gmail.com>
2024-09-15 01:31:34 +08:00
Lunny Xiao
30d989d411
Fix container parallel upload bugs ()
This PR should be replaced by  in v1.23. The aim of creating this
PR is to fix it in 1.22 because globallock hasn't been introduced.

Fix 
Fix 
Fix 
2024-09-12 03:11:03 +00:00
Giteabot
b3af359cc6
Fix /repos/{owner}/{repo}/pulls/{index}/files endpoint not populating previous_filename () ()
Backport  by @charles-plutohealth

---
`status == "rename"` should have read `status == "renamed"`. The typo
means that file.PreviousFilename would never be populated, which e.g.
breaks usage of the Github Action at
https://github.com/dorny/paths-filter.

Co-authored-by: charles-plutohealth <143208583+charles-plutohealth@users.noreply.github.com>
2024-09-12 08:58:43 +09:00