0
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-10-17 00:54:32 -04:00
Commit Graph

19906 Commits

Author SHA1 Message Date
Giteabot
5ae9bb4df9 Fix a bug missed return (#35655) (#35667)
Backport #35655 by @lunny

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2025-10-15 07:40:31 +02:00
Giteabot
ae2e8c1f00 Always create Actions logs stepsContainer (#35654) (#35672)
Backport #35654 by wxiaoguang

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-10-15 04:16:06 +00:00
techknowlogick
602af1499e bump archives&rar dep (#35637) (#35638) 2025-10-12 05:48:39 +02:00
Giteabot
f4512426a1 Fix code tag style problem and LFS view bug (#35628) (#35636)
Backport #35628 by lutinglt

Signed-off-by: 鲁汀 <131967983+lutinglt@users.noreply.github.com>
Co-authored-by: 鲁汀 <131967983+lutinglt@users.noreply.github.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-10-11 20:25:03 +00:00
Giteabot
a3458c669a The status icon of the Action step is consistent with GitHub (#35618) (#35621)
Backport #35618 by @lutinglt

#35616
Before:
running:
<img width="45" height="34" alt="image"
src="https://github.com/user-attachments/assets/e2508f98-2f1f-4b7e-a80c-30b406f42531"
/>
waiting:
<img width="44" height="33" alt="image"
src="https://github.com/user-attachments/assets/e7c8164e-fdc3-4546-b088-31166544edb0"
/>

---
After:
running:
<img width="49" height="43" alt="image"
src="https://github.com/user-attachments/assets/b5a9b245-a995-458a-af23-d1723daa3692"
/>
waiting:
<img width="42" height="44" alt="image"
src="https://github.com/user-attachments/assets/ff72551e-cfb5-4665-af52-938ef0cf8f1c"
/>

`gitea-running.svg` is not an icon from the @ primer/octicon library,
extracted from the Github page. Github did not assign a clear class name
to this icon

Signed-off-by: 鲁汀 <131967983+lutinglt@users.noreply.github.com>
Co-authored-by: 鲁汀 <131967983+lutinglt@users.noreply.github.com>
Co-authored-by: lutinglt <lutinglt@users.noreply.github.com>
2025-10-10 12:12:21 -07:00
Giteabot
609d88f029 Fix inputing review comment will remove reviewer (#35591) (#35615)
Backport #35591 by @lunny

Fix #34617

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2025-10-10 08:28:44 +00:00
Giteabot
3c78598217 Mock external service in hcaptcha TestCaptcha (#35604) (#35614)
Backport #35604 by silverwind

The test calls out to a web service which may be down or unreachable as
seen in the linked issue. It's better for tests to not have such
external dependencies to make them absolutely stable.

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

Co-authored-by: silverwind <me@silverwind.io>
2025-10-10 04:49:20 +00:00
Giteabot
b7bb0fa538 Fix diffpatch API endpoint (#35610) (#35613)
Backport #35610 by @surya-purohit

Updates the swagger documentation for the `diffpatch` API endpoint.

The request body is corrected from the outdated `UpdateFileOptions` to
the current `ApplyDiffPatchOptions` to match the code implementation.

Closes [issue#35602](https://github.com/go-gitea/gitea/issues/35602)

---------

Co-authored-by: Surya Purohit <suryaprakash.sharma@sourcefuse.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2025-10-10 03:28:40 +00:00
Giteabot
6de2151607 Fixing issue #35530: Password Leak in Log Messages (#35584) (#35609)
Backport #35584 by @shashank-netapp

# Summary
The Gitea codebase was logging `Elasticsearch` and `Meilisearch`
connection strings directly to log files without sanitizing them. Since
connection strings often contain credentials in the format
`protocol://username:password@host:port`, this resulted in passwords
being exposed in plain text in log output.

Fix:
- wrapped all instances of setting.Indexer.RepoConnStr and
setting.Indexer.IssueConnStr with the `util.SanitizeCredentialURLs()`
function before logging them.

Fixes: #35530

Co-authored-by: shashank-netapp <108022276+shashank-netapp@users.noreply.github.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2025-10-09 11:00:40 +02:00
Giteabot
a99761d466 Use inputs context when parsing workflows (#35590) (#35595)
Backport #35590 by @Zettat123

Depends on [gitea/act#143](https://gitea.com/gitea/act/pulls/143)

The [`inputs`
context](https://docs.github.com/en/actions/reference/workflows-and-actions/contexts#inputs-context)
is used when parsing workflows so that `run-name` like `run-name: Deploy
to ${{ inputs.deploy_target }}` can be parsed correctly.

Co-authored-by: Zettat123 <zettat123@gmail.com>
2025-10-06 22:28:17 +00:00
Giteabot
8d1c04bda4 Fix creating pull request failure when the target branch name is the same as some tag (#35552) (#35582)
Backport #35552 by @lunny

Use full reference name in the git command to avoid ambiguity.

Fix #35470

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2025-10-06 06:10:52 +02:00
Giteabot
aa57531aac fix: auto-expand and auto-scroll for actions logs (#35583) (#35586)
Backport #35583 by ita004

Co-authored-by: Shafi Ahmed <98274448+ita004@users.noreply.github.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-10-05 12:06:41 +08:00
Giteabot
006fe2a907 Add rebase push display wrong comments bug (#35560) (#35580)
Backport #35560 by @lunny

Fix #35518

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-10-04 10:28:32 +02:00
Giteabot
d94faf6d7e fix(webhook): prevent tag events from bypassing branch filters targets (#35567) (#35577)
Backport #35567 by Exgene

Co-authored-by: Kausthubh J Rao <105716675+Exgene@users.noreply.github.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: silverwind <me@silverwind.io>
2025-10-03 17:49:16 +00:00
Giteabot
6c8879b832 Fix markup init after issue comment editing (#35536) (#35537)
Backport #35536 by wxiaoguang

Fix #35533

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-09-26 07:11:21 +08:00
Lunny Xiao
94a6da3bc8 Add changelog for 1.25.0-rc0 (#35531) v1.25.0-rc0 2025-09-25 09:32:30 -07:00
Sumit
f09bea7af1 [Fix] Trigger 'unlabeled' event when label is Deleted from PR (#34316)
This pull request updates the handling of issue label events in
workflows to distinguish between label additions and deletions,
introduces corresponding test cases, and extends the `IssuePayload`
structure to support this functionality.

### Enhancements to issue label event handling:
* Updated `matchIssuesEvent` in `modules/actions/workflows.go` to
differentiate between "labeled" and "unlabeled" events based on whether
labels were added or removed.
* Added a new field, `RemovedLabels`, to the `IssuePayload` struct in
`modules/structs/hook.go` to track labels that were removed during an
issue event.

### Testing improvements:
* Added `TestMatchIssuesEvent` in `modules/actions/workflows_test.go` to
cover scenarios such as label addition, label deletion, and label
clearing, ensuring the correct event type is triggered.

---------

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
v1.26.0-dev
2025-09-24 09:45:38 -07:00
GiteaBot
0b706b0825 [skip ci] Updated translations via Crowdin 2025-09-24 00:34:35 +00:00
Lunny Xiao
198f37e33c Move updateref and removeref to gitrepo and remove unnecessary open repository (#35511)
Extracted from #35077
`UpdateRef` and `RemoveRef` will call git commands even for gogit
version.
2025-09-19 08:04:18 -07:00
ChristopherHX
9a0ec53ee3 Stream repo zip/tar.gz/bundle achives by default (#35487)
Initial implementation of linked proposal.

* Closes #29942
* Fix #34003
* Fix #30443

---------

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-09-19 11:51:21 +08:00
silverwind
90cb5f9a1f Clean up npm dependencies (#35508)
- Remove `minimatch`, was inadvertently re-introduced in
https://github.com/go-gitea/gitea/pull/35482
- Remove `postcss-nesting`, originally introduced in
https://github.com/go-gitea/gitea/pull/29746 to support some fork, but
I'm now of the opinion we should not ship dependencies that we don't use
ourselves.
- Remove `eslint-plugin-no-jquery`, plugin is currently disabled because
of compat issues with eslint 9
(https://github.com/wikimedia/eslint-plugin-no-jquery/issues/311)
2025-09-17 21:39:44 +00:00
Bjarne Koll
2f3da6d6b3 Correctly override user unitmodes (#35501)
Commit 6a97ab0af4 reworked team permission
application. The introduced logic overrode the unitModes for *every*
team a user is in, max(...) the current value and the team value
together.

The logic completely fails in case the team does not have a unit for the
specific unit type defined, in which case the logic inserted the
minimumVisibility, overriding any previous aggregation of access modes
for the unit.

This is resolved by simply always merging the unit access mode of the
team as it will simply default to None in case the team does not have a
permission defined for the unit, which will be swallowed by the max(..)
call in favour of the previous aggregated permission.
2025-09-17 12:26:58 -07:00
GiteaBot
4730bb596c [skip ci] Updated translations via Crowdin 2025-09-17 00:33:50 +00:00
silverwind
6033c47f90 Enable more markdown paste features in textarea editor (#35494)
Enable the [same paste
features](https://github.com/github/paste-markdown#paste-markdown-objects)
that GitHub has, notably the ability to paste text containing HTML links
and have them automatically turn into Markdown links. As far as I can
tell, previous paste features all work as expected.

---------

Signed-off-by: silverwind <me@silverwind.io>
2025-09-16 23:55:57 +00:00
Lunny Xiao
9332ff291b Move git command to git/gitcmd (#35483)
The name cmd is already used in many places and may cause conflicts, so
I chose `gitcmd` instead to minimize potential naming conflicts.
2025-09-15 23:33:12 -07:00
Gnanakeethan Balasubramaniam
fe5afcb022 Exposing TimeEstimate field in the API (#35475)
Time Estimate field is not included in the issue modification webhooks
or issue API endpoints.

This PR fixes the field for the API.

---------

Signed-off-by: Gnanakeethan Balasubramaniam <gnanakeethan@users.noreply.github.com>
Signed-off-by: Gnanakeethan Balasubramaniam <gnanakeethan@cloudparallax.com>
2025-09-16 04:32:03 +00:00
silverwind
8c8eb4b6f9 Clean up npm dependencies (#35484)
- `type-fest` is replaced by our own types
- `@stylistic/eslint-plugin-js` is no longer in use, it was replaced
with `@stylistic/eslint-plugin`
- `@types/license-checker-webpack-plugin` does not apply to our forked
version and has a type stub
2025-09-15 16:34:54 +02:00
silverwind
69e595cdd8 Update eslint to v9 (#35485)
Update eslint and all plugins. Many plugins still do not ship type
definitions so I had to add stubs. Also, I had to put a few typescript
error expectations because if some unknown error in the types.

`eslint-plugin-no-jquery` is disabled because it's not compatible with
eslint 9 flat config
(https://github.com/wikimedia/eslint-plugin-no-jquery/issues/311).
2025-09-14 19:15:06 +03:00
silverwind
e612b9744c Revert the rspack change (#35482)
Partially revert https://github.com/go-gitea/gitea/pull/35460 until
rspack supports RISC-V
(https://github.com/web-infra-dev/rspack/issues/11656).
2025-09-14 08:37:07 +02:00
wxiaoguang
4fe1066a17 Replace gobwas/glob package (#35478)
https://github.com/gobwas/glob is unmaintained and has bugs.
2025-09-13 18:01:00 +00:00
luzpaz
688abac5ca Fix various typos in codebase (#35480) 2025-09-13 10:34:43 -04:00
wxiaoguang
325e059a50 Fix different behavior in status check pattern matching with double stars (#35474)
Drop the minimatch dependency, use our own glob compiler.

Fix #35473
2025-09-13 11:53:27 +08:00
silverwind
866c636f52 Replace webpack with rspack (#35460)
Given that this bundler is almost a drop-in replacement to webpack, it
might be worth switching. So far it seems everything is working, but
more testing is needed, so I'm setting draft.

- Dev build time is reduced from 10s to 5s
- Prod build time is reduced from 16s to 10s
- JS output size is reduced from 21.3MB to 19.8MB
- CSS output size is increased from 778kB to 818kB
2025-09-12 19:25:59 +00:00
h7x4
7a474d1c95 Don't store repo archives on gitea dump (#35467)
When running `gitea dump`, don't store the contents of
`data/repo-archive` in the output.

These archives can easily be regenerated from the repository data, and
does not need to be backed up.

Fixes #35450

---

<s>Added a `--skip-repo-archive` flag to the `gitea dump` command.

Enabling this flag will exclude the contents of `data/repo-archive` from
the dump. The implementation is similar to the other `--skip-*` flags
that excludes directories from `data`.</s>

Signed-off-by: h7x4 <h7x4@nani.wtf>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2025-09-12 16:11:24 +02:00
ChristopherHX
84812e42df Fix SSH signing key path will be displayed in the pull request UI (#35381)
Closes #35361

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-09-12 03:00:18 +00:00
GiteaBot
16e1207449 [skip ci] Updated translations via Crowdin 2025-09-12 00:33:19 +00:00
silverwind
9bb08aa822 Update image name in integration README (#35465)
Followup to https://github.com/go-gitea/gitea/pull/35402.
2025-09-11 17:56:43 +02:00
GiteaBot
f04b9aaa1c [skip ci] Updated translations via Crowdin 2025-09-11 00:34:46 +00:00
Lunny Xiao
89d7929711 Fix package link setting can only list limited repositories (#35394)
Fix #24801

<img width="1123" height="503" alt="image"
src="https://github.com/user-attachments/assets/823f4214-e08a-4506-9018-057c50e7fc52"
/>

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Giteabot <teabot@gitea.io>
2025-09-11 01:50:17 +02:00
silverwind
593a52c2f0 Vertically center date in file view latest commit (#35456) 2025-09-10 20:20:23 +00:00
silverwind
4d43d85941 Bump setup-node to v5 (#35448)
See https://github.com/actions/setup-node/releases/tag/v5.0.0

Caching is now enabled by default when `packageManager` is present in
package.json, and we have that. `cache-dependency-path` is unneccesary
because the action will automatically detect it.
2025-09-10 16:11:14 +00:00
Lunny Xiao
2653ac95e0 Extend comment treepath length (#35389)
Extend the maximum length of comment.treepath from 255 to 4000
characters.

All databases supported by Gitea allow VARCHAR fields of 4000, so
compatibility is ensured. Git itself does not impose a strict limit on
path length. On Windows, the `core.longpaths` setting has already been
enabled to handle long file paths.

Fix #33716

---------

Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Giteabot <teabot@gitea.io>
2025-09-10 13:31:59 +00:00
silverwind
b76e69fee7 Fix overflow in notifications list (#35446)
Before:

<img width="1339" height="159" alt="Screenshot 2025-09-10 at 02 29 09"
src="https://github.com/user-attachments/assets/097f0929-f387-428f-a53d-74cf88d0b013"
/>

After:

<img width="1335" height="114" alt="Screenshot 2025-09-10 at 02 29 17"
src="https://github.com/user-attachments/assets/2185c9aa-eca0-43da-b244-674e7b81aef8"
/>
2025-09-10 13:05:35 +00:00
Lunny Xiao
274f4aea7e Fix a compare page 404 bug when the pull request disabled (#35441) 2025-09-09 21:04:32 -07:00
Lunny Xiao
e35e724e42 Use db.WithTx/WithTx2 instead of TxContext when possible (#35428) 2025-09-10 03:15:01 +00:00
GiteaBot
fb247f640e [skip ci] Updated translations via Crowdin 2025-09-10 00:33:42 +00:00
silverwind
47df15cabc Update JS and PY dependencies (#35444)
Tested all affected dependencies.
2025-09-10 02:30:20 +02:00
koalajoe23
2802f96e97 check user and repo for redirects when using git via SSH transport (#35416)
fixes #30565 

When using git with a gitea hosted repository, the HTTP-Transport did
honor the user and repository redirects, which are created when renaming
a user or repo and also when transferring ownership of a repo to a
different organization. This is extremely helpful, as repo URLs remain
stable and do not have to be migrated on each client's worktree and
other places, e.g. CI at once.

The SSH transport - which I favor - did not know of these redirections
and I implemented a lookup during the `serv` command.
2025-09-09 20:13:41 +00:00
Lunny Xiao
b9efbe9fe6 Fix push commits comments when changing the pull request target branch (#35386)
When changing the pull request target branch, the pushed commits
comments will not be changed resulted the number are inconsistent
between commits tab number and the pushed commits comments number.

This PR will remove all the previous pushed commits comments and
calculate new comments when changing the target branch.

Before:

<img width="928" height="585" alt="image"
src="https://github.com/user-attachments/assets/35e4d31f-31a1-4d14-83b0-1786721ab0d9"
/>

After:
<img width="816" height="623" alt="image"
src="https://github.com/user-attachments/assets/24b6dafe-9238-4e7e-833d-68472457afab"
/>
2025-09-09 19:40:54 +00:00
Lunny Xiao
e4cb48a7e0 Fix bug when issue disabled, pull request number in the commit message cannot be redirected (#35420)
Fix #35419

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-09-09 12:14:06 -07:00