Commit Graph

1488 Commits

Author SHA1 Message Date
Giteabot 5e9cc919cf
Performance optimization for pull request files loading comments attachments () ()
Backport  by @lunny

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2025-02-14 00:06:46 -08:00
Giteabot cc6ec56738
Only show the latest version in the Arch index () ()
Backport  by ExplodingDragon

Only show the latest version of the package in the arch repo.

closes 

Co-authored-by: Exploding Dragon <explodingfkl@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-02-13 20:02:28 +08:00
Giteabot 76bd60fc1d
Fix various problems (artifact order, api empty slice, assignee check, fuzzy prompt, mirror proxy, adopt git) () ()
Backport  by @wxiaoguang

* Make artifact list output has stable order
* Fix 
* Fix 
* Fix 
* Fix 
* Fix 

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-02-13 07:33:11 +08:00
wxiaoguang 744f7c8200
Skip deletion error for action artifacts () ()
Fix 
2025-02-13 03:27:37 +08:00
Lunny Xiao da33b708af
Add a transaction to `pickTask` () ()
Backport  

In the old `pickTask`, when getting secrets or variables failed, the
task could get stuck in the `running` status (task status is `running`
but the runner did not fetch the task). To fix this issue, these steps
should be in one transaction.

---------

Co-authored-by: Zettat123 <zettat123@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-02-12 11:53:56 +08:00
wxiaoguang 8fa3925874
Fix context usage () ()
Backport 
2025-02-11 19:46:27 +08:00
Lunny Xiao 7c17d0a73e
Enhance routers for the Actions variable operations () ()
Backport 

Co-authored-by: Jason Song <i@wolfogre.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Giteabot <teabot@gitea.io>
2025-02-11 03:52:09 +00:00
Giteabot a014d071e4
Rework suggestion backend () ()
Backport  by @lunny

Fix  

The suggestion backend logic now is

- If the keyword is empty, returned the latest 5 issues/prs with index
desc order
- If the keyword is digital, find all issues/prs which `index` has a
prefix with that, with index asc order
- If the keyword is non-digital or if the queried records less than 5,
searching issues/prs title with a `like`, with index desc order

## Empty keyword
<img width="310" alt="image"
src="https://github.com/user-attachments/assets/1912c634-0d98-4eeb-8542-d54240901f77"
/>

## Digital
<img width="479" alt="image"
src="https://github.com/user-attachments/assets/0356a936-7110-4a24-b21e-7400201bf9b8"
/>

## Digital and title contains the digital
<img width="363" alt="image"
src="https://github.com/user-attachments/assets/6e12f908-28fe-48de-8ccc-09cbeab024d4"
/>

## non-Digital
<img width="435" alt="image"
src="https://github.com/user-attachments/assets/2722bb53-baa2-4d67-a224-522a65f73856"
/>
<img width="477" alt="image"
src="https://github.com/user-attachments/assets/06708dd9-80d1-4a88-b32b-d29072dd1ba6"
/>

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-02-11 01:22:39 +08:00
Giteabot 2df7d0835a
Fix unnecessary comment when moving issue on the same project column () ()
Backport  by @lunny

Fix 

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2025-02-05 04:41:48 +00:00
Lunny Xiao 200cb6140d
Fix commit status events () ()
Fix 
Fix 
~Fix #33244~
~Fix #33302~

depends on ~#33396~
backport 
2025-02-05 11:35:47 +08:00
Lunny Xiao 23971a77a0
Add tests for webhook and fix some webhook bugs () ()
This PR created a mock webhook server in the tests and added integration
tests for generic webhooks.
It also fixes bugs in package webhooks and pull request comment
webhooks.

This also corrected an error on the package webhook. The previous
implementation uses a `User` struct as an organization, now it has been
corrected but it will not be consistent with the previous
implementation, some fields which not belong to the organization have
been removed.

Backport 
Backport part of 
2025-02-02 14:44:50 +08:00
Giteabot 7df1204795
Fix SSH LFS memory usage () ()
Backport  by wxiaoguang

Fix 

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-01-31 11:30:16 +00:00
wxiaoguang a8eaf43f97
Fix user avatar () 2025-01-30 17:11:13 +08:00
Giteabot b6fd8741ee
Fix system admin cannot fork or get private fork with API () ()
Backport  by @lunny

Fix 

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2025-01-27 18:43:16 +00:00
Giteabot 4578288ea3
Use ProtonMail/go-crypto to replace keybase/go-crypto () ()
Backport  by wxiaoguang

