Commit Graph

19561 Commits (main)

Author SHA1 Message Date
wxiaoguang 24ce2058e8
Clean bindata (#34728)
Follow #34692
2025-06-16 12:03:51 +00:00
wxiaoguang 6b8b580218
Refactor container and UI (#34736) 2025-06-16 16:27:01 +08:00
Kerwin Bryant bbee652e29
Prevent duplicate form submissions when creating forks (#34714)
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2025-06-16 04:19:16 +00:00
wxiaoguang 637070e07b
Fix container range bug (#34725)
Fix #34724
2025-06-15 21:55:11 +03:00
GiteaBot 0d3e9956cd [skip ci] Updated translations via Crowdin 2025-06-15 00:41:44 +00:00
GiteaBot 28debdbe00 [skip ci] Updated translations via Crowdin 2025-06-14 00:35:48 +00:00
silverwind dcc9206a59
Raise minimum Node.js version to 20, test on 24 (#34713)
- Node.js 18 is now EOL, so raise minimum version to current LTS v20
- Test on 24
- Change devcontainers to use LTS version (currently 22),
[ref](https://github.com/devcontainers/features/tree/main/src/node)
2025-06-13 13:40:39 -04:00
GiteaBot bc28654b49 [skip ci] Updated translations via Crowdin 2025-06-13 00:37:13 +00:00
Lunny Xiao d21ce9fa07
Improve the performance when detecting the file editable (#34653)
Noticed the SQL will be executed 4 times when visit the file render view
page. For a repository which have many pull requests, it maybe slow.
```SQL
2025/06/08 15:24:44 models/issues/pull_list.go:69:GetUnmergedPullRequestsByHeadInfo() [I] [SQL] SELECT * FROM `pull_request` INNER JOIN `issue` ON issue.id = pull_request.issue_id WHERE (head_repo_id = ? AND head_branch = ? AND has_merged = ? AND issue.is_closed = ? AND flow = ?) [393 main false false 0] - 2.004167ms
2025/06/08 15:24:44 models/issues/pull_list.go:69:GetUnmergedPullRequestsByHeadInfo() [I] [SQL] SELECT * FROM `pull_request` INNER JOIN `issue` ON issue.id = pull_request.issue_id WHERE (head_repo_id = ? AND head_branch = ? AND has_merged = ? AND issue.is_closed = ? AND flow = ?) [393 main false false 0] - 1.03975ms
2025/06/08 15:24:44 models/issues/pull_list.go:69:GetUnmergedPullRequestsByHeadInfo() [I] [SQL] SELECT * FROM `pull_request` INNER JOIN `issue` ON issue.id = pull_request.issue_id WHERE (head_repo_id = ? AND head_branch = ? AND has_merged = ? AND issue.is_closed = ? AND flow = ?) [393 main false false 0] - 881.583µs
2025/06/08 15:24:44 models/issues/pull_list.go:69:GetUnmergedPullRequestsByHeadInfo() [I] [SQL] SELECT * FROM `pull_request` INNER JOIN `issue` ON issue.id = pull_request.issue_id WHERE (head_repo_id = ? AND head_branch = ? AND has_merged = ? AND issue.is_closed = ? AND flow = ?) [393 main false false 0] - 935.084µs
```

This PR did a refactor to query it once only.
2025-06-12 18:12:45 +00:00
wxiaoguang 8fed27bf6a
Fix various problems (#34708)
* Fix #34707
* Fix dropdown filter handling
* Fix #27014
2025-06-12 09:19:24 -07:00
wxiaoguang 65986f423f
Refactor embedded assets and drop unnecessary dependencies (#34692)
Benefits:

1. smaller binary size (reduces more than 1MB)
2. better control of the assets details
3. fewer unmaintained dependencies
4. faster startup if the assets are not needed
5. won't hang up editors when open "bindata.go" by accident
2025-06-12 03:59:33 +00:00
silverwind 18bafcc378
Bump minimum go version to 1.24.4 (#34699)
Fixes 3 open govulncheck issues.
2025-06-12 03:33:36 +00:00
silverwind 8d135ef5cf
Update JS deps (#34701)
Result of `make update-js`. Fixes
https://github.com/go-gitea/gitea/security/dependabot/114.
2025-06-12 05:06:27 +02:00
wxiaoguang d5893ee260
Fix markdown wrap (#34697)
Fix #34696
2025-06-12 10:09:42 +08:00
GiteaBot 06ccb3a1d4 [skip ci] Updated translations via Crowdin 2025-06-12 00:36:44 +00:00
Lunny Xiao 94db956e31
frontport changelog (#34689) 2025-06-11 16:58:39 +00:00
ChristopherHX c9505a26b9
Improve instance wide ssh commit signing (#34341)
* Signed SSH commits can look in the UI like on GitHub, just like gpg keys today in Gitea
* SSH format can be added in gitea config
* SSH Signing worked before with DEFAULT_TRUST_MODEL=committer

`TRUSTED_SSH_KEYS` can be a list of additional ssh public key contents
to trust for every user of this instance

Closes #34329
Related #31392

---------

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-06-11 10:32:55 +00:00
Lunny Xiao fbc3796f9e
Fix pull requests API convert panic when head repository is deleted. (#34685)
Fix #34682
2025-06-10 20:19:52 -07:00
GiteaBot d5afdccde8 [skip ci] Updated translations via Crowdin 2025-06-11 00:37:02 +00:00
Lunny Xiao 17cfae82a5
Hide href attribute of a tag if there is no target_url (#34556)
Relate #34450
2025-06-10 19:32:20 +00:00
wxiaoguang 1610a63bfd
Fix commit message rendering and some UI problems (#34680)
* Fix #34679
* Fix #34676
* Fix #34674
* Fix #34526
2025-06-10 23:20:32 +08:00
TheFox0x7 e9f5105e95
Migrate to urfave v3 (#34510)
migrate cli to urfave v3

add more cli tests

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-06-10 12:35:12 +00:00
GiteaBot 2c341b6803 [skip ci] Updated translations via Crowdin 2025-06-10 00:37:13 +00:00
wxiaoguang 0082cb51fa
Fix last admin check when syncing users (#34649)
Fix #34358
2025-06-09 20:57:45 +00:00
wxiaoguang 92e7e98c56
Update x/crypto package and make builtin SSH use default parameters (#34667) 2025-06-09 19:51:02 +00:00
wxiaoguang 7b39c82587
Fix "oras" OCI client compatibility (#34666)
Fix #25846

1. the ImageConfig can be empty, fall back to default
2. the blob size can be empty, it still needs "Content-Length" header
2025-06-09 18:51:05 +00:00
endo0911engineer b408bf2f0b
Fix: skip paths check on tag push events in workflows (#34602)
## Summary
Fix skipping of `paths` condition in workflows triggered by tag push
events.

## Details
- Ensure workflows triggered by tag pushes bypass the `paths` filter
check.
- Prevent incorrect skipping of workflows due to `paths` conditions on
tag pushes.
- Added and updated unit tests to verify correct behavior.
2025-06-09 17:44:45 +00:00
charles c6b2cbd75d
Fix footnote jump behavior on the issue page. (#34621)
Close #34511 
Close #34590 

Add comment ID to the footnote item's id attribute to ensure uniqueness.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-06-09 17:18:11 +00:00
Lunny Xiao 9165ea8713
Only activity tab needs heatmap data loading (#34652) 2025-06-09 21:02:16 +08:00
wxiaoguang 7a59f5a825
Ignore "Close" error when uploading container blob (#34620) 2025-06-09 07:06:21 +00:00
Lunny Xiao 6d0b24064a
Keeping consistent between UI and API about combined commit status state and fix some bugs (#34562)
Extract from #34531 

## Move Commit status state to a standalone package

Move the state from `structs` to `commitstatus` package. It also
introduce `CommitStatusStates` so that the combine function could be
used from UI and API logic.

## Combined commit status Changed

This PR will follow Github's combined commit status. Before this PR,
every commit status could be a combined one.
According to
https://docs.github.com/en/rest/commits/statuses?apiVersion=2022-11-28#get-the-combined-status-for-a-specific-reference
> Additionally, a combined state is returned. The state is one of:
> failure if any of the contexts report as error or failure
> pending if there are no statuses or a context is pending
> success if the latest status for all contexts is success

This PR will follow that rule and remove the `NoBetterThan` logic. This
also fixes the inconsistent between UI and API. In the API convert
package, it has implemented this which is different from the UI. It also
fixed the missing `URL` and `CommitURL` in the API.

## `CalcCommitStatus` return nil if there is no commit statuses

The behavior of `CalcCommitStatus` is changed. If the parameter commit
statuses is empty, it will return nil. The reference places should check
the returned value themselves.
2025-06-09 04:05:33 +00:00
wxiaoguang f6041441ee
Refactor FindOrgOptions to use enum instead of bool, fix membership visibility (#34629) 2025-06-09 03:30:34 +00:00
GiteaBot 1fe652cd26 [skip ci] Updated translations via Crowdin 2025-06-09 00:39:30 +00:00
Lunny Xiao a9a705f4db
Fix missed merge commit sha and time when migrating from codecommit (#34645)
Fix #34627
2025-06-08 16:16:23 +00:00
GiteaBot 1e0758a9f1 [skip ci] Updated translations via Crowdin 2025-06-08 00:41:38 +00:00
wxiaoguang cc942e2a86
Fix GetUsersByEmails (#34643) 2025-06-07 18:30:36 +00:00
silverwind 7fa5a88831
Add `--color-logo` for text that should match logo color (#34639)
Add a new color that indicates the logo's primary color and use it in
the frontpage over previous green color. This will be useful for
customization.

<img width="1347" alt="Screenshot 2025-06-07 at 16 53 34"
src="https://github.com/user-attachments/assets/496aa81f-c910-4c28-bd12-f2473a68bbab"
/>
2025-06-07 18:02:28 +00:00
silverwind f6f6aedd4f
Update JS deps, regenerate SVGs (#34640)
Result of `make update-js svg`.
2025-06-07 17:59:36 +00:00
silverwind aa2b3b2b1f
Misc CSS fixes (#34638)
1. apply [`text-wrap:
balance`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-wrap#balance)
to various places making the text wrapping nicer, moving
`empty-placeholder` CSS to base because it's not repo-specific.

<img width="537" alt="Screenshot 2025-06-07 at 15 09 00"
src="https://github.com/user-attachments/assets/8b37d031-269d-4ab3-ba59-2ac469c431e4"
/>
<img width="514" alt="Screenshot 2025-06-07 at 15 11 16"
src="https://github.com/user-attachments/assets/27a63117-be1d-4797-80f7-9ed14cca41dc"
/>
<img width="346" alt="Screenshot 2025-06-07 at 15 22 26"
src="https://github.com/user-attachments/assets/2f371384-0330-4a00-bb79-bc3c50ba5c91"
/>

2. fix overflow-related bug on actions run list, before:

<img width="302" alt="Screenshot 2025-06-07 at 15 26 26"
src="https://github.com/user-attachments/assets/d6607eeb-288b-4e81-a770-45a421c9c68c"
/>

After:
<img width="299" alt="Screenshot 2025-06-07 at 15 26 59"
src="https://github.com/user-attachments/assets/b0ddb66f-d4fe-4711-8ed9-eca08ce608f3"
/>
2025-06-07 19:57:07 +02:00
Kemal Zebari 47d69b7749
Validate hex colors when creating/editing labels (#34623)
Resolves #34618.

---------

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-06-07 11:25:08 +03:00
TheFox0x7 b38f2d31fd
add codecommit to supported services in api docs (#34626) 2025-06-07 03:31:34 +00:00
TheFox0x7 74a0178c6a
add openssh-keygen to rootless image (#34625) 2025-06-06 20:45:15 -04:00
NorthRealm 3f7dbbdaf1
Small fix in Pull Requests page (#34612) 2025-06-06 02:10:42 +00:00
techknowlogick 5b22af4373
bump to alpine 3.22 (#34613) 2025-06-06 08:13:17 +08:00
6543 9e0e107d23
Fix notification count positioning for variable-width elements (#34597)
The notification count is currently positioned using top/left
coordinates from its container's top/left corner. This works fine for
fixed-size containers like the bell icon.

This PR changes the positioning to use bottom/left coordinates from the
container's top/right corner instead. This improvement is needed when
placing notification counts on text that can vary in size due to
different languages or fonts.

The bell and stopwatch should look the same after this change.

---
*Sponsored by Kithara Software GmbH*

Co-authored-by: Marcel Haß <m.hass@kithara.com>
2025-06-05 19:02:07 +00:00
silverwind e5781cec75
Fix margin issue in markup paragraph rendering (#34599)
The Fomantic-inherited `p:last-child` rule in base.css interferes with
this markdown rendering.
2025-06-05 05:07:14 +00:00
Lunny Xiao 108db0b04f
Fix possible pull request broken when leave the page immediately after clicking the update button (#34509)
If user leaves the page, the context will become cancelled, so that the
update process maybe terminal in an unexpected status. This PR haven't
resolve the problem totally. It uses a background context to not cancel
the update process even if the user leaved the pull request view page.

Fix #31779
2025-06-04 17:09:08 +00:00
Lunny Xiao 497b83b75d
Fix migration pull request title too long (#34577)
Fix #34294
2025-06-04 15:45:45 +00:00
badhezi 79cc369892
Fix issue label delete incorrect labels webhook payload (#34575)
Fixes https://github.com/go-gitea/gitea/issues/34560
explanation of the bug in the issue

setting `issue.isLabelsLoaded = false` before calling `deleteIssueLabel`
guarantee we will load the new state of the labels into the issue object
before sending it in the webhook.
2025-06-03 18:50:53 +00:00
metiftikci fe57ee3074
fixed incorrect page navigation with up and down arrow on last item of dashboard repos (#34570)
Previously, pressing the down arrow key on the last item of a list would
incorrectly load the latest page when not release key. This commit
corrects the logic to ensure that the next page is loaded as intended.
2025-06-03 17:55:09 +00:00