Commit Graph

19547 Commits

Author SHA1 Message Date
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
Lunny Xiao
4e471487fb
Remove unnecessary duplicate code (#34552)
`GetIssuesLastCommitStatus` will revoke `GetIssuesAllCommitStatus` but
it has been invoked. The `CommitStatus` template variable has never been
used in notification subscription page so that it could be removed.
2025-06-03 16:27:29 +00:00
silverwind
375dab1111
Make pull request and issue history more compact (#34588)
Reduced spacing around history entries and inside the commits list, also fixed unequal horizontal spacing inside the commit badge.
2025-06-03 16:00:39 +00:00
wxiaoguang
2a1585b32e
Refactor some tests (#34580)
1. use `test.MockVariableValue` as much as possible
2. avoid `time.Sleep` as much as possible
2025-06-03 01:26:19 +00:00
Philip Peterson
c5e78fc7ad
Do not mutate incoming options to SearchRepositoryByName (#34553)
Similar to #34544, this PR changes the `opts` argument in
`SearchRepositoryByName()` to be passed by value instead of by pointer,
as its mutations do not escape the function scope and are not used
elsewhere. This simplifies reasoning about the function and avoids
unnecessary pointer usage.

This insight emerged during an initial attempt to refactor
`RenderUserSearch()`, which currently intermixes multiple concerns.

---------

Co-authored-by: Philip Peterson <philip-peterson@users.noreply.github.com>
2025-06-02 17:33:25 +00:00
Râu Cao
f48c0135a6
Fix/improve avatar sync from LDAP (#34573)
This fixes 3 issues I encountered when debugging problems with our LDAP sync:

1. The comparison of the hashed image data in `IsUploadAvatarChanged` is
wrong. It seems to be from before avatar hashing was changed and unified
in #22289. This results in the function always returning `true` for any
avatars, even if they weren't changed.
2. Even if there's no avatar to upload (i.e. no avatar available for the
LDAP entry), the upload function would still be called for every single
user, only to then fail, because the data isn't valid. This is
unnecessary.
3. Another small issue is that the comparison function (and thus hashing
of data) is called for every user, even if there is no avatar attribute
configured at all for the LDAP source. Thus, I switched the condition
nesting, so that no cycles are wasted when avatar sync isn't configured
in the first place.

I also added a trace log for when there is actually a new avatar being
uploaded for an existing user, which is now only shown when that is
actually the case.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-06-02 10:05:47 -07:00
wxiaoguang
e8d8984f7c
Fix some trivial problems (#34579) 2025-06-02 15:22:43 +00:00
badhezi
d5bbaee64e
Retain issue sort type when a keyword search is introduced (#34559)
Fixes #34523
2025-06-02 08:14:16 +00:00
Jim Lin
82ea2387e4
Always use an empty line to separate the commit message and trailer (#34512)
If the message from form.MergeMessageField is empty, we will miss a "\n"
between the title and the "Co-authored-by:" line. The title and message
should have a blank line between of them.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-06-02 06:29:16 +00:00
Kerwin Bryant
74858dc5ae
Fix line-button issue after file selection in file tree (#34574)
Fix the issue where the line-button fails to work after selecting a file
from the file tree.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-06-02 09:52:12 +08:00
GiteaBot
bb6377d080 [skip ci] Updated translations via Crowdin 2025-05-31 00:35:32 +00:00
Lunny Xiao
7149c9c55d
Fix doctor deleting orphaned issues attachments (#34142)
Fix the bug when deleting orphaned issues attachments. The attachments
maybe stored on other storages service rather than disk.
2025-05-30 05:06:03 +00:00
GiteaBot
07d802a815 [skip ci] Updated translations via Crowdin 2025-05-30 00:36:36 +00:00
badhezi
0cec4b84e2
Fix actions skipped commit status indicator (#34507)
Addresses https://github.com/go-gitea/gitea/issues/34500

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-05-28 11:36:21 -04:00
wxiaoguang
c6e2093f42
Clean up "file-view" related styles (#34558)
Move "file-view" and "code-view" related styles to their own file,
remove unnecessary `!important`
2025-05-28 21:43:59 +08:00