]> source.dussan.org Git - gitea.git/log
gitea.git
5 months agoFix branch selector UI (#30803)
wxiaoguang [Thu, 2 May 2024 10:45:23 +0000 (18:45 +0800)]
Fix branch selector UI (#30803)

Fix  #30802

5 months agoFix rounded border for segment followed by pagination (#30809)
silverwind [Thu, 2 May 2024 09:25:55 +0000 (11:25 +0200)]
Fix rounded border for segment followed by pagination (#30809)

Fixes https://github.com/go-gitea/gitea/issues/30673, specifically
https://github.com/go-gitea/gitea/issues/30673#issuecomment-2085329812.

5 months agoSkip gzip for some well-known compressed file types (#30796)
wxiaoguang [Thu, 2 May 2024 02:27:25 +0000 (10:27 +0800)]
Skip gzip for some well-known compressed file types (#30796)

Co-authored-by: silverwind <me@silverwind.io>
5 months agoFix markdown rendering when mentioning users (#30795)
wxiaoguang [Thu, 2 May 2024 01:00:46 +0000 (09:00 +0800)]
Fix markdown rendering when mentioning users (#30795)

5 months agoFix bleve fuzziness (#30799)
wxiaoguang [Wed, 1 May 2024 12:32:52 +0000 (20:32 +0800)]
Fix bleve fuzziness (#30799)

Fix #30797
Fix #30317

5 months agoDon't have `redis-cluster` as possible cache/session adapter in docs (#30794)
Kemal Zebari [Wed, 1 May 2024 05:33:40 +0000 (22:33 -0700)]
Don't have `redis-cluster` as possible cache/session adapter in docs (#30794)

This is because it doesn't exist as an adapter. The `redis` adapter
already handles Redis cluster configurations.

Fixes #30534.

5 months agoAdd API endpoints for getting action jobs status (#26673)
Chester [Wed, 1 May 2024 01:40:23 +0000 (09:40 +0800)]
Add API endpoints for getting action jobs status (#26673)

Sample of response, it is similar to Github actions

ref
https://docs.github.com/en/rest/actions/workflow-runs?apiVersion=2022-11-28#list-workflow-runs-for-a-repository

``` json
{
    "workflow_runs": [
        {
            "id": 3,
            "name": "Explore-Gitea-Actions",
            "head_branch": "main",
            "head_sha": "6d8d29a9f7a01ded8f8aeb64341cb31ee1ab5f19",
            "run_number": 3,
            "event": "push",
            "display_title": "More job",
            "status": "success",
            "workflow_id": "demo2.yaml",
            "url": "/chester/test/actions/runs/3",
            "created_at": "2023-08-22T13:41:33-04:00",
            "updated_at": "2023-08-22T13:41:37-04:00",
            "run_started_at": "2023-08-22T13:41:33-04:00"
        },
        {
            "id": 2,
            "name": "Explore-Gitea-Actions",
            "head_branch": "main",
            "head_sha": "6d8d29a9f7a01ded8f8aeb64341cb31ee1ab5f19",
            "run_number": 2,
            "event": "push",
            "display_title": "More job",
            "status": "success",
            "workflow_id": "demo.yaml",
            "url": "/chester/test/actions/runs/2",
            "created_at": "2023-08-22T13:41:30-04:00",
            "updated_at": "2023-08-22T13:41:33-04:00",
            "run_started_at": "2023-08-22T13:41:30-04:00"
        },
        {
            "id": 1,
            "name": "Explore-Gitea-Actions",
            "head_branch": "main",
            "head_sha": "e5369ab054cae79899ba36e45ee82811a6e0acd5",
            "run_number": 1,
            "event": "push",
            "display_title": "Add job",
            "status": "failure",
            "workflow_id": "demo.yaml",
            "url": "/chester/test/actions/runs/1",
            "created_at": "2023-08-22T13:15:21-04:00",
            "updated_at": "2023-08-22T13:18:10-04:00",
            "run_started_at": "2023-08-22T13:15:21-04:00"
        }
    ],
    "total_count": 3
}
```

---------

Co-authored-by: yp05327 <576951401@qq.com>
Co-authored-by: puni9869 <80308335+puni9869@users.noreply.github.com>
5 months ago[skip ci] Updated translations via Crowdin
GiteaBot [Wed, 1 May 2024 00:26:38 +0000 (00:26 +0000)]
[skip ci] Updated translations via Crowdin

5 months agoImprove logout from worker (#30775)
wxiaoguang [Tue, 30 Apr 2024 15:35:42 +0000 (23:35 +0800)]
Improve logout from worker (#30775)

A quick fix for #30756

5 months agoRework and fix stopwatch (#30732)
silverwind [Tue, 30 Apr 2024 14:52:46 +0000 (16:52 +0200)]
Rework and fix stopwatch (#30732)

Fixes https://github.com/go-gitea/gitea/issues/30721 and overhauls the
stopwatch. Time is now shown inside the "dot" icon and on both mobile
and desktop. All rendering is now done by `<relative-time>`, the
`pretty-ms` dependency is dropped.

Desktop:
<img width="557" alt="Screenshot 2024-04-29 at 22 33 27"
src="https://github.com/go-gitea/gitea/assets/115237/3a46cdbf-6af2-4bf9-b07f-021348badaac">

Mobile:
<img width="640" alt="Screenshot 2024-04-29 at 22 34 19"
src="https://github.com/go-gitea/gitea/assets/115237/8a2beea7-bd5d-473f-8fff-66f63fd50877">

Note for tippy:
Previously, tippy instances defaulted to "menu" theme, but that theme is
really only meant for `.ui.menu`, so it was not optimal for the
stopwatch popover.

This introduces a unopinionated `default` theme that has no padding and
should be suitable for all content. I reviewed all existing uses and
explicitely set the desired `theme` on all of them.

5 months agoFix dashboard commit status null access (#30771)
wxiaoguang [Tue, 30 Apr 2024 12:39:36 +0000 (20:39 +0800)]
Fix dashboard commit status null access (#30771)

Fix #30768

5 months agoFix tautological conditions (#30735)
silverwind [Tue, 30 Apr 2024 12:34:40 +0000 (14:34 +0200)]
Fix tautological conditions (#30735)

As discovered by https://github.com/go-gitea/gitea/pull/30729.

---------

Co-authored-by: Giteabot <teabot@gitea.io>
5 months agoGet repo assignees and reviewers should ignore deactivated users (#30770)
6543 [Tue, 30 Apr 2024 08:43:08 +0000 (10:43 +0200)]
Get repo assignees and reviewers should ignore deactivated users (#30770)

If an user is deactivated, it should not be in the list of users who are
suggested to be assigned or review-requested.

old assignees or reviewers are not affected.

---
*Sponsored by Kithara Software GmbH*

5 months agoRight align the "Settings" menu item in overflow-menu (#30764)
wxiaoguang [Tue, 30 Apr 2024 04:26:13 +0000 (12:26 +0800)]
Right align the "Settings" menu item in overflow-menu (#30764)

I guess there could be enough people liking to make the Settings menu
item right aligned. As a site admin, I found it's easier to find the
right-aligned Settings menu item.

Tested with various sizes:

![image](https://github.com/go-gitea/gitea/assets/2114189/92836527-2cb2-4531-9296-233c5bd698f4)

![image](https://github.com/go-gitea/gitea/assets/2114189/3a0729fc-5e33-44b5-9fb4-3a4e787405b5)

![image](https://github.com/go-gitea/gitea/assets/2114189/9845ab6b-88e3-4e5a-8d6d-2b8af259d593)

5 months agoFix duplicate status check contexts (#30660)
Zettat123 [Tue, 30 Apr 2024 03:53:16 +0000 (11:53 +0800)]
Fix duplicate status check contexts (#30660)

Caused by #30076.

There may be some duplicate status check contexts when setting status
checks for a branch protection rule. The duplicate contexts should be
removed.

Before:
<img
src="https://github.com/go-gitea/gitea/assets/15528715/97f4de2d-4868-47a3-8a99-5a180f9ac0a3"
width="600px" />

After:
<img
src="https://github.com/go-gitea/gitea/assets/15528715/ff7289c5-9793-4090-ba31-e8cb3c85f8a3"
width="600px" />

5 months agoFix issue label rendering in the issue popup (#30763)
wxiaoguang [Tue, 30 Apr 2024 02:36:32 +0000 (10:36 +0800)]
Fix issue label rendering in the issue popup (#30763)

5 months agoFix all rounded borders, change affected tab menus to pills (#30707)
silverwind [Mon, 29 Apr 2024 20:53:15 +0000 (22:53 +0200)]
Fix all rounded borders, change affected tab menus to pills (#30707)

Fixes https://github.com/go-gitea/gitea/issues/30673, all 23 issues.
Notes:

- Tab bar menus had to change to pills because of unsolvable issue with
the border-radius as tab bar renders a overlapping border onto the box
below. And I think pills look better.
- Added padding to code editor empty preview message
- Hide monaco's built-in blue focus border, we don't need it and it
never showed before either.
- Label add menu is simplified, removing the nested segment.

<img width="1322" alt="Screenshot 2024-04-25 at 22 26 19"
src="https://github.com/go-gitea/gitea/assets/115237/7e394e0c-b7ad-417d-8e9f-12f1dea93ed1">
<img width="1326" alt="Screenshot 2024-04-25 at 22 28 00"
src="https://github.com/go-gitea/gitea/assets/115237/66c8499f-aa9f-4d95-8cca-ef13dfa82c65">
<img width="997" alt="Screenshot 2024-04-25 at 22 36 53"
src="https://github.com/go-gitea/gitea/assets/115237/07896102-c71d-4246-8173-c2bc2e1d3cae">
<img width="832" alt="Screenshot 2024-04-25 at 22 56 09"
src="https://github.com/go-gitea/gitea/assets/115237/d83afc96-08ca-4adc-baf4-3d02804be57c">
<img width="361" alt="Screenshot 2024-04-25 at 22 57 12"
src="https://github.com/go-gitea/gitea/assets/115237/c7371a68-00b5-47d8-84d0-ddc5268b2b2c">

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Giteabot <teabot@gitea.io>
5 months agoRename CodeIndexerEnabled to IsRepoIndexerEnabled (#30762)
wxiaoguang [Mon, 29 Apr 2024 20:15:35 +0000 (04:15 +0800)]
Rename CodeIndexerEnabled to IsRepoIndexerEnabled (#30762)

Fix  #30761

Most places use `IsRepoIndexerEnabled` but not `CodeIndexerEnabled`, so
it should always use `IsRepoIndexerEnabled` for consistency.

5 months agoRemove fomantic dimmer module (#30723)
silverwind [Mon, 29 Apr 2024 14:49:50 +0000 (16:49 +0200)]
Remove fomantic dimmer module (#30723)

Tested extensively using modal which is the only dependant.

5 months agoResolve lint for unused parameter and unnecessary type arguments (#30750)
Chongyi Zheng [Mon, 29 Apr 2024 08:47:56 +0000 (04:47 -0400)]
Resolve lint for unused parameter and unnecessary type arguments (#30750)

Resolve all cases for `unused parameter` and `unnecessary type
arguments`

Related: #30729

---------

Co-authored-by: Giteabot <teabot@gitea.io>
5 months agoAdd support for npm bundleDependencies (#30751)
Micash [Mon, 29 Apr 2024 08:19:06 +0000 (10:19 +0200)]
Add support for npm bundleDependencies (#30751)

5 months agoFix cross-compilation errors when CGO_CFLAGS/CGO_LDFLAGS is set (#30749)
Sergey Zolotarev [Mon, 29 Apr 2024 03:45:53 +0000 (09:45 +0600)]
Fix cross-compilation errors when CGO_CFLAGS/CGO_LDFLAGS is set (#30749)

When you cross-compile Gitea and you specify one of the envrionment
variables related to C flags, cgo will fail to build the generator
programs (e.g. generate-bindata) because GOOS and GOARCH are unset, but
those additional flags variables are not unset together with those.

To solve this issue, the simplest way that I've found is to disable cgo
in the `go generate` command as it's not really used there.

For example, I've had this problem with cross-compiling Gitea on FreeBSD
x86_64 to ARMv7 where it's necessary to pass `--target` to `clang` via
`CGO_CFLAGS`:
```
GOOS=freebsd \
GOARCH=arm \
GGOARM=7 \
CGO_ENABLED=1 \
SYSROOT=/usr/local/freebsd-sysroot/armv7 \
CC=clang \
CGO_CFLAGS="--target=armv7-unknown-freebsd13.2-gnueabihf" \
TAGS="bindata sqlite sqlite_unlock_notify" \
make SHELL='sh -x' build
```

```
Running go generate...
# runtime/cgo
In file included from gcc_freebsd_amd64.c:9:
In file included from /usr/include/signal.h:42:
/usr/include/sys/_ucontext.h:44:2: error: unknown type name 'mcontext_t'
modules/migration/schemas_bindata.go:8: running "go": exit status 1
# runtime/cgo
In file included from gcc_freebsd_amd64.c:9:
In file included from /usr/include/signal.h:42:
/usr/include/sys/_ucontext.h:44:2: error: unknown type name 'mcontext_t'
modules/options/options_bindata.go:8: running "go": exit status 1
# runtime/cgo
In file included from gcc_freebsd_amd64.c:9:
In file included from /usr/include/signal.h:42:
/usr/include/sys/_ucontext.h:44:2: error: unknown type name 'mcontext_t'
modules/public/public_bindata.go:8: running "go": exit status 1
# runtime/cgo
In file included from gcc_freebsd_amd64.c:9:
In file included from /usr/include/signal.h:42:
/usr/include/sys/_ucontext.h:44:2: error: unknown type name 'mcontext_t'
modules/templates/templates_bindata.go:8: running "go": exit status 1
gmake[1]: *** [Makefile:781: generate-go] Error 1
*** Error code 2

Stop.
```

But with this fix Gitea compiles successfully.

5 months ago[skip ci] Updated licenses and gitignores
GiteaBot [Mon, 29 Apr 2024 00:25:01 +0000 (00:25 +0000)]
[skip ci] Updated licenses and gitignores

5 months agoadd built js files to eslint ignore (#30737)
silverwind [Sun, 28 Apr 2024 14:27:14 +0000 (16:27 +0200)]
add built js files to eslint ignore (#30737)

For the rare case that some overzealous tooling wants to lint our output
files.

5 months agoGitea with first upper case + typos (#30739)
mainboarder [Sun, 28 Apr 2024 13:01:22 +0000 (15:01 +0200)]
Gitea with first upper case + typos (#30739)

* Corrected gitea to Gitea
* fixed some typos

5 months agoFix documentation build problems because of MDX syntax conflicts (#30744)
Lunny Xiao [Sun, 28 Apr 2024 12:36:14 +0000 (20:36 +0800)]
Fix documentation build problems because of MDX syntax conflicts (#30744)

Documentation building has encountered a problem like below. This is
because MDX syntax doesn't allow `{customPath}`, we have to use
\`{customPath}\`

```
Error: Can't render static file for pathname "/next/administration/config-cheat-sheet"
            at generateStaticFile (/workspace/gitea/gitea-docusaurus/node_modules/@docusaurus/core/lib/ssg.js:119:15)
            at runNextTicks (node:internal/process/task_queues:60:5)
            at process.processImmediate (node:internal/timers:449:9)
            at async /workspace/gitea/gitea-docusaurus/node_modules/p-map/index.js:57:22 {
          [cause]: ReferenceError: CustomPath is not defined
              at _createMdxContent (server.bundle.js:4406:106)
              at MDXContent (server.bundle.js:10745:8)
              at Uc (server.bundle.js:264171:44)
              at Xc (server.bundle.js:264173:253)
              at Z (server.bundle.js:264179:89)
              at Yc (server.bundle.js:264182:98)
              at $c (server.bundle.js:264181:140)
              at Z (server.bundle.js:264179:345)
              at Xc (server.bundle.js:264177:231)
              at Z (server.bundle.js:264179:89)
```

5 months agoRemove disk-clean workflow (#30741)
Chongyi Zheng [Sun, 28 Apr 2024 05:47:48 +0000 (01:47 -0400)]
Remove disk-clean workflow (#30741)

The jobs in the workflow runs in parallel. The `disk-clean` job actually
does nothing, i.e. it will not clean the disk for `nightly-binary`,
`nightly-docker-rootful`, `nightly-docker-rootless`

5 months agoBump `github.com/google/go-github` to v61 (#30738)
Chongyi Zheng [Sun, 28 Apr 2024 05:20:23 +0000 (01:20 -0400)]
Bump `github.com/google/go-github` to v61 (#30738)

5 months agoFix nil dereference on error (#30740)
Chongyi Zheng [Sun, 28 Apr 2024 04:13:57 +0000 (00:13 -0400)]
Fix nil dereference on error (#30740)

In both cases, the `err` is nil because of `if` checks before

Reference: #30729

5 months agoUse `ProtonMail/go-crypto` for `opengpg` in tests (#30736)
Chongyi Zheng [Sat, 27 Apr 2024 23:21:33 +0000 (19:21 -0400)]
Use `ProtonMail/go-crypto` for `opengpg` in tests (#30736)

5 months agoReplace deprecated `math/rand` functions (#30733) v1.23.0-dev
Chongyi Zheng [Sat, 27 Apr 2024 16:50:35 +0000 (12:50 -0400)]
Replace deprecated `math/rand` functions (#30733)

Suggested by logs in #30729

- Remove `math/rand.Seed`
`rand.Seed is deprecated: As of Go 1.20 there is no reason to call Seed
with a random value.`
- Replace `math/rand.Read`
`rand.Read is deprecated: For almost all use cases, [crypto/rand.Read]
is more appropriate.`
- Replace `math/rand` with `math/rand/v2`, which is available since Go
1.22

5 months agoMake Ctrl+Enter work for issue/comment edit (#30720) v1.22.0-rc1
wxiaoguang [Sat, 27 Apr 2024 14:32:00 +0000 (22:32 +0800)]
Make Ctrl+Enter work for issue/comment edit (#30720)

Fix #30710

5 months agoRename migration package name for 1.22-rc1 (#30730)
wxiaoguang [Sat, 27 Apr 2024 14:02:07 +0000 (22:02 +0800)]
Rename migration package name for 1.22-rc1 (#30730)

Ref: Propose to restart 1.22 release #30501

5 months agoIssue card improvements (#30687)
silverwind [Sat, 27 Apr 2024 13:35:26 +0000 (15:35 +0200)]
Issue card improvements (#30687)

Fixes https://github.com/go-gitea/gitea/issues/30682 and does a few
improvements:

- Use gap instead of margin/padding
- Don't render empty image div
- Remove `right floated` class that did nothing

<img width="406" alt="Screenshot 2024-04-24 at 20 21 20"
src="https://github.com/go-gitea/gitea/assets/115237/2fa88707-c2c4-40df-aee7-a684c3097ed0">

---------

Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
5 months agoDon't show loading indicators when refreshing the system status (#30712)
Yarden Shoham [Sat, 27 Apr 2024 13:05:06 +0000 (16:05 +0300)]
Don't show loading indicators when refreshing the system status (#30712)

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: silverwind <me@silverwind.io>
5 months agoAdd some tests to clarify the "must-change-password" behavior (#30693)
wxiaoguang [Sat, 27 Apr 2024 12:23:37 +0000 (20:23 +0800)]
Add some tests to clarify the "must-change-password" behavior (#30693)

Follow  #30472:

When a user is created by command line `./gitea admin user create`:

Old behavior before #30472: the first user (admin or non-admin) doesn't
need to change password.

Revert to the old behavior before #30472

5 months agoPrevent allow/reject reviews on merged/closed PRs (#30686)
Kemal Zebari [Sat, 27 Apr 2024 11:55:03 +0000 (04:55 -0700)]
Prevent allow/reject reviews on merged/closed PRs (#30686)

Resolves #30675.

5 months agoUpdate JS dependencies (#30713)
silverwind [Sat, 27 Apr 2024 11:28:28 +0000 (13:28 +0200)]
Update JS dependencies (#30713)

- Update all JS dependencies
- Remove
[now-unnecessary](https://github.com/microsoft/monaco-editor/issues/4325)
monaco workaround
- Update stylelint config for new rule
- Tested Monaco, Swagger UI, Mermaid

5 months agoImprove diff stats bar (#30669)
silverwind [Sat, 27 Apr 2024 11:22:55 +0000 (13:22 +0200)]
Improve diff stats bar (#30669)

Minor tweaks:

- Remove unnecessary `item` class which was causing unwanted padding to
be added.
- Add some padding and prevent wrapping so it looks better on mobile.
- Increase width by 4px.

<img width="116" alt="Screenshot 2024-04-24 at 00 15 07"
src="https://github.com/go-gitea/gitea/assets/115237/1f1cf54c-8053-4297-b309-71d9c2ceb9ee">
<img width="441" alt="Screenshot 2024-04-24 at 00 14 57"
src="https://github.com/go-gitea/gitea/assets/115237/2f3a33dc-edad-4b97-b64c-6812aae513cb">

5 months agoRemove unused parameter for some functions in `services/mirror` (#30724)
Chongyi Zheng [Sat, 27 Apr 2024 10:44:49 +0000 (06:44 -0400)]
Remove unused parameter for some functions in `services/mirror` (#30724)

Suggested by gopls `unusedparams`

5 months agoUpdate misspell to 0.5.1 and add `misspellings.csv` (#30573)
silverwind [Sat, 27 Apr 2024 08:03:49 +0000 (10:03 +0200)]
Update misspell to 0.5.1 and add `misspellings.csv` (#30573)

Misspell 0.5.0 supports passing a csv file to extend the list of
misspellings, so I added some common ones from the codebase. There is at
least one typo in a API response so we need to decided whether to revert
that and then likely remove the dict entry.

5 months agoSuppress browserslist warning in webpack target (#30571)
silverwind [Sat, 27 Apr 2024 07:21:07 +0000 (09:21 +0200)]
Suppress browserslist warning in webpack target (#30571)

1. Set
[`BROWSERSLIST_IGNORE_OLD_DATA`](https://github.com/browserslist/browserslist/blob/c6ddf7b3870a4585822d06ec77e8dd2401b8e1ed/node.js#L400)
to avoid warning on outdated browserslist data which the end user can
likely not do anything about and which is currently visible in the v1.21
branch.
2. Suppress all command echoing and add a "Running webpack..." message
in place.

Warning in question was this:

```
Browserslist: caniuse-lite is outdated. Please run:
  npx update-browserslist-db@latest
  Why you should do it regularly: https://github.com/browserslist/update-db#readme
```

5 months ago[skip ci] Updated translations via Crowdin
GiteaBot [Sat, 27 Apr 2024 00:24:31 +0000 (00:24 +0000)]
[skip ci] Updated translations via Crowdin

5 months agoDiff color enhancements, add line number background (#30670)
silverwind [Fri, 26 Apr 2024 19:37:21 +0000 (21:37 +0200)]
Diff color enhancements, add line number background (#30670)

1. Bring back the background on line numbers. This feature was lost a
long time ago.

<img width="457" alt="Screenshot 2024-04-24 at 01 36 09"
src="https://github.com/go-gitea/gitea/assets/115237/76a7f5a9-c22a-4c72-9f0a-ebf16a66513e">
<img width="473" alt="Screenshot 2024-04-24 at 01 22 47"
src="https://github.com/go-gitea/gitea/assets/115237/eef06cf2-f1b9-40e3-947d-dd5852ec12a3">
<img width="457" alt="Screenshot 2024-04-24 at 02 13 18"
src="https://github.com/go-gitea/gitea/assets/115237/59e317d4-76a7-468c-8a19-10d88c675cc3">
<img width="459" alt="Screenshot 2024-04-24 at 01 23 21"
src="https://github.com/go-gitea/gitea/assets/115237/f1a46f8d-8846-4d78-a9d7-8b7dc18ac6e4">

2. Expanded lines background is now full-line, including line numbers:

<img width="1303" alt="Screenshot 2024-04-24 at 01 37 12"
src="https://github.com/go-gitea/gitea/assets/115237/271eefe2-0869-424e-93fb-ccd8adc87806">

3. Sort affected colors alphabetically in the CSS

Fixes #14603

5 months agofeat(api): enhance Actions Secrets Management API for repository (#30656)
Bo-Yi Wu [Fri, 26 Apr 2024 13:11:49 +0000 (21:11 +0800)]
feat(api): enhance Actions Secrets Management API for repository (#30656)

- Add endpoint to list repository action secrets in API routes
- Implement `ListActionsSecrets` function to retrieve action secrets
from the database
- Update Swagger documentation to include the new
`/repos/{owner}/{repo}/actions/secrets` endpoint
- Add `actions` package import and define new routes for actions,
secrets, variables, and runners in `api.go`.
- Refactor action-related API functions into `Action` struct methods in
`org/action.go` and `repo/action.go`.
- Remove `actionAPI` struct and related functions, replacing them with
`NewAction()` calls.
- Rename `variables.go` to `action.go` in `org` directory.
- Delete `runners.go` and `secrets.go` in both `org` and `repo`
directories, consolidating their content into `action.go`.
- Update copyright year and add new imports in `org/action.go`.
- Implement `API` interface in `services/actions/interface.go` for
action-related methods.
- Remove individual action-related functions and replace them with
methods on the `Action` struct in `repo/action.go`.

---------

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
Signed-off-by: appleboy <appleboy.tw@gmail.com>
5 months agoFix code search input for different views (#30678)
wxiaoguang [Fri, 26 Apr 2024 11:21:04 +0000 (19:21 +0800)]
Fix code search input for different views (#30678)

Now only show the "code search" on the repo home page, because it only
does global search.
So do not show it when viewing file or directory to avoid misleading
users (it doesn't search in a directory)

5 months agoFix incorrect object id hash function (#30708)
wxiaoguang [Fri, 26 Apr 2024 09:49:48 +0000 (17:49 +0800)]
Fix incorrect object id hash function (#30708)

Great thanks to @oliverpool for figuring out the problem and proposing a
fix.

Regression of #28138

Incorrect hash causes the user's LFS files get all deleted when running
`doctor fix all`

(by the way, remove unused/non-standard comments)

Co-authored-by: Giteabot <teabot@gitea.io>
5 months agoAdd route handler info for debugging purpose (#30705)
wxiaoguang [Fri, 26 Apr 2024 09:09:49 +0000 (17:09 +0800)]
Add route handler info for debugging purpose (#30705)

Follow #30519

5 months agoBump htmx version to 1.9.12 (#30711)
Yarden Shoham [Fri, 26 Apr 2024 07:27:34 +0000 (10:27 +0300)]
Bump htmx version to 1.9.12 (#30711)

There are no breaking changes. I tested and everything works as before.

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
5 months agoDeduplicate lfs common code (#30704)
wxiaoguang [Fri, 26 Apr 2024 02:53:30 +0000 (10:53 +0800)]
Deduplicate lfs common code (#30704)

5 months agoImprove job commit description (#30579)
yp05327 [Fri, 26 Apr 2024 02:22:45 +0000 (11:22 +0900)]
Improve job commit description (#30579)

Fix https://github.com/go-gitea/gitea/issues/30567

When job is a schedule:

![image](https://github.com/go-gitea/gitea/assets/18380374/b07e9d43-e8b7-4ee2-87b3-a7050c3a8ca5)
When it is a normal one:

![image](https://github.com/go-gitea/gitea/assets/18380374/0d58dab9-74bb-421b-8952-0578cdf21a52)

also add a 'space' behind  `:`

![image](https://github.com/go-gitea/gitea/assets/18380374/4cebece0-bfe6-4ad9-b806-e5c49bb9be43)

![image](https://github.com/go-gitea/gitea/assets/18380374/02da7681-474b-4c0f-9dad-b6558f6cb484)

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
5 months agoImprove test for TestPullCompare (#30699)
Lunny Xiao [Fri, 26 Apr 2024 01:52:28 +0000 (09:52 +0800)]
Improve test for TestPullCompare (#30699)

5 months agoAllow to save empty comment (#30706)
wxiaoguang [Fri, 26 Apr 2024 01:17:43 +0000 (09:17 +0800)]
Allow to save empty comment (#30706)

Fix #29986

5 months ago[skip ci] Updated translations via Crowdin
GiteaBot [Fri, 26 Apr 2024 00:26:00 +0000 (00:26 +0000)]
[skip ci] Updated translations via Crowdin

5 months agoRefactor imagediff and fix regression bug (#30694)
wxiaoguang [Thu, 25 Apr 2024 13:01:38 +0000 (21:01 +0800)]
Refactor imagediff and fix regression bug (#30694)

Fix #30683

5 months agoImprove oauth2 client "preferred username field" logic and the error handling (#30622)
wxiaoguang [Thu, 25 Apr 2024 11:22:32 +0000 (19:22 +0800)]
Improve oauth2 client "preferred username field" logic and the error handling (#30622)

Follow #30454
And fix #24957

When using "preferred_username", if no such field,
`extractUserNameFromOAuth2` (old `getUserName`) shouldn't return an
error. All other USERNAME options do not return such error.

And fine tune some logic and error messages, make code more stable and
more friendly to end users.

5 months agoFix active item in tab menu (#30690)
silverwind [Thu, 25 Apr 2024 10:53:39 +0000 (12:53 +0200)]
Fix active item in tab menu (#30690)

Before, item would also resize on hover because of font weight:
<img width="381" alt="Screenshot 2024-04-25 at 01 28 53"
src="https://github.com/go-gitea/gitea/assets/115237/4f3291fc-90be-4d66-ae8b-3c2f763cb956">

After:
<img width="381" alt="Screenshot 2024-04-25 at 01 28 40"
src="https://github.com/go-gitea/gitea/assets/115237/06145bf2-1ddd-4171-9217-d92c100ea405">

Co-authored-by: Giteabot <teabot@gitea.io>
5 months agoIf a repository return no commitstatus, then still cache it but not query it from...
Lunny Xiao [Thu, 25 Apr 2024 09:14:23 +0000 (17:14 +0800)]
If a repository return no commitstatus, then still cache it but not query it from database (#30700)

The previous repository default branch commit status cache will only
store if the commit status has value. So the repository which have no
any commit status will always be fetched from database.

This PR will store the empty state of commit status of a repository into
cache because the cache will be updated once there is a commit status
stored.

5 months ago[skip ci] Updated translations via Crowdin
GiteaBot [Thu, 25 Apr 2024 00:26:13 +0000 (00:26 +0000)]
[skip ci] Updated translations via Crowdin

5 months agoFix view of readme file in the home code page. (#30564)
Jiaxin Zhu [Thu, 25 Apr 2024 00:07:38 +0000 (08:07 +0800)]
Fix view of readme file in the home code page. (#30564)

Gitea attempts to display image file, pdf file, etc. named readme in the
home code page (but it cannot).
I think only the markdown and plain-text file should be displayed, which
is also the behavior of GitHub.

Co-authored-by: jxshin <zhujiaxinabc@gmail.com>
5 months agoAdd test for #30674 (#30679)
Lunny Xiao [Wed, 24 Apr 2024 14:11:49 +0000 (22:11 +0800)]
Add test for #30674 (#30679)

5 months agoFix border-radius of header+segment boxes (#30667)
silverwind [Wed, 24 Apr 2024 13:11:52 +0000 (15:11 +0200)]
Fix border-radius of header+segment boxes (#30667)

This is a very old bug with the bottom border-radiuses not being there
and the `:has` selector now makes it possible to cleanly solve it. It
affects all header+segment boxes, which there are many throughout the
UI:

<img width="1017" alt="Screenshot 2024-04-23 at 20 47 21"
src="https://github.com/go-gitea/gitea/assets/115237/870fe352-cc38-4bd6-bfe6-9fe8c3066f92">

5 months agoFix a panic bug when head repository deleting (#30674)
Lunny Xiao [Wed, 24 Apr 2024 05:26:50 +0000 (13:26 +0800)]
Fix a panic bug when head repository deleting (#30674)

When visiting a pull request files which head repository has been
deleted, it will panic because headrepo is nil.

5 months agoFix some bug on migrations (#30647)
Lunny Xiao [Wed, 24 Apr 2024 01:58:24 +0000 (09:58 +0800)]
Fix some bug on migrations (#30647)

Fix https://github.com/go-gitea/gitea/pull/23894#discussion_r1573718690

5 months agoFix checkbox field markup (#30666)
silverwind [Tue, 23 Apr 2024 21:53:57 +0000 (23:53 +0200)]
Fix checkbox field markup (#30666)

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

Previous use was not a supported way by fomantic and the misuse only
became visible after the checkbox migration.

5 months agoAvoid doubled border for the PR info segment (#30663)
wxiaoguang [Tue, 23 Apr 2024 19:24:10 +0000 (03:24 +0800)]
Avoid doubled border for the PR info segment (#30663)

5 months agoInterpolate runs-on with variables when scheduling tasks (#30640)
sillyguodong [Tue, 23 Apr 2024 18:55:25 +0000 (02:55 +0800)]
Interpolate runs-on with variables when scheduling tasks (#30640)

Follow #29468
1. Interpolate runs-on with variables when scheduling tasks.
2. The `GetVariablesOfRun` function will check if the `Repo` of the run
is nil.

---------

Co-authored-by: Giteabot <teabot@gitea.io>
5 months agoInitial support for colorblindness-friendly themes (#30625)
wxiaoguang [Tue, 23 Apr 2024 16:18:41 +0000 (00:18 +0800)]
Initial support for colorblindness-friendly themes (#30625)

Initial support for #25680

This PR only adds some simple styles from GitHub, it is big enough and
it focuses on adding the necessary framework-level supports. More styles
could be fine-tuned later.

5 months agoFix flash message for flex-container (#30657)
wxiaoguang [Tue, 23 Apr 2024 08:31:51 +0000 (16:31 +0800)]
Fix flash message for flex-container (#30657)

5 months agoPerform Newest sort type correctly when sorting issues (#30644)
Kemal Zebari [Tue, 23 Apr 2024 07:10:01 +0000 (00:10 -0700)]
Perform Newest sort type correctly when sorting issues (#30644)

Should resolve #30642.

Before this commit, we were treating an empty `?sort=` query parameter
as the correct sorting type (which is to sort issues in descending order
by their created UNIX time). But when we perform `sort=latest`, we did
not include this as a type so we would sort by the most recently updated
when reaching the `default` switch statement block.

This commit fixes this by considering the empty string, "latest", and
just any other string that is not mentioned in the switch statement as
sorting by newest.

5 months agoFix project name wrapping, remove horizontal margin on header (#30631)
silverwind [Tue, 23 Apr 2024 04:17:51 +0000 (06:17 +0200)]
Fix project name wrapping, remove horizontal margin on header (#30631)

Enable wrapping of unbroken lines:

<img width="1308" alt="Screenshot 2024-04-22 at 00 31 33"
src="https://github.com/go-gitea/gitea/assets/115237/1a28ade1-d708-4260-96a3-cf508b6dcb79">

Remove extra margin added by nested `.ui.container` on certain
viewports:

Before:
<img width="1305" alt="Screenshot 2024-04-22 at 00 40 23"
src="https://github.com/go-gitea/gitea/assets/115237/d3d8c0d1-380c-4867-b95c-4d53d70d4a93">

After:
<img width="1310" alt="Screenshot 2024-04-22 at 00 40 33"
src="https://github.com/go-gitea/gitea/assets/115237/2ba7b9f2-db2f-4bcc-8cce-5c415625ddea">

5 months agoAdd a db consistency check to remove runners that do not belong to a repository ...
Zettat123 [Tue, 23 Apr 2024 03:51:52 +0000 (11:51 +0800)]
Add a db consistency check to remove runners that do not belong to a repository (#30614)

Follow #30406

5 months agoFix wrong table name (#30557)
Lunny Xiao [Tue, 23 Apr 2024 03:00:57 +0000 (11:00 +0800)]
Fix wrong table name (#30557)

The table name should be `oauth2_application` but `o_auth2_application`

Caused by
https://github.com/go-gitea/gitea/pull/21316/files#diff-9610efbc608a41f1f2eaff5790423f0a187906f6ff0beb23a5e8d18366cc2ccfR38

5 months agoFix compare api swagger (#30648)
Lunny Xiao [Tue, 23 Apr 2024 02:22:43 +0000 (10:22 +0800)]
Fix compare api swagger (#30648)

The swagger format on #30349 is not right. This PR will fix it.

5 months ago[skip ci] Updated translations via Crowdin
GiteaBot [Tue, 23 Apr 2024 00:24:55 +0000 (00:24 +0000)]
[skip ci] Updated translations via Crowdin

5 months agoFix queue test (#30646)
wxiaoguang [Mon, 22 Apr 2024 23:55:43 +0000 (07:55 +0800)]
Fix queue test (#30646)

Fix #30643

The old test code is not stable due to the data-race described in the
TODO added at that time.

Make it stable, and remove a debug-only field from old test code.

5 months agoEnable jquery-related eslint rules that have no violations (#30632)
silverwind [Mon, 22 Apr 2024 14:24:47 +0000 (16:24 +0200)]
Enable jquery-related eslint rules that have no violations (#30632)

All these have no violations, so enable them.

5 months agoEnable more `revive` linter rules (#30608)
silverwind [Mon, 22 Apr 2024 11:48:42 +0000 (13:48 +0200)]
Enable more `revive` linter rules (#30608)

Noteable additions:

- `redefines-builtin-id` forbid variable names that shadow go builtins
- `empty-lines` remove unnecessary empty lines that `gofumpt` does not
remove for some reason
- `superfluous-else` eliminate more superfluous `else` branches

Rules are also sorted alphabetically and I cleaned up various parts of
`.golangci.yml`.

5 months agoRemove obsolete CSS text classes (#30576)
silverwind [Mon, 22 Apr 2024 11:21:06 +0000 (13:21 +0200)]
Remove obsolete CSS text classes (#30576)

- `.text-thin` and `.text-italic` are not present in CSS so were doing nothing and I removed them.
- `.text.middle` was unused so I removed it.
- `.text.italic` is replaced with `tw-italic`.
- `.text.normal` had exactly one use and it wasn't even needed.
- add a `muted` class to the link to `org_profile_avatar.tmpl`.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
5 months agoHide diff stats on empty PRs (#30629)
silverwind [Mon, 22 Apr 2024 10:48:14 +0000 (12:48 +0200)]
Hide diff stats on empty PRs (#30629)

When a PR is empty, e.g. has neither additions nor deletions, we don't
need to show this:

<img width="125" alt="Screenshot 2024-04-21 at 23 25 38"
src="https://github.com/go-gitea/gitea/assets/115237/0b987eb5-66f5-4b9b-b5aa-7e9e267e9b52">

5 months ago[skip ci] Updated licenses and gitignores
GiteaBot [Mon, 22 Apr 2024 00:25:56 +0000 (00:25 +0000)]
[skip ci] Updated licenses and gitignores

5 months agoUse correct hash for "git update-index" (#30626)
wxiaoguang [Mon, 22 Apr 2024 00:13:44 +0000 (08:13 +0800)]
Use correct hash for "git update-index" (#30626)

5 months agoFix repo home UI when there is no repo description (#30552)
wxiaoguang [Sun, 21 Apr 2024 23:47:31 +0000 (07:47 +0800)]
Fix repo home UI when there is no repo description (#30552)

Fix #30502 by a new approach.

![image](https://github.com/go-gitea/gitea/assets/2114189/22f48bca-82d1-45cc-b1b7-ee2344b81a76)

5 months agoFix dropdown text ellipsis (#30628)
wxiaoguang [Sun, 21 Apr 2024 23:14:33 +0000 (07:14 +0800)]
Fix dropdown text ellipsis (#30628)

Follow
https://github.com/go-gitea/gitea/pull/30547#discussion_r1573866519

Fix #30624

The Fomantic UI Dropdown wasn't designed to work that way, its "text"
element might contain images. So the "overflow" shouldn't be added to
any general dropdown text.

![image](https://github.com/go-gitea/gitea/assets/2114189/f6ceaabd-bc89-4bf2-baa2-a6f0324c1962)

5 months agofix(api): refactor branch and tag existence checks (#30618)
Bo-Yi Wu [Sun, 21 Apr 2024 22:19:59 +0000 (06:19 +0800)]
fix(api): refactor branch and tag existence checks (#30618)

- Update branch existence check to also include tag existence check
- Adjust error message for branch/tag existence check

ref: https://github.com/go-gitea/gitea/pull/30349

---------

Signed-off-by: appleboy <appleboy.tw@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Giteabot <teabot@gitea.io>
5 months agoAdd --skip-db option to dump command (#30613)
Kemal Zebari [Sun, 21 Apr 2024 21:32:12 +0000 (14:32 -0700)]
Add --skip-db option to dump command (#30613)

Attempts to resolve #28720.

---

Note that I am not a Gitea administrator so I don't normally use the
gitea CLI. Just saw this issue and wanted an opportunity to understand
how this subcommand works and see if I can add this feature :^)

I tested both with `--skip-db` and without and it appears to not add any
database-specific files to the generated archive i.e. I don't see a
`gitea-db.sql` or `gitea.db` file:
```console
$ TAGS="bindata sqlite sqlite_unlock_notify" make backend
Running go generate...
bindata for migration already up-to-date
bindata for options already up-to-date
bindata for public already up-to-date
bindata for templates already up-to-date
$ ./gitea dump --skip-db
2024/04/20 01:16:11 ...s/setting/session.go:77:loadSessionFrom() [I] Session Service Enabled
2024/04/20 01:16:11 ...s/storage/storage.go:176:initAttachments() [I] Initialising Attachment storage with type: local
2024/04/20 01:16:11 ...les/storage/local.go:33:NewLocalStorage() [I] Creating new Local Storage at /workspaces/gitea/data/attachments
2024/04/20 01:16:11 ...s/storage/storage.go:166:initAvatars() [I] Initialising Avatar storage with type: local
2024/04/20 01:16:11 ...les/storage/local.go:33:NewLocalStorage() [I] Creating new Local Storage at /workspaces/gitea/data/avatars
2024/04/20 01:16:11 ...s/storage/storage.go:192:initRepoAvatars() [I] Initialising Repository Avatar storage with type: local
2024/04/20 01:16:11 ...les/storage/local.go:33:NewLocalStorage() [I] Creating new Local Storage at /workspaces/gitea/data/repo-avatars
2024/04/20 01:16:11 ...s/storage/storage.go:186:initLFS() [I] Initialising LFS storage with type: local
2024/04/20 01:16:11 ...les/storage/local.go:33:NewLocalStorage() [I] Creating new Local Storage at /workspaces/gitea/data/lfs
2024/04/20 01:16:11 ...s/storage/storage.go:198:initRepoArchives() [I] Initialising Repository Archive storage with type: local
2024/04/20 01:16:11 ...les/storage/local.go:33:NewLocalStorage() [I] Creating new Local Storage at /workspaces/gitea/data/repo-archive
2024/04/20 01:16:11 ...s/storage/storage.go:208:initPackages() [I] Initialising Packages storage with type: local
2024/04/20 01:16:11 ...les/storage/local.go:33:NewLocalStorage() [I] Creating new Local Storage at /workspaces/gitea/data/packages
2024/04/20 01:16:11 ...s/storage/storage.go:219:initActions() [I] Initialising Actions storage with type: local
2024/04/20 01:16:11 ...les/storage/local.go:33:NewLocalStorage() [I] Creating new Local Storage at /workspaces/gitea/data/actions_log
2024/04/20 01:16:11 ...s/storage/storage.go:223:initActions() [I] Initialising ActionsArtifacts storage with type: local
2024/04/20 01:16:11 ...les/storage/local.go:33:NewLocalStorage() [I] Creating new Local Storage at /workspaces/gitea/data/actions_artifacts
2024/04/20 01:16:11 cmd/dump.go:172:runDump() [I] Dumping local repositories... /workspaces/gitea/data/gitea-repositories
2024/04/20 01:16:11 cmd/dump.go:195:runDump() [I] Skipping database
2024/04/20 01:16:11 cmd/dump.go:229:runDump() [I] Adding custom configuration file from /workspaces/gitea/custom/conf/app.ini
2024/04/20 01:16:11 cmd/dump.go:256:runDump() [I] Packing data directory.../workspaces/gitea/data
2024/04/20 01:16:11 cmd/dump.go:335:runDump() [I] Finish dumping in file /workspaces/gitea/gitea-dump-1713575771.zip
$ unzip /workspaces/gitea/gitea-dump-1713575771.zip -d example
Archive:  /workspaces/gitea/gitea-dump-1713575771.zip
. . .
$ ls example/
app.ini  custom  data  repos
$ ls example/data/
actions_artifacts  actions_log  avatars  home  indexers  jwt  queues  repo-archive  repo-avatars  tmp
```

Co-authored-by: Giteabot <teabot@gitea.io>
5 months agoFix flash on dashboard (#30572)
silverwind [Sun, 21 Apr 2024 20:24:56 +0000 (22:24 +0200)]
Fix flash on dashboard (#30572)

Fixes https://github.com/go-gitea/gitea/issues/30566, regression from
https://github.com/go-gitea/gitea/pull/30214.

5 months agochore: use errors.New to replace fmt.Errorf with no parameters will much better ...
Cheng [Sun, 21 Apr 2024 19:44:03 +0000 (03:44 +0800)]
chore: use errors.New to replace fmt.Errorf with no parameters will much better (#30621)

use errors.New to replace fmt.Errorf with no parameters will much better

5 months agoFix issue comment form and quick-submit (#30623)
wxiaoguang [Sun, 21 Apr 2024 17:00:04 +0000 (01:00 +0800)]
Fix issue comment form and quick-submit (#30623)

1. Rewrite initGlobalEnterQuickSubmit (by the way, remove jQuery)
2. Fix issue comment form layout

5 months agoUse maintained gziphandler (#30592)
Lunny Xiao [Sun, 21 Apr 2024 00:53:45 +0000 (08:53 +0800)]
Use maintained gziphandler (#30592)

Replace #27894

---------

Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
5 months ago[skip ci] Updated translations via Crowdin
GiteaBot [Sun, 21 Apr 2024 00:26:57 +0000 (00:26 +0000)]
[skip ci] Updated translations via Crowdin

5 months agoFix package list performance (#30520)
KN4CK3R [Sat, 20 Apr 2024 11:07:00 +0000 (13:07 +0200)]
Fix package list performance (#30520)

Fixes #28255

The new query uses the id field to sort by "newer". This most not be
correct (usually it is) but it's faster (see #28255).
If someone has a better idea, please propose changes.

Co-authored-by: Giteabot <teabot@gitea.io>
5 months agoClarify permission "HasAccess" behavior (#30585)
wxiaoguang [Sat, 20 Apr 2024 03:15:04 +0000 (11:15 +0800)]
Clarify permission "HasAccess" behavior (#30585)

Follow #30495

"HasAccess" behavior wasn't clear, to make it clear:

* Use a new name `HasAnyUnitAccess`, it will be easier to review related
code and permission problems.
* Separate everyone access mode to a separate field, then all calls to
HasAccess are reverted to old behavior before #30495.
* Add new tests.

---------

Co-authored-by: Giteabot <teabot@gitea.io>
5 months agoFix links in PyPI Simple Repository API page (#30594)
wxiaoguang [Sat, 20 Apr 2024 01:15:14 +0000 (09:15 +0800)]
Fix links in PyPI Simple Repository API page (#30594)

Thanks to @Zottelchen for looking into problem and proposing the fix.

Ref: https://github.com/astral-sh/uv/issues/3017 ,
https://peps.python.org/pep-0503/

This PR's change is from Zottelchen's work.

And I by the way rename the `$p` to `$pd` because `p` is used as
"package" in code, while `pd` is used as "package description".

----

Co-authored-by: Zottelchen
5 months agoUse action user as the trigger user of schedules (#30581)
yp05327 [Sat, 20 Apr 2024 00:35:29 +0000 (09:35 +0900)]
Use action user as the trigger user of schedules (#30581)

Follow https://github.com/go-gitea/gitea/pull/30357

When user push to default branch, the schedule trigger user will be the
user.
When disable then enable action units in settings, the schedule trigger
user will be action user.
When repo is a mirror, the schedule trigger user will be action user. (
before it will return error, fixed by #30357)

As scheduled job is a cron, the trigger user should be action user from
Gitea, not a real user.

---------

Co-authored-by: Giteabot <teabot@gitea.io>
5 months agoFix commit file status parser (#30602)
wxiaoguang [Fri, 19 Apr 2024 14:41:03 +0000 (22:41 +0800)]
Fix commit file status parser (#30602)

Try to fix  #30492

5 months agoFix HEAD method for robots.txt (#30603)
wxiaoguang [Fri, 19 Apr 2024 13:43:56 +0000 (21:43 +0800)]
Fix HEAD method for robots.txt (#30603)

Fix #30601

5 months agoFix project description rendering for org (#30587)
wxiaoguang [Fri, 19 Apr 2024 07:58:56 +0000 (15:58 +0800)]
Fix project description rendering for org (#30587)

Fix #30263

![image](https://github.com/go-gitea/gitea/assets/2114189/41cabe6c-f94a-4874-a26f-d01bb89bb28c)

Co-authored-by: Giteabot <teabot@gitea.io>
5 months agoFix changelog (main) (#30582)
wxiaoguang [Fri, 19 Apr 2024 06:08:30 +0000 (14:08 +0800)]
Fix changelog (main) (#30582)

1. The 1.21.11 changelog is missing
2. Split the old content to CHANGELOG-archived.md, to reduce the size of
CHANGELOG.md

5 months agoAvoid importing `modules/web/middleware` in `modules/session` (#30584)
Jason Song [Fri, 19 Apr 2024 04:03:53 +0000 (12:03 +0800)]
Avoid importing `modules/web/middleware` in `modules/session` (#30584)

Related to #30375.

It doesn't make sense to import `modules/web/middleware` and
`modules/setting` in `modules/web/session` since the last one is more
low-level.

And it looks like a workaround to call `DeleteLegacySiteCookie` in
`RegenerateSession`, so maybe we could reverse the importing by
registering hook functions.