Commit Graph

19584 Commits

Author SHA1 Message Date
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
NorthRealm
4cb0c641ce
Add "View workflow file" to Actions list page (#34538)
This PR adds "View workflow file" to Actions list page, and replaces the
redundant link.

Related #34530

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-05-28 20:30:00 +08:00
Philip Peterson
b0936f4f41
Do not mutate incoming options to RenderUserSearch and SearchUsers (#34544)
This PR changes the `opts` argument in `SearchUsers()` 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-05-27 19:36:02 +00:00
Lunny Xiao
498088c053
Add webhook assigning test and fix possible bug (#34420)
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-05-27 18:53:27 +00:00
Lunny Xiao
24a51059d7
Fix possible nil description of pull request when migrating from CodeCommit (#34541)
Fix #34320
2025-05-27 11:25:34 -07:00
wxiaoguang
9f10885b21
Refactor commit reader (#34542) 2025-05-27 16:49:05 +00:00
Lunny Xiao
688da55f54
Split GetLatestCommitStatus as two functions (#34535)
Extract from #34531. This will reduce unnecessary count operation in
databases.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-05-26 19:00:22 +00:00
Lunny Xiao
ab9691291d
Don't display error log when .git-blame-ignore-revs doesn't exist (#34457)
Fix #34454
2025-05-26 17:09:14 +00:00
Markus Amshove
50d9565088
Add sort option recentclose for issues and pulls (#34525)
closes #34171 

Adds a new sort option `recentclose` for issues and pull requests which
will return items in a descending order of when they were closed
2025-05-26 16:37:38 +00:00
Bo-Yi Wu
11ee7ff3bf
fix: return 201 Created for CreateVariable API responses (#34517)
- Change CreateVariable API response status from 204 No Content to 201
Created
- Update related integration tests to expect 201 Created instead of 204
No Content

## ⚠️ BREAKING ⚠️

Change the response status code of the Create Variable API under both
Org and Repo levels to `201` instead of 204.

API SDK: https://gitea.com/gitea/go-sdk/pulls/713

---------

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
Signed-off-by: appleboy <appleboy.tw@gmail.com>
Co-authored-by: delvh <dev.lh@web.de>
2025-05-26 12:12:49 -04:00
NorthRealm
9b295e984a
Actions list (#34530)
Closes #34524

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-05-26 20:02:47 +08:00
GiteaBot
9d4ebc1f2c [skip ci] Updated translations via Crowdin 2025-05-26 00:37:55 +00:00
silverwind
8365365c9c
Run integration tests against postgres 14 (#34514)
postgres 12 is end of life since 6 months. 13 and above are still
supported but I think it's overall better if we test a more recent
version of postgres because that's what new users will be running on.

Ref: https://endoflife.date/postgresql
2025-05-23 04:40:21 +00:00
GiteaBot
4dd833ca9e [skip ci] Updated translations via Crowdin 2025-05-23 00:36:43 +00:00