Commit Graph

4779 Commits (release/v1.23)

Author SHA1 Message Date
Lunny Xiao 200cb6140d
Fix commit status events (#33320) (#33493)
Fix #32873
Fix #33201
~Fix #33244~
~Fix #33302~

depends on ~#33396~
backport #33320
2 days ago
Lunny Xiao 23971a77a0
Add tests for webhook and fix some webhook bugs (#33396) (#33442)
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 #33396
Backport part of #33337
5 days ago
wxiaoguang a8eaf43f97
Fix user avatar (#33439) 1 week ago
Giteabot b6fd8741ee
Fix system admin cannot fork or get private fork with API (#33401) (#33417)
Backport #33401 by @lunny

Fix #33368

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2 weeks ago
Giteabot 2674d27fb8
Add pubdate for repository rss and add some tests (#33411) (#33416)
Backport #33411 by @lunny

Fix #33291

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2 weeks ago
Giteabot 4578288ea3
Use ProtonMail/go-crypto to replace keybase/go-crypto (#33402) (#33410)
Backport #33402 by wxiaoguang

Fix #33400

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2 weeks ago
silverwind 987d014468
Update go tool dependencies (#32916) (#33355)
Clean cherry-pick of https://github.com/go-gitea/gitea/pull/32916.
Update all go tool dependencies to latest version.
2 weeks ago
Giteabot 72837530bf
Fix issue count (#33338) (#33341)
Backport #33338 by wxiaoguang

Fix #33336

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2 weeks ago
wxiaoguang eef635523a
Make tracked time representation display as hours (#33315) (#33334)
Try to backport #33315, the only trivial conflict is in the helper
functions map in the helper.go

Fix #33333

Co-authored-by: Sysoev, Vladimir <i@vsysoev.ru>
3 weeks ago
Giteabot e72d001708
Fix Account linking page (#33325) (#33327)
Backport #33325 by CrimsonEdgeHope

Fix password form missing whilst linking account even with
`ENABLE_PASSWORD_SIGNIN_FORM = true`.

Remove redundant empty box in account linking sign up page when
`LinkAccountMode` is true.

Co-authored-by: CrimsonEdgeHope <92579614+CrimsonEdgeHope@users.noreply.github.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
3 weeks ago
wxiaoguang 8d9ea68f19
Fix push message behavior (#33215) (#33317)
Backport #33215

Manually resolved "reqctx" conflict

---------

Co-authored-by: Chai-Shi <changchaishi@gmail.com>
3 weeks ago
wxiaoguang bf664c2e85
Trivial fixes (#33304) (#33312)
Backport #33304

The only conflict is caused by `templates/shared/issueicon.tmpl`
3 weeks ago
wxiaoguang 80cc87b3d8
Fix tag route and empty repo (#33253) 3 weeks ago
Giteabot d70348836b
Fix sync fork for consistency (#33147) (#33192)
Backport #33147 by changchaishi

Fixes #33145

An integration test could be added.

---------

Co-authored-by: Chai-Shi <changchaishi@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
4 weeks ago
Giteabot b4f0eed969
Filter reviews of one pull request in memory instead of database to reduce slow response because of lacking database index (#33106) (#33128)
Backport #33106 by @lunny

This PR fixes a performance problem when reviewing a pull request in a
big instance which have many records in the `review` table.
Traditionally, we should add more indexes in that table. But since
dismissed reviews of 1 pull request will not be too many as expected in
a common repository. Filtering reviews in the memory should be more
quick .

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
1 month ago
Giteabot 63b3a33bf2
fix empty repo updated time (#33120) (#33124)
Backport #33120 by changchaishi

fixes #33119 


Co-authored-by: Chai-Shi <changchaishi@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
1 month ago
wxiaoguang 0fad40dd8c
Fix package error handling and npm meta and empty repo guide (#33112) 1 month ago
wxiaoguang e637008fe3
Fix empty git repo handling logic and fix mobile view (#33101) (#33102)
Backport #33101 and UI fix from main (including #33108)
1 month ago
wxiaoguang e10d222434
Fix bleve fuzziness search (#33078) (#33087) 1 month ago
wxiaoguang 7a35f90b29
Fix broken forms (#33082) 1 month ago
Giteabot bc83fb26ef
Use project's redirect url instead of composing url (#33058) (#33064)
Backport #33058 by lunny

Fix #32992

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
1 month ago
wxiaoguang 68736ec292
Refactor maven package registry (#33049) (#33057)
Backport #33049
1 month ago
Giteabot 610b2fb88d
Use gitrepo.GetTreePathLatestCommit to get file lastest commit instead from latest commit cache (#32987) (#33046) 1 month ago
Giteabot 0137bc4e5c
Support for email addresses containing uppercase characters when activating user account (#32998) (#33001)
Backport #32998 by Zettat123

Fix #32807

Co-authored-by: Zettat123 <zettat123@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
1 month ago
Giteabot eed0968c37
Support org labels when adding labels by label names (#32988) (#32996)
Backport #32988 by @Zettat123

Fix #32891

Co-authored-by: Zettat123 <zettat123@gmail.com>
1 month ago
Giteabot af5e5e8f00
Fix maven pom inheritance (#32943) (#32976)
Backport #32943 by wxiaoguang

Fix  #30568

At the moment, here only `GroupID` (no `Version`) is parsed & used

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
1 month ago
Giteabot 90bd08ceef
Use env GITEA_RUNNER_REGISTRATION_TOKEN as global runner token (#32946) (#32964)
Backport #32946 by wxiaoguang

Fix #23703

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>
2 months ago
wxiaoguang e98dd6ee5b
Backport 1.23 (#32868)
Co-authored-by: delvh <dev.lh@web.de>
2 months ago
Lunny Xiao 42090844ed
Fix bug on action list deleted branch (#32848)
Fix
https://github.com/go-gitea/gitea/issues/32761#issuecomment-2540946064

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2 months ago
TheFox0x7 33e8e82c4b
Enable tenv and testifylint rules (#32852)
Enables tenv and testifylint linters
closes: https://github.com/go-gitea/gitea/issues/32842
2 months ago
silverwind 1cfb718976
Update golangci-lint to v1.62.2, fix issues (#32845)
Update it and fix new issues related to `redefines-builtin-id`
2 months ago
Zettat123 7269130d28
Fix missing outputs for jobs with matrix (#32823)
Fix #32795

If a job uses a matrix, multiple `ActionRunJobs` may have the same
`JobID`. We need to merge the outputs of these jobs to make them
available to the jobs that need them.
2 months ago
wxiaoguang a66c16dc1b
Allow to fork repository into the same owner (#32819)
This feature is experimental, not fully tested, and may be changed in
the future.

It is only designed for users who really need it: set
`[repository].ALLOW_FORK_INTO_SAME_OWNER=true` in your app.ini

Doc: https://gitea.com/gitea/docs/pulls/122


![image](https://github.com/user-attachments/assets/38d08c23-9cfc-49d8-9321-ff81edf65395)
2 months ago
Lunny Xiao 6370d2fb93
Detect whether action view branch was deleted (#32764)
Fix #32761 

![图片](https://github.com/user-attachments/assets/a5a7eef8-0fea-4242-b199-1b0b73d9bbdb)
2 months ago
wxiaoguang 22bf2ca6ba
Make API "compare" accept commit IDs (#32801) 2 months ago
Kemal Zebari 01b1896bf5
Implement update branch API (#32433)
Resolves #22526.

Builds upon #23061.

---------

Co-authored-by: sillyguodong <33891828+sillyguodong@users.noreply.github.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2 months ago
yp05327 d43620e7bc
Add `is_archived` option for issue indexer (#32735)
Try to fix #32697

Reason:
`is_archived` is already defined in the query options, but it is not
implemented in the indexer.
2 months ago
Sebastian T. T. 874b8484aa
Add standard-compliant route to serve outdated R packages (#32783)
The R package repository currently does not have support for older
versions of packages which should be stored in a separate /Archive
router. This PR remedies that by adding a new path router.

I am a member of a group that loves using Gitea and this bug has been
annoying us for a long time. Hope it can be merged in time for Gitea
1.23.0.

Any feedback much appreciated.

Fixes #32782
2 months ago
Blender Defender 18061af490
Rearrange Clone Panel (#31142)
Rearrange the clone panel to use less horizontal space.
The following changes have been made to achieve this:
- Moved everything into the dropdown menu
- Moved the HTTPS/SSH Switch to a separate line
- Moved the "Clone in VS Code"-Button up and added a divider
- Named the dropdown button "Code", added appropriate icon

---------

Co-authored-by: techknowlogick <techknowlogick@gitea.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2 months ago
wxiaoguang e619384098
Add label/author/assignee filters to the user/org home issue list (#32779)
Replace #26661, fix #25979

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.
2 months ago
Lunny Xiao fbe6d9dc6b
Use batch database operations instead of one by one to optimze api pulls (#32680)
Resolve #31492

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`.
2 months ago
yp05327 2ac6f2b129
Fix internal server error when updating labels without write permission (#32776)
Fix #32775

if permission denined, `prepareForReplaceOrAdd` will return nothing, and
this case is not handled.
2 months ago
wxiaoguang 90d20be541
Refactor issue filter (labels, poster, assignee) (#32771)
Rewrite a lot of legacy strange code, remove duplicate code, remove
jquery, and make these filters reusable.

Let's forget the old code, new code affects: 

* issue list open/close switch
* issue list filter (label, author, assignee)
* milestone list open/close switch
* milestone issue list filter (label, author, assignee)
* project view (label, assignee)
2 months ago
wxiaoguang 1b069dc94a
Make RepoActionView.vue support `##[group]` (#32770) 2 months ago
wxiaoguang 23471e1333
Refactor issue list (#32755)
1. add backend support for filtering "poster" and "assignee"
    * due to the limits, there is no frontend support at the moment
2. rewrite TS code without jquery, now there are 14 jQuery files left:
2 months ago
Lunny Xiao 9d08d3fbf5
Fix compare page bug view as anonymous (#32754)
Fix a bug introduced from
https://github.com/go-gitea/gitea/pull/32403/files#diff-dc86301f15109eee38296d469630672193e0587ad1485fdd8f503bf4c789cf7eR692
2 months ago
Lunny Xiao cd7bf77b2f
Split issue/pull view router function as multiple smaller functions (#32749)
This PR splits issue/pull view function into multiple smaller functions.
It also removed duplicated branches load.
2 months ago
metiftikci ad994780af
fix: render job title as commit message (#32748)
resolves #32724

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2 months ago
metiftikci 6bd70d4d87
fix(project): add title to project view page (#32747)
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2 months ago
wxiaoguang 513da407f4
Support "merge upstream branch" (Sync fork) (#32741)
Add basic "sync fork" support (GitHub-like)

<details>

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

</details>
2 months ago