]> source.dussan.org Git - gitea.git/log
gitea.git
6 days agoImprove the maintainblity of the reserved username list (#32229)
wxiaoguang [Thu, 10 Oct 2024 09:04:42 +0000 (17:04 +0800)]
Improve the maintainblity of the reserved username list (#32229)

6 days agoMove admin routers from /admin to /-/admin (#32189)
Lunny Xiao [Thu, 10 Oct 2024 04:56:49 +0000 (12:56 +0800)]
Move admin routers from /admin to /-/admin (#32189)

Resolve #32181

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
6 days agoRefactor CSRF token (#32216)
wxiaoguang [Thu, 10 Oct 2024 03:48:21 +0000 (11:48 +0800)]
Refactor CSRF token (#32216)

6 days ago[skip ci] Updated translations via Crowdin
GiteaBot [Thu, 10 Oct 2024 00:30:33 +0000 (00:30 +0000)]
[skip ci] Updated translations via Crowdin

6 days agoFix incorrect "Target branch does not exist" in PR title (#32222)
Zettat123 [Thu, 10 Oct 2024 00:25:46 +0000 (08:25 +0800)]
Fix incorrect "Target branch does not exist" in PR title (#32222)

7 days agoupdate git book link to v2 (#32221)
Ehsan Shirvanian [Wed, 9 Oct 2024 05:04:34 +0000 (01:04 -0400)]
update git book link to v2 (#32221)

Fix the dead link `https://git-scm.com/book/en/Git-Basics-Getting-a-Git-Repository` for
empty repositories to help how to clone the repository
to `https://git-scm.com/book/en/v2/Git-Basics-Getting-a-Git-Repository`
which is v2 of the git book. This also updates download git links

7 days ago[skip ci] Updated translations via Crowdin
GiteaBot [Wed, 9 Oct 2024 00:31:01 +0000 (00:31 +0000)]
[skip ci] Updated translations via Crowdin

7 days agoAdd null check for responseData.invalidTopics (#32212)
cloudchamb3r [Tue, 8 Oct 2024 17:27:05 +0000 (02:27 +0900)]
Add null check for responseData.invalidTopics (#32212)

<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.

8 days agoFix bug when a token is given public only (#32204)
Lunny Xiao [Tue, 8 Oct 2024 09:51:09 +0000 (17:51 +0800)]
Fix bug when a token is given public only (#32204)

8 days ago[skip ci] Updated translations via Crowdin
GiteaBot [Tue, 8 Oct 2024 00:30:42 +0000 (00:30 +0000)]
[skip ci] Updated translations via Crowdin

8 days agoAllow filtering PRs by poster in the ListPullRequests API (#32209)
6543 [Mon, 7 Oct 2024 21:21:07 +0000 (23:21 +0200)]
Allow filtering PRs by poster in the ListPullRequests API (#32209)

as title

---
*Sponsored by Kithara Software GmbH*

9 days agoFix bug when there are multiple triggers with workflow dispatch (#32200)
Lunny Xiao [Mon, 7 Oct 2024 03:50:38 +0000 (11:50 +0800)]
Fix bug when there are multiple triggers with workflow dispatch (#32200)

9 days ago[skip ci] Updated licenses and gitignores
GiteaBot [Mon, 7 Oct 2024 00:32:39 +0000 (00:32 +0000)]
[skip ci] Updated licenses and gitignores

10 days ago[skip ci] Updated translations via Crowdin
GiteaBot [Sun, 6 Oct 2024 00:34:29 +0000 (00:34 +0000)]
[skip ci] Updated translations via Crowdin

10 days agoUpgrade htmx to 2.0.3 (#32192)
Yarden Shoham [Sat, 5 Oct 2024 20:52:30 +0000 (23:52 +0300)]
Upgrade htmx to 2.0.3 (#32192)

Release notes:
https://github.com/bigskysoftware/htmx/releases/tag/v2.0.3

Tested `Star`, `Watch`, and the admin dashboard page. All functionality
remains unchanged.

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
10 days agoEnhance USER_DISABLED_FEATURES to allow disabling change username or full name (...
Zisu Zhang [Sat, 5 Oct 2024 20:41:38 +0000 (04:41 +0800)]
Enhance USER_DISABLED_FEATURES to allow disabling change username or full name (#31959)

Fix #31958
Enhanced `USER_DISABLED_FEATURES`(also `EXTERNAL_USER_DISABLE_FEATURES`)
option in `[admin]` section.
Added following values:
- `change_username`: Disable change username
- `change_full_name`: Disable change full name
---

Progress:
- [x] Update code
- [x] Update translations

11 days ago[skip ci] Updated translations via Crowdin
GiteaBot [Sat, 5 Oct 2024 00:30:40 +0000 (00:30 +0000)]
[skip ci] Updated translations via Crowdin

11 days agoAdd support for searching users by email (#30908)
yp05327 [Fri, 4 Oct 2024 17:45:06 +0000 (02:45 +0900)]
Add support for searching users by email (#30908)

Fix #30898

we have an option `SearchByEmail`, so enable it, then we can search user
by email.
Also added a test for it.

11 days agoFix PR creation on forked repositories (#31863)
Job [Fri, 4 Oct 2024 17:12:48 +0000 (19:12 +0200)]
Fix PR creation on forked repositories (#31863)

Resolves #20475

12 days ago[skip ci] Updated translations via Crowdin
GiteaBot [Fri, 4 Oct 2024 00:30:54 +0000 (00:30 +0000)]
[skip ci] Updated translations via Crowdin

12 days agoFixed race condition when deleting documents by repoId in ElasticSearch (#32185)
Bruno Sofiato [Thu, 3 Oct 2024 16:03:36 +0000 (13:03 -0300)]
Fixed race condition when deleting documents by repoId in ElasticSearch (#32185)

Resolves #32184

---------

Signed-off-by: Bruno Sofiato <bruno.sofiato@gmail.com>
13 days agoadd {{TEST_MINIO_ENDPOINT}} for local testing "with/without" docker + fix pgsql testi...
sommerf-lf [Thu, 3 Oct 2024 01:00:56 +0000 (03:00 +0200)]
add {{TEST_MINIO_ENDPOINT}} for local testing "with/without" docker + fix pgsql testing doc (#32105)

while testing i found out that testing locally as documented in the
changed README.md for pgsql isn't working because of the minio
dependency. reworked this to by default be still docker, but allow for
for local with only minio in docker and testing on bare metal.
also depending on this: fixed docs for running pgsql test

Closes: #32168 (by changing documentation for pgsql tests)
Closes: #32169 (by changing documentation, Makefile & pgsql.ini.tmpl:
adding {{TEST_MINIO_ENDPOINT}})

sry for the combined pr, but when testing I ran into this issue and
first thought they were related and now finally address the same
problem: not beeing able to run pgsql integration tests as described in
the according README.md

13 days ago[skip ci] Updated translations via Crowdin
GiteaBot [Thu, 3 Oct 2024 00:30:51 +0000 (00:30 +0000)]
[skip ci] Updated translations via Crowdin

2 weeks agoFix javascript error when an anonymous user visiting migration page (#32144)
Lunny Xiao [Wed, 2 Oct 2024 04:37:16 +0000 (12:37 +0800)]
Fix javascript error when an anonymous user visiting migration page (#32144)

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>
2 weeks agoMake oauth2 code clear. Move oauth2 provider code to their own packages/files (#32148)
Lunny Xiao [Wed, 2 Oct 2024 00:03:19 +0000 (08:03 +0800)]
Make oauth2 code clear. Move oauth2 provider code to their own packages/files (#32148)

Fix #30266
Replace #31533

2 weeks agoSupport repo license (#24872)
yp05327 [Tue, 1 Oct 2024 19:25:08 +0000 (04:25 +0900)]
Support repo license (#24872)

Close #278
Close #24076

## Solutions:
- Use
[google/licenseclassifier](https://github.com/google/licenseclassifier/)
Test result between
[google/licensecheck](https://github.com/google/licensecheck) and
[go-license-detector](https://github.com/go-enry/go-license-detector):
https://github.com/go-gitea/gitea/pull/24872#issuecomment-1560361167
Test result between
[google/licensecheck](https://github.com/google/licensecheck) and
[google/licenseclassifier](https://github.com/google/licenseclassifier/):
https://github.com/go-gitea/gitea/pull/24872#issuecomment-1576092178
- Generate License Convert Name List to avoid import license templates
with same contents
Gitea automatically get latest license data from[
spdx/license-list-data](https://github.com/spdx/license-list-data).
But unfortunately, some license templates have same contents. #20915
[click here to see the
list](https://github.com/go-gitea/gitea/pull/24872#issuecomment-1584141684)
So we will generate a list of these license templates with same contents
and create a new file to save the result when using `make
generate-license`. (Need to decide the save path)
- Save License info into a new table `repo_license`
Can easily support searching repo by license in the future.

## Screen shot
Single License:

![image](https://github.com/go-gitea/gitea/assets/18380374/41260bd7-0b4c-4038-8592-508706cffa9f)

Multiple Licenses:

![image](https://github.com/go-gitea/gitea/assets/18380374/34ce2f73-7e18-446b-9b96-ecc4fb61bd70)

Triggers:
- [x] Push commit to default branch
- [x] Create repo
- [x] Mirror repo
- [x] When Default Branch is changed, licenses should be updated

Todo:
- [x] Save Licenses info in to DB when there's a change to license file
in the commit
- [x] DB Migration
- [x] A nominal test?
- [x] Select which library to
use(https://github.com/go-gitea/gitea/pull/24872#issuecomment-1560361167)
- [x] API Support
- [x] Add repo license table
- ~Select license in settings if there are several licenses(Not
recommended)~
- License board(later, not in this PR)

![image](https://github.com/go-gitea/gitea/assets/18380374/2c3c3bf8-bcc2-4c6d-8ce0-81d1a9733878)

---------

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Denys Konovalov <kontakt@denyskon.de>
Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: 6543 <m.huber@kithara.com>
Co-authored-by: a1012112796 <1012112796@qq.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.com>
2 weeks agoFix the logic of finding the latest pull review commit ID (#32139)
Zettat123 [Tue, 1 Oct 2024 01:58:55 +0000 (09:58 +0800)]
Fix the logic of finding the latest pull review commit ID (#32139)

Fix #31423

2 weeks agoEnsure `GetCSRF` doesn't return an empty token (#32130)
Jason Song [Mon, 30 Sep 2024 02:28:09 +0000 (10:28 +0800)]
Ensure `GetCSRF` doesn't return an empty token (#32130)

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

https://github.com/go-gitea/gitea/blob/3269b04d61ffe6a7ce462cd05ee150e4491124e8/tests/integration/attachment_test.go#L62-L63

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

2 weeks agoBump minio-go to latest version (#32156)
Manuel Valls Fernández [Mon, 30 Sep 2024 01:57:48 +0000 (03:57 +0200)]
Bump minio-go to latest version (#32156)

Current minio-go version has issues with S3 compatible storages like
Backblaze or Wasabi. This was fixed in
https://github.com/minio/minio-go/pull/1980 .

2 weeks agoChange the code search to sort results by relevance (#32134)
Bruno Sofiato [Sat, 28 Sep 2024 20:13:55 +0000 (17:13 -0300)]
Change the code search to sort results by relevance (#32134)

Resolves #32129

Signed-off-by: Bruno Sofiato <bruno.sofiato@gmail.com>
2 weeks ago[skip ci] Updated translations via Crowdin
GiteaBot [Sat, 28 Sep 2024 00:30:56 +0000 (00:30 +0000)]
[skip ci] Updated translations via Crowdin

2 weeks agoAdd pure SSH LFS support (#31516)
ConcurrentCrab [Fri, 27 Sep 2024 14:27:37 +0000 (19:57 +0530)]
Add pure SSH LFS support (#31516)

Fixes #17554
/claim #17554

Docs PR https://gitea.com/gitea/docs/pulls/49

To test, run pushes like: `GIT_TRACE=1` git push. The trace output
should mention "pure SSH connection".

2 weeks ago[skip ci] Updated translations via Crowdin
GiteaBot [Fri, 27 Sep 2024 00:31:00 +0000 (00:31 +0000)]
[skip ci] Updated translations via Crowdin

2 weeks agoDon't join repository when loading action table data (#32127)
Lunny Xiao [Thu, 26 Sep 2024 04:50:30 +0000 (12:50 +0800)]
Don't join repository when loading action table data (#32127)

3 weeks agoNotify the user when the file path contains leading or trailing spaces and fix the...
charles [Tue, 24 Sep 2024 19:06:52 +0000 (03:06 +0800)]
Notify the user when the file path contains leading or trailing spaces and fix the error message for invalid file names. (#31507)

close #31478

3 weeks agoFix wrong status of `Set up Job` when first step is skipped (#32120)
yp05327 [Tue, 24 Sep 2024 18:34:08 +0000 (03:34 +0900)]
Fix wrong status of `Set up Job` when first step is skipped (#32120)

Fix #32089

3 weeks agoFix bug when deleting a migrated branch (#32075)
Lunny Xiao [Tue, 24 Sep 2024 07:42:08 +0000 (15:42 +0800)]
Fix bug when deleting a migrated branch (#32075)

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

3 weeks agoInclude collaboration repositories on dashboard source/forks/mirrors list (#31946)
Lunny Xiao [Tue, 24 Sep 2024 07:12:06 +0000 (15:12 +0800)]
Include collaboration repositories on dashboard source/forks/mirrors list (#31946)

Fix #13489

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.

3 weeks agoDisplay head branch more comfortable on pull request view (#32000)
Lunny Xiao [Tue, 24 Sep 2024 04:14:57 +0000 (12:14 +0800)]
Display head branch more comfortable on pull request view (#32000)

This PR do some minor improvements for head branch display on pull
request view UI.

- [x] Remove the link if the head branch has been deleted with a
tooltip, so that users will not result in a 404 page
- [x] Display a label if this pull request is an agit based one.

![图片](https://github.com/user-attachments/assets/872f26b6-f1cf-4427-9e41-e3a5b176dfa4)

3 weeks agoTruncate commit message during Discord webhook push events (#31970)
Kemal Zebari [Tue, 24 Sep 2024 03:38:08 +0000 (20:38 -0700)]
Truncate commit message during Discord webhook push events (#31970)

Resolves #31668.

3 weeks agoFix template bug of pull request view (#32072)
Lunny Xiao [Tue, 24 Sep 2024 03:02:42 +0000 (11:02 +0800)]
Fix template bug of pull request view (#32072)

Caused by #31924

3 weeks agoAllow set branch protection in an empty repository (#32095)
Lunny Xiao [Tue, 24 Sep 2024 02:06:28 +0000 (10:06 +0800)]
Allow set branch protection in an empty repository (#32095)

3 weeks agoFix panic when cloning with wrong ssh format. (#32076)
Lunny Xiao [Tue, 24 Sep 2024 01:30:05 +0000 (09:30 +0800)]
Fix panic when cloning with wrong ssh format. (#32076)

3 weeks agoFix bug in getting merged pull request by commit (#32079)
Zettat123 [Tue, 24 Sep 2024 01:00:09 +0000 (09:00 +0800)]
Fix bug in getting merged pull request by commit (#32079)

3 weeks ago[skip ci] Updated translations via Crowdin
GiteaBot [Tue, 24 Sep 2024 00:30:57 +0000 (00:30 +0000)]
[skip ci] Updated translations via Crowdin

3 weeks agouse rebuilt mssql-2017 image (#32109)
techknowlogick [Mon, 23 Sep 2024 20:54:20 +0000 (16:54 -0400)]
use rebuilt mssql-2017 image (#32109)

3 weeks agoFix Bug in Issue/pulls list (#32081)
cloudchamb3r [Mon, 23 Sep 2024 17:09:57 +0000 (02:09 +0900)]
Fix Bug in Issue/pulls list (#32081)

fix #32080

## After
### for opened issues
<img width="1199" alt="Screenshot 2024-09-19 at 6 29 31 PM"
src="https://github.com/user-attachments/assets/86cf48ad-5e4b-4dcb-8abe-4d7fd74e0aec">

### for closed issues
<img width="1208" alt="Screenshot 2024-09-19 at 6 29 37 PM"
src="https://github.com/user-attachments/assets/a16bc545-bfcf-49a4-be52-3e7334910482">

### for all issues
<img width="1340" alt="Screenshot 2024-09-20 at 12 07 12 PM"
src="https://github.com/user-attachments/assets/b2309c8f-e59d-44e9-ae3b-bf54e1196169">

3 weeks ago[skip ci] Updated licenses and gitignores
GiteaBot [Mon, 23 Sep 2024 00:31:34 +0000 (00:31 +0000)]
[skip ci] Updated licenses and gitignores

3 weeks agoFix rename branch permission bug (#32066)
Lunny Xiao [Sun, 22 Sep 2024 18:08:27 +0000 (02:08 +0800)]
Fix rename branch permission bug (#32066)

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

Fix #31993

3 weeks agoFix artifact v4 upload above 8MB (#31664)
ChristopherHX [Sun, 22 Sep 2024 11:01:09 +0000 (13:01 +0200)]
Fix artifact v4 upload above 8MB (#31664)

Multiple chunks are uploaded with type "block" without using
"appendBlock" and eventually out of order for bigger uploads.
8MB seems to be the chunk size

This change parses the blockList uploaded after all blocks to get the
final artifact size and order them correctly before calculating the
sha256 checksum over all blocks

Fixes #31354

3 weeks ago[skip ci] Updated translations via Crowdin
GiteaBot [Sun, 22 Sep 2024 00:33:39 +0000 (00:33 +0000)]
[skip ci] Updated translations via Crowdin

3 weeks agoAdd bin to Composer Metadata (#32099)
Jamie Schouten [Sat, 21 Sep 2024 22:42:17 +0000 (00:42 +0200)]
Add bin to Composer Metadata (#32099)

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).

3 weeks agoFix wrong last modify time (#32102)
Lunny Xiao [Sat, 21 Sep 2024 21:56:25 +0000 (05:56 +0800)]
Fix wrong last modify time (#32102)

3 weeks agoFix upload maven pacakge parallelly (#31851)
Lunny Xiao [Sat, 21 Sep 2024 19:26:45 +0000 (03:26 +0800)]
Fix upload maven pacakge parallelly (#31851)

Use globallock for maven package uploads.

Thanks @tlusser for the test code.

Depends on ~#31813~

3 weeks agoRepo Activity: count new issues that were closed (#31776)
Timon van der Berg [Sat, 21 Sep 2024 18:57:01 +0000 (20:57 +0200)]
Repo Activity: count new issues that were closed (#31776)

I'm new to go and contributing to gitea, your guidance is much
appreciated.

This is meant to solve https://github.com/go-gitea/gitea/issues/13309

Previously, closed issues would not be shown under new issues in the
activity tab, even if they were newly created.

changes:
* Split out newlyCreatedIssues from issuesForActivityStatement to count
  both currently open and closed issues.
* Use a seperate function to count active issues to prevent
double-counting issues after the above change.

Result is that new issues that have been closed are shown both under
"new" and "closed".

Signed-off-by: Timon van der Berg <tmnvanderberg@gmail.com>
3 weeks agoCount typescript files as frontend for labeling (#32088)
Anbraten [Sat, 21 Sep 2024 18:26:36 +0000 (20:26 +0200)]
Count typescript files as frontend for labeling (#32088)

3 weeks agoUse camo.Always instead of camo.Allways (#32097)
Lunny Xiao [Sat, 21 Sep 2024 09:50:54 +0000 (17:50 +0800)]
Use camo.Always instead of camo.Allways (#32097)

Fix #31575

https://gitea.com/gitea/docs/pulls/73

3 weeks agoFix incorrect `/tokens` api (#32085)
KN4CK3R [Fri, 20 Sep 2024 19:00:39 +0000 (21:00 +0200)]
Fix incorrect `/tokens` api (#32085)

Fixes #32078

- Add missing scopes output.
- Disallow empty scope.

---------

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
3 weeks agoSet manual `tabindex`es on login page (#31689)
silverwind [Fri, 20 Sep 2024 15:27:19 +0000 (17:27 +0200)]
Set manual `tabindex`es on login page (#31689)

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

A more elborate manual tabindex numbering could be done, but I think
it's not really worth the extra effort and such stuff could easily break
during refactors.

Includes another small tweak to un-stretch the`<a>` element so it's only
as large as it needs to be and this change also made the margin
unneeded.

3 weeks agoOnly use Host header from reverse proxy (#32060)
wxiaoguang [Fri, 20 Sep 2024 14:57:55 +0000 (22:57 +0800)]
Only use Host header from reverse proxy (#32060)

X-Forwarded-Host has many problems: non-standard, not well-defined
(X-Forwarded-Port or not), conflicts with Host header, it already caused
problems like #31907. So do not use X-Forwarded-Host, just use Host
header directly.

Official document also only uses `Host` header and never mentioned
others.

3 weeks ago[skip ci] Updated translations via Crowdin
GiteaBot [Fri, 20 Sep 2024 00:29:58 +0000 (00:29 +0000)]
[skip ci] Updated translations via Crowdin

3 weeks ago[skip ci] Updated translations via Crowdin
GiteaBot [Thu, 19 Sep 2024 00:30:35 +0000 (00:30 +0000)]
[skip ci] Updated translations via Crowdin

3 weeks agoFix: database not update release when using `git push --tags --force` (#32040)
Exploding Dragon [Wed, 18 Sep 2024 20:15:03 +0000 (04:15 +0800)]
Fix: database not update release when using `git push --tags --force` (#32040)

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

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
3 weeks agoResolve duplicate local string key related to PR comments (#32073)
Kemal Zebari [Wed, 18 Sep 2024 19:46:41 +0000 (12:46 -0700)]
Resolve duplicate local string key related to PR comments (#32073)

A regression in #31924 caused there to be two `issues.review.comment`
keys in the English language locale file, leading to a problem when
reading PR review histories that contain comments.

This snapshot addresses this by making the newer key unique.

4 weeks agoRefactor CSRF protector (#32057)
wxiaoguang [Wed, 18 Sep 2024 07:17:25 +0000 (15:17 +0800)]
Refactor CSRF protector (#32057)

Remove unused CSRF options, decouple "new csrf protector" and "prepare"
logic, do not redirect to home page if CSRF validation falis (it
shouldn't happen in daily usage, if it happens, redirecting to home
doesn't help either but just makes the problem more complex for "fetch")

4 weeks agoAdd missing comment reply handling (#32050)
KN4CK3R [Tue, 17 Sep 2024 20:56:26 +0000 (22:56 +0200)]
Add missing comment reply handling (#32050)

Fixes #31937

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

Compare without whitespaces.

4 weeks agoFix CI (#32062)
Lunny Xiao [Tue, 17 Sep 2024 19:35:59 +0000 (03:35 +0800)]
Fix CI (#32062)

4 weeks agoLazy load avatar images (#32051)
hiifong [Tue, 17 Sep 2024 19:02:48 +0000 (03:02 +0800)]
Lazy load avatar images (#32051)

4 weeks agoIncluded tag search capabilities (#32045)
Bruno Sofiato [Tue, 17 Sep 2024 18:33:11 +0000 (15:33 -0300)]
Included tag search capabilities (#32045)

Resolves #31998

The first screenshot shows the tag page without any filter being
applied:

![image](https://github.com/user-attachments/assets/eac0e51c-9e48-42b2-bb1c-a25896ca40cb)

The second one, shows the page when the given filter returns no tag:

![image](https://github.com/user-attachments/assets/98df191e-1a7b-4947-b0ef-4987a0293c3e)

The last one shows a single tag being filtered:

![image](https://github.com/user-attachments/assets/79c7e05e-8c86-4f06-b17e-15818b7b9291)

Signed-off-by: Bruno Sofiato <bruno.sofiato@gmail.com>
4 weeks agoDo not escape relative path in RPM primary index (#32038)
KN4CK3R [Mon, 16 Sep 2024 21:10:33 +0000 (23:10 +0200)]
Do not escape relative path in RPM primary index (#32038)

Fixes #32021

Do not escape the relative path.

4 weeks agofeat(#31666): Set the columns height to hug all its contents (#31726)
Simon Pistache [Mon, 16 Sep 2024 20:41:46 +0000 (22:41 +0200)]
feat(#31666): Set the columns height to hug all its contents (#31726)

In Projects, columns heights are defined by the sum of all contents
height of the biggest column, rather than a fraction of the viewport
height. It default to 60vh when there is no cards to display.

Fix #31666

4 weeks ago[skip ci] Updated translations via Crowdin
GiteaBot [Mon, 16 Sep 2024 00:31:40 +0000 (00:31 +0000)]
[skip ci] Updated translations via Crowdin

4 weeks ago[skip ci] Updated translations via Crowdin
GiteaBot [Sun, 15 Sep 2024 00:34:01 +0000 (00:34 +0000)]
[skip ci] Updated translations via Crowdin

4 weeks agoUse a common message template instead of a special one (#31878)
Lunny Xiao [Sat, 14 Sep 2024 17:17:49 +0000 (01:17 +0800)]
Use a common message template instead of a special one (#31878)

4 weeks agoCheck if the `due_date` is nil when editing issues (#32035)
Zettat123 [Sat, 14 Sep 2024 16:40:36 +0000 (00:40 +0800)]
Check if the `due_date` is nil when editing issues (#32035)

4 weeks agoHandle invalid target when creating releases using API (#31841)
Kemal Zebari [Thu, 12 Sep 2024 07:47:31 +0000 (00:47 -0700)]
Handle invalid target when creating releases using API (#31841)

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 #31840.

4 weeks agoAdd option to filter board cards by labels and assignees (#31999)
Lauris BH [Thu, 12 Sep 2024 03:53:40 +0000 (06:53 +0300)]
Add option to filter board cards by labels and assignees (#31999)

Works in both organization and repository project boards

Fixes #21846

Replaces #21963
Replaces #27117

![image](https://github.com/user-attachments/assets/1837ace8-3de2-444f-a153-e166bd0da2c0)

**Note** that implementation was made intentionally to work same as in
issue list so that URL can be bookmarked for quick access with
predefined filters in URL

4 weeks ago[skip ci] Updated translations via Crowdin
GiteaBot [Thu, 12 Sep 2024 00:30:02 +0000 (00:30 +0000)]
[skip ci] Updated translations via Crowdin

4 weeks ago Failed authentications are logged to level Warning (#32016)
Daniel [Wed, 11 Sep 2024 17:58:45 +0000 (19:58 +0200)]
 Failed authentications are logged to level Warning (#32016)

PR for issue #31968
Replaces PR #31983 to comply with gitea's error definition

Failed authentications are now logged to level `Warning` instead of
`Info`.

4 weeks agoFix `/repos/{owner}/{repo}/pulls/{index}/files` endpoint not populating `previous_fil...
charles-plutohealth [Wed, 11 Sep 2024 17:29:27 +0000 (13:29 -0400)]
Fix `/repos/{owner}/{repo}/pulls/{index}/files` endpoint not populating `previous_filename` (#32017)

---
`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.

5 weeks agoSupport allowed hosts for migrations to work with proxy (#32025)
Jason Song [Wed, 11 Sep 2024 05:47:00 +0000 (13:47 +0800)]
Support allowed hosts for migrations to work with proxy (#32025)

5 weeks agoSupport migration from AWS CodeCommit (#31981)
Zettat123 [Tue, 10 Sep 2024 23:49:42 +0000 (07:49 +0800)]
Support migration from AWS CodeCommit (#31981)

This PR adds support for migrating repos from [AWS
CodeCommit](https://docs.aws.amazon.com/codecommit/latest/userguide/welcome.html).

The access key ID and secret access key are required to get repository
information and pull requests. And [HTTPS Git
credentials](https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-gc.html)
are required to clone the repository.

<img
src="https://github.com/user-attachments/assets/82ecb2d0-8d43-42b0-b5af-f5347a13b9d0"
width="680" />

The AWS CodeCommit icon is from [AWS Architecture
Icons](https://aws.amazon.com/architecture/icons/).

<img
src="https://github.com/user-attachments/assets/3c44d21f-d753-40f5-9eae-5d3589e0d50d"
width="320" />

5 weeks agobump to go 1.23 (#31855)
techknowlogick [Tue, 10 Sep 2024 02:23:07 +0000 (22:23 -0400)]
bump to go 1.23 (#31855)

5 weeks agoEnable compression for Actions logs by default (#32013)
Jason Song [Mon, 9 Sep 2024 21:34:42 +0000 (05:34 +0800)]
Enable compression for Actions logs by default (#32013)

Close #31801. Follow #31761.

Since there are so many benefits of compression and there are no reports
of related issues after weeks, it should be fine to enable compression
by default.

5 weeks agoSave initial signup information for users to aid in spam prevention (#31852)
techknowlogick [Mon, 9 Sep 2024 21:05:16 +0000 (17:05 -0400)]
Save initial signup information for users to aid in spam prevention (#31852)

This will allow instance admins to view signup pattern patterns for
public instances. It is modelled after discourse, mastodon, and
MediaWiki's approaches.

Note: This has privacy implications, but as the above-stated open-source
projects take this approach, especially MediaWiki, which I have no doubt
looked into this thoroughly, it is likely okay for us, too. However, I
would be appreciative of any feedback on how this could be improved.

---------

Co-authored-by: Giteabot <teabot@gitea.io>
5 weeks agoIncrease `cacheContextLifetime` to reduce false reports (#32011)
Jason Song [Mon, 9 Sep 2024 04:51:25 +0000 (12:51 +0800)]
Increase `cacheContextLifetime` to reduce false reports (#32011)

Replace #32001.

To prevent the context cache from being misused for long-term work
(which would result in using invalid cache without awareness), the
context cache is designed to exist for a maximum of 10 seconds. This
leads to many false reports, especially in the case of slow SQL.

This PR increases it to 5 minutes to reduce false reports.

5 minutes is not a very safe value, as a lot of changes may have
occurred within that time frame. However, as far as I know, there has
not been a case of misuse of context cache discovered so far, so I think
5 minutes should be OK.

Please note that after this PR, if warning logs are found again, it
should get attention, at that time it can be almost 100% certain that it
is a misuse.

5 weeks ago[skip ci] Updated licenses and gitignores
GiteaBot [Mon, 9 Sep 2024 00:31:04 +0000 (00:31 +0000)]
[skip ci] Updated licenses and gitignores

5 weeks ago[skip ci] Updated translations via Crowdin
GiteaBot [Sun, 8 Sep 2024 00:32:28 +0000 (00:32 +0000)]
[skip ci] Updated translations via Crowdin

5 weeks agoRemove SHA1 for support for ssh rsa signing (#31857)
Wim [Sat, 7 Sep 2024 22:05:18 +0000 (00:05 +0200)]
Remove SHA1 for support for ssh rsa signing (#31857)

https://github.com/go-fed/httpsig seems to be unmaintained.

Switch to github.com/42wim/httpsig which has removed deprecated crypto
and default sha256 signing for ssh rsa.

No impact for those that use ed25519 ssh certificates.

This is a breaking change for:
- gitea.com/gitea/tea (go-sdk) - I'll be sending a PR there too
- activitypub using deprecated crypto (is this actually used?)

5 weeks agoUpgrade cache to v0.2.1 (#32003)
Lunny Xiao [Sat, 7 Sep 2024 17:12:37 +0000 (01:12 +0800)]
Upgrade cache to v0.2.1 (#32003)

Fix #31757

5 weeks agoAdd automatic light/dark option for the colorblind theme (#31997)
Luca Söthe [Sat, 7 Sep 2024 03:09:40 +0000 (05:09 +0200)]
Add automatic light/dark option for the colorblind theme (#31997)

The normal themes already have a variant which automatically chooses
light/dark mode based on the browser.
This PR adds the same variant, but for the colorblind themes.

5 weeks ago[skip ci] Updated translations via Crowdin
GiteaBot [Sat, 7 Sep 2024 00:29:09 +0000 (00:29 +0000)]
[skip ci] Updated translations via Crowdin

5 weeks agoUse global lock instead of NewExclusivePool to allow distributed lock between multipl...
Lunny Xiao [Fri, 6 Sep 2024 10:12:41 +0000 (18:12 +0800)]
Use global lock instead of NewExclusivePool to allow distributed lock between multiple Gitea instances (#31813)

Replace #26486
Fix #19620

---------

Co-authored-by: Jason Song <i@wolfogre.com>
5 weeks agoUse forum.gitea.com instead of old URL (#31989)
Lunny Xiao [Fri, 6 Sep 2024 07:20:30 +0000 (15:20 +0800)]
Use forum.gitea.com instead of old URL (#31989)

5 weeks agoDistinguish official vs non-official reviews, add tool tips, and upgr… (#31924)
william-allspice [Fri, 6 Sep 2024 06:40:02 +0000 (01:40 -0500)]
Distinguish official vs non-official reviews, add tool tips, and upgr… (#31924)

This Pull Request is a follow up to
https://github.com/go-gitea/gitea/pull/31886:

1. Adds a UI indicator between official (green) and unofficial (grey)
approved pull requests on the Pull Request page (as suggested by
@kdumontnu )
2. Adds tooltips adding clarity to the type and status of a review on
the Pull Request page (as suggested by @kdumontnu)
3. Updates text adding more clarity to required approvals (as suggested
by @kdumontnu)
4. Updates text on the branch settings page explaining what branch
approval limitations (as suggested by @yp05327)

Official approval:
<img width="376" alt="Screenshot 2024-08-26 at 1 03 52 PM"
src="https://github.com/user-attachments/assets/500f083d-bfc0-45c5-82b7-b98e20495696">

Unofficial approval:
<img width="442" alt="Screenshot 2024-08-26 at 12 53 15 PM"
src="https://github.com/user-attachments/assets/e8c565ff-5886-4ce1-8b79-a0fa26c282f7">

Rejected approval:
<img width="452" alt="Screenshot 2024-08-26 at 12 53 06 PM"
src="https://github.com/user-attachments/assets/aebc0e2f-7052-4dea-8098-7caa0db86617">

Stale approval:
<img width="546" alt="Screenshot 2024-08-26 at 1 07 59 PM"
src="https://github.com/user-attachments/assets/da599ff3-e35c-4fa3-8141-ed80b738dd77">

Requested review tooltip:
<img width="434" alt="Screenshot 2024-08-26 at 12 53 22 PM"
src="https://github.com/user-attachments/assets/460d163e-8724-43b6-8760-34b285da8fe2">

Updated text for approvals:
<img width="991" alt="Screenshot 2024-08-26 at 12 54 00 PM"
src="https://github.com/user-attachments/assets/ab3ff012-9742-4c1b-933d-21addcb89f2c">

Updated text for allowlisted/whitelisted approvals:
<img width="990" alt="Screenshot 2024-08-26 at 1 01 40 PM"
src="https://github.com/user-attachments/assets/1a5bae61-d9e0-4d96-b86f-92610b0940d1">

Protected branch settings text:
<img width="1022" alt="Screenshot 2024-08-26 at 1 01 14 PM"
src="https://github.com/user-attachments/assets/892ce208-e1c2-41f7-8fec-46d5a0e7e776">

Comments list:
<img width="1048" alt="Screenshot 2024-08-28 at 9 25 31 AM"
src="https://github.com/user-attachments/assets/9c5c00c5-06cf-43b3-b413-4f7f673609b2">

---------

Co-authored-by: Kyle D. <kdumontnu@gmail.com>
5 weeks agoReturn 404 instead of error when commit not exist (#31977)
Adam Majer [Thu, 5 Sep 2024 18:39:23 +0000 (20:39 +0200)]
Return 404 instead of error when commit not exist (#31977)

Fix #31976

5 weeks agoFor consistency make repo search sort options case sensitive (#31951)
6543 [Thu, 5 Sep 2024 10:53:30 +0000 (12:53 +0200)]
For consistency make repo search sort options case sensitive (#31951)

5 weeks agoFix nuget/conan/container packages upload bugs (#31967)
Lunny Xiao [Thu, 5 Sep 2024 07:05:42 +0000 (15:05 +0800)]
Fix nuget/conan/container packages upload bugs (#31967)

6 weeks ago[skip ci] Updated translations via Crowdin
GiteaBot [Wed, 4 Sep 2024 06:28:39 +0000 (06:28 +0000)]
[skip ci] Updated translations via Crowdin

6 weeks ago[skip ci] Updated translations via Crowdin
GiteaBot [Wed, 4 Sep 2024 05:30:04 +0000 (05:30 +0000)]
[skip ci] Updated translations via Crowdin