Fix 

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-01-27 02:50:00 +00:00
wxiaoguang eef635523a
Make tracked time representation display as hours () ()
Try to backport , the only trivial conflict is in the helper
functions map in the helper.go

Fix 

Co-authored-by: Sysoev, Vladimir <i@vsysoev.ru>
2025-01-21 06:49:58 +08:00
wxiaoguang 8f45a11919
Improve sync fork behavior () ()
Backport 
Fix 

The only conflict is `reqctx` in
`services/repository/merge_upstream.go`, which could keep using
`context.Context` in 1.23
2025-01-20 07:50:38 +00:00
wxiaoguang 8d9ea68f19
Fix push message behavior () ()
Backport 

Manually resolved "reqctx" conflict

---------

Co-authored-by: Chai-Shi <changchaishi@gmail.com>
2025-01-19 10:48:28 +08:00
Giteabot 2c47b06869
Fix mirror bug () ()
Backport  by lunny

Fix 

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-01-12 11:11:02 +00:00
Giteabot d70348836b
Fix sync fork for consistency () ()
Backport  by changchaishi

Fixes 

An integration test could be added.

---------

Co-authored-by: Chai-Shi <changchaishi@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-01-10 15:11:45 +08:00
Giteabot 45d21a0d5c
Fix raw file API ref handling () ()
Backport  by wxiaoguang

Fix  and add more tests

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-01-10 02:41:28 +00:00
wxiaoguang 531f36ea4a
Fix `git remote` error check, fix dependencies, fix js error () ()
And update some dependencies to fix bugs.

Backport  , 

Fix 
Fix 
Fix 

---------

Co-authored-by: yp05327 <576951401@qq.com>
2025-01-08 05:08:44 +00:00
Lunny Xiao 9899989ece
Add missing transaction when set merge ()
backport from  

`SetMerged` should be in a database transaction otherwise it's possible
to have dirty data.
2025-01-06 18:21:14 +00:00
wxiaoguang e637008fe3
Fix empty git repo handling logic and fix mobile view () ()
Backport  and UI fix from main (including )
2025-01-05 23:18:02 +08:00
wxiaoguang 81768675d4
Inherit submodules from template repository content () ()
Backport  (it more likely a bug fix)

Co-authored-by: Steffen Schröter <steffen@vexar.de>
2025-01-02 12:17:05 +08:00
Giteabot 39cc72562b
feat(action): issue change title notifications () ()
Backport  by appleboy

action file as below:

```yaml
name: Semantic Pull Request

on:
  pull_request_target:
    types: [edited]
```

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-12-31 12:33:08 +00:00
Giteabot 96fff862dc
Fix duplicate co-author in squashed merge commit messages () () 2024-12-31 03:04:47 +00:00
Giteabot d2d763318c
Remove aws go sdk package dependency () ()
Backport  by lunny

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2024-12-30 06:55:06 +00:00
Giteabot f35ab5cd52
Fix Agit pull request permission check () ()
Backport  by @a1012112796

user with read permission should also can create agit flow pull request.
looks this logic was broken in
https://github.com/go-gitea/gitea/pull/31033 this pull request try fix
it and add test code.

Signed-off-by: a1012112796 <1012112796@qq.com>
Co-authored-by: a1012112796 <1012112796@qq.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-12-28 11:34:28 +08:00
Giteabot 0137bc4e5c
Support for email addresses containing uppercase characters when activating user account () ()
Backport  by Zettat123

Fix 

Co-authored-by: Zettat123 <zettat123@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-12-27 11:41:41 +00:00
Giteabot ad1b76540e
demilestone should not include milestone () ()
Backport  by @lunny

Fix 

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2024-12-25 08:03:18 +00:00
Giteabot 90bd08ceef
Use env GITEA_RUNNER_REGISTRATION_TOKEN as global runner token () ()
Backport  by wxiaoguang

Fix 

When Gitea starts, it reads GITEA_RUNNER_REGISTRATION_TOKEN
or GITEA_RUNNER_REGISTRATION_TOKEN_FILE to add registration token.

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-12-24 00:37:11 +08:00
Giteabot e1026feddc
Fix repo avatar conflict () ()
Backport  by wxiaoguang

Continue even if the avatar deleting fails

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-12-23 03:17:38 +00:00
Giteabot a4291fd553
Add more load functions to make sure the reference object loaded () ()
Backport  by @lunny

Fix 

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2024-12-19 10:14:04 +01:00
Giteabot cb42232080
Fix Arch package metadata introduced incorrect field () ()
Backport  by ExplodingDragon

