Commit Graph

20305 Commits

Author SHA1 Message Date
Nicolas
afcd11c77f BUG: Fix workflow run jobs API returning null steps (#36603)
## Problem

`GET /api/v1/repos/{owner}/{repo}/actions/runs/{runId}/jobs` was always
returning `steps: null` for each job.

## Cause

In `convert.ToActionWorkflowJob`, when the job had a `TaskID` we loaded
the task with `db.GetByID` but never loaded `task.Steps`.
`ActionTask.Steps` is not stored in the task row (`xorm:"-"`); it comes
from `action_task_step` and is only filled by `task.LoadAttributes()` /
`GetTaskStepsByTaskID()`. So the conversion loop over `task.Steps`
always saw nil and produced no steps in the API response.

## Solution

After resolving the task (by ID when the caller passes `nil`), we now
load its steps with `GetTaskStepsByTaskID(ctx, task.ID)` and set
`task.Steps` before building the API steps slice. No other behavior is
changed.

## Testing

- New integration test `TestAPIListWorkflowRunJobsReturnsSteps`: calls
the runs/{runId}/jobs endpoint, inserts a task step for a fixture job,
and asserts that the response includes non-null, non-empty `steps` with
the expected step data.
- `make test-sqlite#TestAPIListWorkflowRunJobsReturnsSteps` passes with
this fix.

---------

Co-authored-by: Manav <mdave0905@gmail.com>
2026-02-13 08:16:43 +00:00
wxiaoguang
0d8bd7720d Refactor highlight and diff (#36599)
1. fix a performance regression when using line-by-line highlighting
* the root cause is that chroma's `lexers.Get` is slow and a lexer cache
is missing during recent changes
2. clarify the chroma lexer detection behavior
* now we fully manage our logic to detect lexer, and handle overriding
problems, everything is fully under control
3. clarify "code analyze" behavior, now only 2 usages:
* only use file name and language to detect lexer (very fast), mainly
for "diff" page which contains a lot of files
* if no lexer is detected by file name and language, use code content to
detect again (slow), mainly for "view file" or "blame" page, which can
get best result
4. fix git diff bug, it caused "broken pipe" error for large diff files
2026-02-13 00:15:46 +00:00
Lunny Xiao
d69b786097 Fix bug when do LFS GC (#36500)
Fix #36448

Removed unnecessary parameters from the LFS GC process and switched to
an ORDER BY id ASC strategy with a last-ID cursor to avoid missing or
duplicating meta object IDs.

---------

Signed-off-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-12 15:27:19 -08:00
josetduarte
f76f5207a7 feature to be able to filter project boards by milestones (#36321)
This pull request adds milestone filtering support to both repository
and organization project boards. Users can now filter project issues by
milestone, similar to how they filter by label or assignee. The
implementation includes backend changes to fetch and filter milestones,
as well as frontend updates to display a milestone filter dropdown in
the project board UI.

**Milestone filtering support:**

* Added support for filtering project board issues by milestone in both
repository and organization contexts, including handling for "no
milestone" and "all milestones" options. (`routers/web/repo/projects.go`
[[1]](diffhunk://#diff-5cba331a1ddf1eea017178cfefaaff9ad72a4b05797fb84bf508b0939aae2972R316-R330)
[[2]](diffhunk://#diff-5cba331a1ddf1eea017178cfefaaff9ad72a4b05797fb84bf508b0939aae2972R421-R441);
`routers/web/org/projects.go`
[[3]](diffhunk://#diff-f4279417070a8e33829c338abeb42877500377f490abb1495ae6357d50b6a765R344-R357)
[[4]](diffhunk://#diff-f4279417070a8e33829c338abeb42877500377f490abb1495ae6357d50b6a765R433-R485)
* Updated the project board template to include a milestone filter
dropdown, displaying open and closed milestones and integrating with the
query string for filtering. (`templates/projects/view.tmpl`
[[1]](diffhunk://#diff-e2c7e14d247ce381c352263a8fa639b8341690ff85f6dbebfa166ee3306542feL8-R8)
[[2]](diffhunk://#diff-e2c7e14d247ce381c352263a8fa639b8341690ff85f6dbebfa166ee3306542feR19-R58)

Solves Issue #35224

---------

Signed-off-by: josetduarte <6619440+josetduarte@users.noreply.github.com>
Co-authored-by: joseduarte <joseduarte@aidhound.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-12 22:09:32 +00:00
silverwind
4b36f01bf4 Update emoji data for Unicode 16 (#36596)
Use emoji data from https://github.com/github/gemoji/pull/303 because
`github/gemoji` is unmaintained.

`assets/emoji.json` is now pretty-printed so that future diffs will
actually be readable. This causes no isses as the only place where it is
used is in frontend which imports it via `with {type: 'json'}` where
whitespace is irrelevant.

<img width="205" height="75" alt="image"
src="https://github.com/user-attachments/assets/96e335b8-acf6-4996-ace4-824c0870a7d3"
/>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 21:39:36 +00:00
silverwind
d582c9c8c0 Adapt monaco error matching pattern to recent webpack config change (#36533)
Signed-off-by: silverwind <me@silverwind.io>
2026-02-12 20:59:13 +00:00
Lunny Xiao
8d26ea9373 Fix a bug user could change another user's primary email (#36586) 2026-02-12 21:34:38 +01:00
Tyrone Yeh
514f322dcf fix(repo-editor): disable Monaco editContext to avoid bugs with lost focus (#36585)
Currently, pressing the space key in the Monaco editor scrolls the page
instead of inserting a space
if the editor is focused. This PR stops the space key event from
propagating to parent elements,
which prevents unwanted page scrolling while still allowing Monaco to
handle space input normally.

Changes:
 - disable Monaco editContext

No changes to default editor behavior are needed; Monaco automatically
inserts the space character.

---------

Signed-off-by: silverwind <me@silverwind.io>
Co-authored-by: silverwind <me@silverwind.io>
2026-02-12 18:39:24 +00:00
wxiaoguang
2876800cb2 Fine tune diff highlighting (#36592) 2026-02-12 07:01:36 +00:00
silverwind
47b387921a Add code editor setting dropdowns (#36534)
Adds three `<select>` controls on top right for indent style, indent
size, and line wrap to the code editor (`_edit`), diff patch editor
(`_diffpatch`) and git hook editor (`/settings/hooks/git/pre-receive`).

The git hooks editor is restyled to wrap the content in a box. Also
included is a bugfix for the git hooks editor where monaco was not
initialized correctly.

---------

Signed-off-by: silverwind <me@silverwind.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-02-12 03:55:46 +08:00
silverwind
45ee571693 Update to go 1.26.0 and golangci-lint 2.9.0 (#36588) 2026-02-11 18:37:13 +01:00
wxiaoguang
3754e9dd12 Improve diff highlighting (#36583) 2026-02-11 03:52:17 +00:00
wxiaoguang
fd89ceef79 Fix markup code block layout (#36578) 2026-02-11 03:22:33 +00:00
silverwind
018a88590c Remove striped tables in UI (#36509)
We've been cutting down on the "striped" tables (where rows are using
alternate row background colors). This completely removes them as I
think such a design looks outdated.

The removal of selectors starting with `.ui[class*="very
basic"].table:not(.striped)` is needed because of a specificity issue in
the CSS where table cells would otherwise render with incorrect padding.

Example of one affected table:

<img width="1027" height="224" alt="image"
src="https://github.com/user-attachments/assets/2f3006ca-99a1-4655-afdb-b7cd9e5f19c7"
/>
2026-02-11 01:58:56 +00:00
silverwind
c17280149f Fix vertical alignment of .commit-sign-badge children (#36570)
Before: Avatar and lock icon was slightly misaligned vertically and span
was `20px` high:

<img width="271" height="69" alt="Screenshot 2026-02-09 at 14 38 45"
src="https://github.com/user-attachments/assets/e7e7ff6b-3087-4baa-95b5-18dc54c595d7"
/>

After: Fixed alignment and span is `16px`, same as avatar:

<img width="270" height="65" alt="Screenshot 2026-02-09 at 14 39 30"
src="https://github.com/user-attachments/assets/fe31a23e-c6d8-49d3-92a3-237628da1269"
/>
2026-02-11 01:01:26 +00:00
Lunny Xiao
18ccee0f2f Fix mirror sync parser and fix mirror messages (#36504)
Fix #36474 

It also fixed a bug when sync deleted branches.
2026-02-11 00:16:05 +00:00
silverwind
2d70d37bff Update JS and PY deps (#36576)
eslint v10 is excluded from updates because the plugins are not compatible yet.
2026-02-10 15:39:17 +00:00
wxiaoguang
5e5703694d Add viewer controller for mermaid (zoom, drag) (#36557)
Fix #25803

Now the rendered mermaid chart can be dragged or zoomed.

---------

Signed-off-by: silverwind <me@silverwind.io>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 06:36:31 +00:00
silverwind
09a88fb17e Misc typescript tweaks (#36523)
Some minor refactors, disable one obsolete lint rule, fix another. The
tribute type issue is not fully fixed and I'm pretty sure it must be an
error in their types.
2026-02-10 05:09:56 +00:00
wxiaoguang
8cc8150922 Use full-file highlighting for diff sections (#36561)
* Fix #35252
* Fix #35999
* Improve diff rendering, don't add unnecessary "added"/"removed" tags for a full-line change
* Also fix a "space trimming" bug in #36539 and add tests
* Use chroma "SQL" lexer instead of "MySQL" to workaround a bug (35999)
2026-02-10 03:29:28 +00:00
Tyrone Yeh
269bc1b112 fix(diff): reprocess htmx content after loading more files (#36568)
The "Show more files" button replaces `#diff-incomplete` with newly
loaded diff file boxes.
The inserted HTML may contain htmx attributes, but they are not
processed after insertion.

### Solution
Wrap the incomplete diff placeholder with a temporary wrapper so we can
call `htmx.process()` on the newly inserted content.
After processing, unwrap the wrapper to keep the DOM structure
unchanged.

### Testing
- Open a large PR diff page where `Diff.IsIncomplete` is true
- Click "Show more files"
- Verify newly loaded file boxes behave correctly (htmx-related features
work as expected)

<img width="927" height="278" alt="image"
src="https://github.com/user-attachments/assets/54f2b4f2-c0e1-483c-9e26-79a2838e98ee"
/>

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-02-10 01:20:20 +00:00
GiteaBot
f73e45b4ba [skip ci] Updated translations via Crowdin 2026-02-10 00:55:46 +00:00
silverwind
cf7e49ecdd Add wrap to runner label list (#36565) 2026-02-09 22:39:06 +00:00
yshyuk
94437eadd9 fix: add dnf5 command for Fedora in RPM package instructions (#36527)
Add support for Fedora 41+ which uses dnf5 with different command syntax
for adding repositories.

- **dnf4 (RHEL/Rocky):** `dnf config-manager --add-repo <URL>`
- **dnf5 (Fedora 41+):** `dnf config-manager addrepo
--from-repofile=<URL>`

Closes #35330
2026-02-09 16:14:02 +00:00
Sebastian Ertz
36ced5dc8c Enable pagination on GiteaDownloader.getIssueReactions() (#36549)
And update code.gitea.io/sdk/gitea to v0.23.2

---------

Co-authored-by: Giteabot <teabot@gitea.io>
2026-02-09 15:49:05 +01:00
ChristopherHX
34b34d2328 Refactor merge conan and container auth preserve actions taskID (#36560)
* Remove duplicated code
* Allow further ActionsUser package permission checks

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-02-09 03:04:56 +00:00
Tyrone Yeh
c401cda108 Fix assignee sidebar links and empty placeholder after #32465 refactor (#36559)
Follow-up to #32465: Fix the assignee sidebar after the selector
refactor.


Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-02-08 21:00:18 +00:00
wxiaoguang
08b7a30867 Fix various version parsing problems (#36553)
1. handle non-release git verions (not semver)
2. fix rubygems version "0" handling (only ">=" can be omitted)
3. lazy compile the regexp to improve performance
4. make test data maintainable, use origin source code instead of compressed binary
2026-02-08 20:25:30 +00:00
wxiaoguang
2ff4f4a909 Fix highlight diff result (#36539)
Fix #36536

---------

Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
2026-02-08 16:48:52 +00:00
ChristopherHX
f65df2a69b Refactor Nuget Auth to reuse Basic Auth Token Validation (#36558)
* Implicitly handle Actions Task Token for Nuget Api Keys
* Support same tokens as Basic Auth in Nuget Api Key Header

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-02-08 14:43:05 +00:00
Sebastian Ertz
daf0483ef2 Update go dependencies (#36548) 2026-02-08 12:01:37 +00:00
Hypo
ef529de0ac Prevent navigation keys from triggering actions during IME composition (#36540)
Fixes  #36532 

Refined the Enter key trigger logic in the repository filter to prevent
actions during IME composition.

By checking the e.isComposing property, the filter now correctly
distinguishes between "confirming an IME candidate" and "submitting the
search." This prevents premature search triggers when users press Enter
to select Chinese/Japanese characters.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-02-08 14:39:09 +08:00
wxiaoguang
a60201a071 Fix various mermaid bugs (#36547)
* Fix #36515
* Fix #23076
* Remove unnecessary `mermaid.parse`
* Fix data race when using `data-render-done`
* Remove unnecessary `Promise.all`
* Fix duplicate `load` event and duplicate SVG node rendering
* Remove unnecessary `IntersectionObserver`
* Add `bindFunctions` call, the old comment seems not true
2026-02-08 12:21:11 +08:00
silverwind
49e6d5f6d6 Add elk layout support to mermaid (#36486)
Fixes: https://github.com/go-gitea/gitea/issues/34769

This allows the user to opt-in to using `elk` layouts using either YAML
frontmatter or `%%{ init` directives inside the markup code block. The
default layout is not changed.

---------

Signed-off-by: silverwind <me@silverwind.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-02-07 02:22:57 +00:00
Louis
e2104a1dd5 Allow configuring default PR base branch (fixes #36412) (#36425)
This adds a per-repository default PR base branch and wires it through
PR entry points. It updates compare links and recently pushed branch
prompts to respect the configured base branch, and prevents auto-merge
cleanup from deleting the configured base branch on same-repo PRs.

## Behavior changes
- New PR compare links on repo home/issue list and branch list honor the
configured default PR base branch.
- The "recently pushed new branches" prompt now compares against the
configured base branch.
- Auto-merge branch cleanup skips deleting the configured base branch
(same-repo PRs only).

---------

Signed-off-by: Louis <116039387+tototomate123@users.noreply.github.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: silverwind <me@silverwind.io>
2026-02-07 01:34:29 +00:00
GiteaBot
0dacd956fb [skip ci] Updated translations via Crowdin 2026-02-07 00:45:30 +00:00
silverwind
915b44810d Color command/error logs in Actions log (#36538)
Support `[command]` and `##[error]` log command

------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-02-06 23:05:32 +08:00
TheFox0x7
403a73dca0 Add paging headers (#36521)
Adds support for paging in admin/hooks api endpoint

fixes: https://github.com/go-gitea/gitea/issues/36516

---------

Co-authored-by: techknowlogick <techknowlogick@gitea.com>
Co-authored-by: techknowlogick <matti@mdranta.net>
2026-02-06 13:12:05 +00:00
Tyrone Yeh
ef9c19691d Fix issues filter dropdown showing empty label scope section (#36535)
The issues filter dropdown always rendered the label scope divider and
header, even when .ExclusiveLabelScopes was empty.

This PR wraps the label scope section with a conditional so the
divider/header and scope entries are only displayed when scopes exist.

Before

The dropdown showed a divider and “Label” header even when there were no
exclusive label scopes available.
<img width="521" height="569" alt="image"
src="https://github.com/user-attachments/assets/9766df6b-c11b-46f3-aabc-9fa5f4ca767d"
/>

After

The label scope section is hidden entirely when .ExclusiveLabelScopes is
empty, keeping the dropdown clean and consistent.
<img width="329" height="485" alt="image"
src="https://github.com/user-attachments/assets/e9586e57-2be5-43ea-8a13-9b87c951be6f"
/>

Notes

UI-only change, no behavior change to filtering logic.
2026-02-06 08:33:42 +00:00
Pascal Zimmermann
50fdd2d49a [SECURITY] fix: Adjust the toolchain version (#36537)
# Summary:

- Adjust the toolchain version to fix the security issues


```log
Vulnerability #1: GO-2026-4337
    Unexpected session resumption in crypto/tls
  More info: https://pkg.go.dev/vuln/GO-2026-4337
  Standard library
    Found in: crypto/tls@go1.25.6
    Fixed in: crypto/tls@go1.25.7
    Example traces found:
```

Signed-off-by: Pascal Zimmermann <pascal.zimmermann@theiotstudio.com>
2026-02-06 00:27:53 +01:00
Copilot
fca94bcdd7 Hide add-matcher and remove-matcher from actions job logs (#36520)
Hides `::add-matcher::`, `##[add-matcher]` and `::remove-matcher` in job
step logs. These are used to configure regex matchers to detect lines
that should trigger annotation comments on the UI, currently unsupported
by Gitea and these have no relevance to the user.

---------

Signed-off-by: silverwind <me@silverwind.io>
Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
2026-02-05 19:11:44 +08:00
Copilot
000d7c1ccb Improve timeline entries for WIP prefix changes in pull requests (#36518)
Add new timeline event types when the WIP prefix is added or removed,
replacing the previous ugly title change messages.

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

---------

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-02-05 05:57:08 +00:00
Noel Jackson
65d93d819b fix(packages/container): data race when uploading container blobs concurrently (#36524)
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-02-04 00:08:20 +08:00
GiteaBot
288d1f526a [skip ci] Updated translations via Crowdin 2026-02-02 00:49:41 +00:00
Copilot
7883f6dde9 Remove and forbid @ts-expect-error (#36513)
Removes `@ts-expect-error` in the code base and forbids it.

---------

Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: silverwind <115237+silverwind@users.noreply.github.com>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-02-02 01:00:34 +08:00
Nicolas
c2dea22926 Add resolve/unresolve review comment API endpoints (#36441)
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-02-01 12:28:28 +00:00
Copilot
584d8ef75f Fix incorrect vendored detections (#36508)
Fixes: https://github.com/go-gitea/gitea/issues/22618

`go-enry`'s `IsVendor` function marks git paths (`.gitignore`,
`.gitattributes`, `.gitmodules`), github/gitea paths (`.github/`,
`.gitea/`) as "vendored" for GitHub Linguist language statistics. This
causes these files to incorrectly display the "Vendored" tag in diff
views.

Override `go-enry`'s detection for these specific cases while preserving
its behavior for actual vendor directories.

---------

Signed-off-by: silverwind <me@silverwind.io>
Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: silverwind <115237+silverwind@users.noreply.github.com>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-02-01 10:35:51 +00:00
silverwind
9d96039027 Bump alpine to 3.23, add platforms to docker-dryrun (#36379)
- Bump alpine to 3.23 following
https://github.com/go-gitea/gitea/pull/36185 and
https://github.com/go-gitea/gitea/pull/36202.
- Enable all architectures in `docker-dryrun`.
- Tweak actions conditions to be more precise.

---------

Signed-off-by: silverwind <me@silverwind.io>
Co-authored-by: techknowlogick <techknowlogick@gitea.com>
Co-authored-by: Giteabot <teabot@gitea.io>
2026-02-01 09:36:43 +00:00
Copilot
072de7d8cd Unify repo names in system notices (#36491)
Fixes: https://github.com/go-gitea/gitea/issues/36211

This PR fixes ensures that all system notices consistently include
repository names in the format `"Action description (owner/repo): error
message"`.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: silverwind <115237+silverwind@users.noreply.github.com>
Co-authored-by: silverwind <me@silverwind.io>
2026-02-01 17:06:57 +08:00
Lunny Xiao
e377da989f Allow scroll propagation outside code editor (#36502)
Fix #28479

When scrolling inside the editor and the editor has already reached the
end of its scroll area, the browser does not continue scrolling. This is
inconvenient because users must move the cursor out of the editor to
scroll the page further.

This PR enables automatic switching between the editor’s scroll and the
browser’s scroll, allowing seamless continuous scrolling.
2026-02-01 06:03:38 +00:00