]> source.dussan.org Git - gitea.git/log
gitea.git
3 weeks agoMigrate vue components to setup (#32329)
Anbraten [Mon, 28 Oct 2024 20:15:05 +0000 (21:15 +0100)]
Migrate vue components to setup (#32329)

Migrated a handful Vue components to the `setup` syntax using
composition api as it has better Typescript support and is becoming the
new default in the Vue ecosystem.

- [x] ActionRunStatus.vue
- [x] ActivityHeatmap.vue
- [x] ContextPopup.vue
- [x] DiffFileList.vue
- [x] DiffFileTree.vue
- [x] DiffFileTreeItem.vue
- [x] PullRequestMergeForm.vue
- [x] RepoActivityTopAuthors.vue
- [x] RepoCodeFrequency.vue
- [x] RepoRecentCommits.vue
- [x] ScopedAccessTokenSelector.vue

Left some larger components untouched for now to not go to crazy in this
single PR:
- [ ] DiffCommitSelector.vue
- [ ] RepoActionView.vue
- [ ] RepoContributors.vue
- [ ] DashboardRepoList.vue
- [ ] RepoBranchTagSelector.vue

3 weeks agoFix db engine (#32351)
wxiaoguang [Sun, 27 Oct 2024 22:48:07 +0000 (06:48 +0800)]
Fix db engine (#32351)

Fix #32349

3 weeks agoRefactor the DB migration system slightly (#32344)
wxiaoguang [Sun, 27 Oct 2024 11:54:35 +0000 (19:54 +0800)]
Refactor the DB migration system slightly (#32344)

Introduce "idNumber" for each migration, and clarify the difference
between the migration ID number and database version.

4 weeks agoFix broken image when editing comment with non-image attachments (#32319)
yp05327 [Wed, 23 Oct 2024 15:39:10 +0000 (00:39 +0900)]
Fix broken image when editing comment with non-image attachments (#32319)

Fix #32316

4 weeks agoFix disable 2fa bug (#32320)
Lunny Xiao [Wed, 23 Oct 2024 06:41:00 +0000 (14:41 +0800)]
Fix disable 2fa bug (#32320)

4 weeks agoUpgrade rollup to 4.24.0 (#32312)
Lunny Xiao [Wed, 23 Oct 2024 05:00:32 +0000 (13:00 +0800)]
Upgrade rollup to 4.24.0 (#32312)

4 weeks agoUpgrade vue to 3.5.12 (#32311)
Lunny Xiao [Wed, 23 Oct 2024 04:55:17 +0000 (12:55 +0800)]
Upgrade vue to 3.5.12 (#32311)

4 weeks agoMake admins adhere to branch protection rules (#32248)
Tim [Wed, 23 Oct 2024 04:39:43 +0000 (06:39 +0200)]
Make admins adhere to branch protection rules (#32248)

This introduces a new flag `BlockAdminMergeOverride` on the branch
protection rules that prevents admins/repo owners from bypassing branch
protection rules and merging without approvals or failing status checks.

Fixes #17131

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Giteabot <teabot@gitea.io>
4 weeks agoPrevent from submitting issue/comment on uploading (#32263)
박상철 [Wed, 23 Oct 2024 02:48:04 +0000 (11:48 +0900)]
Prevent from submitting issue/comment on uploading (#32263)

fix #32262

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Giteabot <teabot@gitea.io>
4 weeks agoAdd warn log when deleting inactive users (#32318)
Lunny Xiao [Wed, 23 Oct 2024 01:28:28 +0000 (09:28 +0800)]
Add warn log when deleting inactive users (#32318)

Add log for the problem #31480

4 weeks agoAdd `DISABLE_ORGANIZATIONS_PAGE` and `DISABLE_CODE_PAGE` settings for explore pages...
Zettat123 [Tue, 22 Oct 2024 05:09:19 +0000 (13:09 +0800)]
Add `DISABLE_ORGANIZATIONS_PAGE` and `DISABLE_CODE_PAGE` settings for explore pages and fix an issue related to user search (#32288)

These settings can allow users to only display the repositories explore page.

Thanks to yp05327 and wxiaoguang !

---------

Co-authored-by: Giteabot <teabot@gitea.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
4 weeks agochore: fix some function names in comment (#32300)
wangjingcun [Tue, 22 Oct 2024 00:41:05 +0000 (08:41 +0800)]
chore: fix some function names in comment (#32300)

fix some function names in comment

4 weeks agoAPI: enhance SearchIssues swagger docs (#32208)
6543 [Sat, 19 Oct 2024 20:11:56 +0000 (22:11 +0200)]
API: enhance SearchIssues swagger docs (#32208)

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

---
*Sponsored by Kithara Software GmbH*

4 weeks agoUpdate github.com/go-enry/go-enry to v2.9.1 (#32295)
YR Chen [Sat, 19 Oct 2024 12:51:55 +0000 (20:51 +0800)]
Update github.com/go-enry/go-enry to v2.9.1 (#32295)

`go-enry` v2.9.1 includes latest file patterns from Linguist, which can
identify more generated file type, eg. `pdm.lock`.

5 weeks agoAlways update expiration time when creating an artifact (#32281)
Zettat123 [Thu, 17 Oct 2024 09:05:38 +0000 (17:05 +0800)]
Always update expiration time when creating an artifact (#32281)

Fix #32256

5 weeks agoAdd `gh-access-token` flag into backport script (#32283)
cloudchamb3r [Thu, 17 Oct 2024 05:43:48 +0000 (14:43 +0900)]
Add `gh-access-token` flag into backport script (#32283)

The current backport script does not have github access token flag.
This patch will be useful when encountered rate limit issue.

5 weeks agoWarn users when they try to use a non-root-url to sign in/up (#32272)
wxiaoguang [Thu, 17 Oct 2024 02:28:51 +0000 (10:28 +0800)]
Warn users when they try to use a non-root-url to sign in/up (#32272)

5 weeks agoFix null errors on conversation holder (#32258) (#32266)
cloudchamb3r [Wed, 16 Oct 2024 12:39:47 +0000 (21:39 +0900)]
Fix null errors on conversation holder (#32258) (#32266)

fix #32258

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.

5 weeks agoSupport requested_reviewers data in comment webhook events (#26178)
谈笑风生间 [Wed, 16 Oct 2024 09:10:05 +0000 (17:10 +0800)]
Support requested_reviewers data in comment webhook events (#26178)

close #25833

Currently, the information for "requested_reviewers" is only included in
the webhook event for reviews. I would like to suggest adding this
information to the webhook event for "PullRequest comment" as well, as
they both pertain to the "PullRequest" event.

Also, The reviewer information for the Pull Request is not displayed
when it is approved or rejected.

5 weeks agoMake `owner/repo/pulls` handlers use "PR reader" permission (#32254)
wxiaoguang [Tue, 15 Oct 2024 06:47:07 +0000 (14:47 +0800)]
Make `owner/repo/pulls` handlers use "PR reader" permission (#32254)

Fix #32253 (partially)

5 weeks agomake `show stats` work when only one file changed (#32244)
a1012112796 [Mon, 14 Oct 2024 21:23:20 +0000 (05:23 +0800)]
make `show stats` work when only one file changed (#32244)

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>
5 weeks agoUpdate scheduled tasks even if changes are pushed by "ActionsUser" (#32246)
Zettat123 [Sun, 13 Oct 2024 20:28:32 +0000 (04:28 +0800)]
Update scheduled tasks even if changes are pushed by "ActionsUser" (#32246)

Fix #32219

---------

Co-authored-by: delvh <dev.lh@web.de>
5 weeks agoSupport migrating GitHub/GitLab PR draft status (#32242)
Zettat123 [Sun, 13 Oct 2024 19:58:13 +0000 (03:58 +0800)]
Support migrating GitHub/GitLab PR draft status (#32242)

Resolve #32196

5 weeks agoOnly rename a user when they should receive a different name (#32247)
Lunny Xiao [Sun, 13 Oct 2024 03:13:55 +0000 (11:13 +0800)]
Only rename a user when they should receive a different name (#32247)

Fix #31996

5 weeks agoFix dropdown content overflow (#31610)
charles [Sun, 13 Oct 2024 02:43:43 +0000 (10:43 +0800)]
Fix dropdown content overflow (#31610)

close #31602

![圖片](https://github.com/go-gitea/gitea/assets/30816317/43722917-bc5e-4e06-b0de-db52552a20df)

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
5 weeks agoMake git push options accept short name (#32245)
wxiaoguang [Sat, 12 Oct 2024 05:42:10 +0000 (13:42 +0800)]
Make git push options accept short name (#32245)

Just like what most CLI parsers do: `--opt` means `opt=true`

Then users could use `-o force-push` as `-o force-push=true`

5 weeks agoAllow code search by filename (#32210)
Bruno Sofiato [Fri, 11 Oct 2024 23:35:04 +0000 (20:35 -0300)]
Allow code search by filename (#32210)

This is a large and complex PR, so let me explain in detail its changes.

First, I had to create new index mappings for Bleve and ElasticSerach as
the current ones do not support search by filename. This requires Gitea
to recreate the code search indexes (I do not know if this is a breaking
change, but I feel it deserves a heads-up).

I've used [this
approach](https://www.elastic.co/guide/en/elasticsearch/reference/7.17/analysis-pathhierarchy-tokenizer.html)
to model the filename index. It allows us to efficiently search for both
the full path and the name of a file. Bleve, however, does not support
this out-of-box, so I had to code a brand new [token
filter](https://blevesearch.com/docs/Token-Filters/) to generate the
search terms.

I also did an overhaul in the `indexer_test.go` file. It now asserts the
order of the expected results (this is important since matches based on
the name of a file are more relevant than those based on its content).
I've added new test scenarios that deal with searching by filename. They
use a new repo included in the Gitea fixture.

The screenshot below depicts how Gitea shows the search results. It
shows results based on content in the same way as the current version
does. In matches based on the filename, the first seven lines of the
file contents are shown (BTW, this is how GitHub does it).

![image](https://github.com/user-attachments/assets/9d938d86-1a8d-4f89-8644-1921a473e858)

Resolves #32096

---------

Signed-off-by: Bruno Sofiato <bruno.sofiato@gmail.com>
5 weeks agoAllow maintainers to view and edit files of private repos when "Allow maintainers...
Zettat123 [Fri, 11 Oct 2024 19:08:19 +0000 (03:08 +0800)]
Allow maintainers to view and edit files of private repos when "Allow maintainers to edit" is enabled (#32215)

Fix #31539

5 weeks agoUse per package global lock for container uploads instead of memory lock (#31860)
Lunny Xiao [Fri, 11 Oct 2024 07:37:49 +0000 (15:37 +0800)]
Use per package global lock for container uploads instead of memory lock (#31860)

This PR uses a per-package lock instead of a global lock for container
uploads. So that different packages can be uploaded simultaneously.

5 weeks agoFix checkbox bug on private/archive filter (#32236)
cloudchamb3r [Thu, 10 Oct 2024 17:12:27 +0000 (02:12 +0900)]
Fix checkbox bug on private/archive filter (#32236)

fix #32235

---------

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

6 weeks 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 weeks 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)

6 weeks 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

6 weeks 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

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

6 weeks 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)

6 weeks 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

6 weeks 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*

6 weeks 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)

6 weeks 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

6 weeks 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

6 weeks 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>
6 weeks 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

6 weeks 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

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

6 weeks 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

6 weeks 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

6 weeks 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>
7 weeks 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

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

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

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

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

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

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

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

7 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

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

8 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

8 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

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

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

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

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

8 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

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

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

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

8 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

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

8 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">

8 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

8 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

8 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

8 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

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

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

8 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~

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

2 months 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

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

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

2 months 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

2 months 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

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

2 months 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")

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

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

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

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