Incorrect content was introduced while generating the index, which has
now been removed, and the missing fields have been added.

Co-authored-by: Exploding Dragon <explodingfkl@gmail.com>
2024-12-18 12:56:47 +01:00
wxiaoguang e98dd6ee5b
Backport 1.23 ()
Co-authored-by: delvh <dev.lh@web.de>
2024-12-17 11:58:27 +08:00
wxiaoguang b01b0b99a5
Refactor some LDAP code () 2024-12-15 11:59:18 +00:00
TheFox0x7 33e8e82c4b
Enable tenv and testifylint rules ()
Enables tenv and testifylint linters
closes: https://github.com/go-gitea/gitea/issues/32842
2024-12-15 10:41:29 +00:00
Lunny Xiao 887928e0a6
Add missing two sync feed for refs/pull ()
Fowllow 
2024-12-13 04:22:39 +00:00
Lunny Xiao 6370d2fb93
Detect whether action view branch was deleted ()
Fix  

![图片](https://github.com/user-attachments/assets/a5a7eef8-0fea-4242-b199-1b0b73d9bbdb)
2024-12-12 19:28:23 +00:00
wxiaoguang 22bf2ca6ba
Make API "compare" accept commit IDs () 2024-12-12 08:10:09 +00:00
wxiaoguang e619384098
Add label/author/assignee filters to the user/org home issue list ()
Replace , fix 

Not perfect, but usable and much better than before. Since it is quite
complex, I am not quite sure whether there would be any regression, if
any, I will fix in first time.

I have tested the related pages many times: issue list, milestone issue
list, project view, user issue list, org issue list.
2024-12-11 06:33:24 +00:00
Lunny Xiao fbe6d9dc6b
Use batch database operations instead of one by one to optimze api pulls ()
Resolve 

The response time for the Pull Requests API has improved significantly,
dropping from over `2000ms` to about `350ms` on my local machine. It's
about `6` times faster.

A key area for further optimization lies in batch-fetching data for
`apiPullRequest.ChangedFiles, apiPullRequest.Additions, and
apiPullRequest.Deletions`.

Tests `TestAPIViewPulls` does exist and new tests added.

- This PR also fixes some bugs in `GetDiff` functions.
- This PR also fixes data inconsistent in test data. For a pull request,
the head branch's reference should be equal to the reference in
`pull/xxx/head`.
2024-12-11 05:15:06 +08:00
wxiaoguang 513da407f4
Support "merge upstream branch" (Sync fork) ()
Add basic "sync fork" support (GitHub-like)

<details>

![image](https://github.com/user-attachments/assets/e71473f4-4518-48c7-b9e2-fedfcd564fc3)

</details>
2024-12-06 21:10:35 +00:00
yp05327 faf5705d29
GitHub like repo home page ()
Move some components (description, license, release, language stats) to sidebar

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-12-06 14:29:04 +00:00
Illya Marchenko 936665bf85
Issue time estimate, meaningful time tracking ()
Redesign the time tracker side bar, and add "time estimate" support (in "1d 2m" format)

Closes 

---------

Co-authored-by: stuzer05 <stuzer05@gmail.com>
Co-authored-by: Yarden Shoham <hrsi88@gmail.com>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-12-05 13:07:53 +00:00
KN4CK3R 0c3c041c88
Add Arch package registry ()
Close 
Close 

This PR adds a Arch package registry usable with pacman.

![grafik](https://github.com/user-attachments/assets/81cdb0c2-02f9-4733-bee2-e48af6b45224)

Rewrite of  and . You can follow [this
tutorial](https://wiki.archlinux.org/title/Creating_packages) to build a
package for testing.

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

Co-authored-by: [d1nch8g@ion.lc](mailto:d1nch8g@ion.lc)
Co-authored-by: @ExplodingDragon

---------

Co-authored-by: dancheg97 <dancheg97@fmnx.su>
Co-authored-by: dragon <ExplodingFKL@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-12-04 23:09:07 +00:00
Lunny Xiao 5ab7aa700f
Use new mail package instead of an unmintained one ()
Resolve 
2024-12-05 06:33:43 +08:00
Lunny Xiao 17053e953f
Fix delete branch perm checking () 2024-12-04 11:59:48 +08:00
Lunny Xiao 79d593a9be
Split mail sender sub package from mailer service package ()
Move all mail sender related codes into a sub package of
services/mailer. Just move, no code change.
Then we just have dependencies on go-mail package in the new sub
package. We can use other package to replace it because it's
unmaintainable. ref 
2024-11-30 01:15:41 +00:00