]> source.dussan.org Git - gitea.git/log
gitea.git
11 months agoUnify two factor check (#27915) (#27929)
Giteabot [Mon, 6 Nov 2023 18:07:22 +0000 (02:07 +0800)]
Unify two factor check (#27915) (#27929)

Backport #27915 by @KN4CK3R

Fixes #27819

We have support for two factor logins with the normal web login and with
basic auth. For basic auth the two factor check was implemented at three
different places and you need to know that this check is necessary. This
PR moves the check into the basic auth itself.

Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
11 months agoRemove `known issue` section in Gitea Actions Doc (#27930) (#27938)
Giteabot [Mon, 6 Nov 2023 16:03:06 +0000 (00:03 +0800)]
Remove `known issue` section in Gitea Actions Doc (#27930) (#27938)

Backport #27930 by @lng2020

The bug has been fixed for several months in the
`docker/build-push-action`
The fix commit is
[d8823bfaed](https://github.com/docker/build-push-action/commit/d8823bfaed2a82c6f5d4799a2f8e86173c461aba)
as the Gitea Actions Doc mentioned too.

Co-authored-by: Nanguan Lin <70063547+lng2020@users.noreply.github.com>
11 months agoFix JS NPE when viewing specific range of PR commits (#27912) (#27923)
Giteabot [Mon, 6 Nov 2023 09:22:44 +0000 (17:22 +0800)]
Fix JS NPE when viewing specific range of PR commits (#27912) (#27923)

Backport #27912 by @delvh

This should be the easiest fix.
While other solutions might be possible that exterminate the root cause,
they will not be as trivial.

Co-authored-by: delvh <dev.lh@web.de>
11 months agoInstall poetry dependencies with --no-root (#27919) (#27920)
Giteabot [Mon, 6 Nov 2023 02:14:46 +0000 (10:14 +0800)]
Install poetry dependencies with --no-root (#27919) (#27920)

Backport #27919 by @silverwind

Poetry 1.7.0 or higher will print a warning otherwise, see discussions:

https://github.com/python-poetry/poetry/pull/8369
https://github.com/python-poetry/poetry/issues/1132

> --no-root Do not install the root package (the current project).

Co-authored-by: silverwind <me@silverwind.io>
11 months agoShow correct commit sha when viewing single commit diff (#27916) (#27921)
Giteabot [Mon, 6 Nov 2023 01:09:35 +0000 (09:09 +0800)]
Show correct commit sha when viewing single commit diff (#27916) (#27921)

Backport #27916 by @sebastian-sauer

Show the correct sha when viewing a single commit.

![image](https://github.com/go-gitea/gitea/assets/1135157/5f39a84e-11ed-4700-b40b-eb9da6e91bec)

Co-authored-by: sebastian-sauer <sauer.sebastian@gmail.com>
11 months agoFix 500 when deleting a dismissed review (#27903) (#27910)
Giteabot [Sun, 5 Nov 2023 13:59:11 +0000 (21:59 +0800)]
Fix 500 when deleting a dismissed review (#27903) (#27910)

Backport #27903 by @lng2020

Fix #27767
Add a test to ensure its behavior

Co-authored-by: Nanguan Lin <70063547+lng2020@users.noreply.github.com>
11 months agoRemove action runners on user deletion (#27902) (#27908)
Giteabot [Sun, 5 Nov 2023 13:20:00 +0000 (21:20 +0800)]
Remove action runners on user deletion (#27902) (#27908)

Backport #27902 by @earl-warren

- On user deletion, delete action runners that the user has created.
- Add a database consistency check to remove action runners that have
nonexistent belonging owner.
- Resolves https://codeberg.org/forgejo/forgejo/issues/1720

(cherry picked from commit 009ca7223dab054f7f760b7ccae69e745eebfabb)

Co-authored-by: Earl Warren <109468362+earl-warren@users.noreply.github.com>
Co-authored-by: Gusted <postmaster@gusted.xyz>
11 months agoBackport translations to v1.21 (#27899)
Denys Konovalov [Sat, 4 Nov 2023 12:33:38 +0000 (13:33 +0100)]
Backport translations to v1.21 (#27899)

I manually fixed most of the files so that used translation keys don't
get deleted.

11 months agoRemove set tabindex on view issue (#27892) (#27896)
Giteabot [Fri, 3 Nov 2023 15:25:11 +0000 (23:25 +0800)]
Remove set tabindex on view issue (#27892) (#27896)

Backport #27892 by @earl-warren

- Remove the set tabindex and instead let the browser figure out the
correct tab order.
- Resolves https://codeberg.org/forgejo/forgejo/issues/1626

Co-authored-by: Earl Warren <109468362+earl-warren@users.noreply.github.com>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
11 months agoFix DownloadFunc when migrating releases (#27887) (#27890)
Giteabot [Fri, 3 Nov 2023 08:29:30 +0000 (16:29 +0800)]
Fix DownloadFunc when migrating releases (#27887) (#27890)

Backport #27887 by @Zettat123

We should not use `asset.ID` in DownloadFunc because DownloadFunc is a
closure.

https://github.com/go-gitea/gitea/blob/1bf5527eac6b947010c8faf408f6747de2a2384f/services/migrations/gitea_downloader.go#L284-L295

A similar bug when migrating from GitHub has been fixed in #14703. This
PR fixes the bug when migrating from Gitea and GitLab.

Co-authored-by: Zettat123 <zettat123@gmail.com>
11 months agoFix http protocol auth (#27875) (#27876)
Giteabot [Thu, 2 Nov 2023 15:34:55 +0000 (23:34 +0800)]
Fix http protocol auth (#27875) (#27876)

Backport #27875 by @lunny

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
11 months agoReduce margin/padding on flex-list items and divider (#27872) (#27874)
Giteabot [Thu, 2 Nov 2023 05:24:03 +0000 (13:24 +0800)]
Reduce margin/padding on flex-list items and divider (#27872) (#27874)

Backport #27872 by @silverwind

Small CSS tweak, reduces margin/padding from 14px to 10px, which I think
looks better

11 months agorefactor postgres connection string building (#27723) (#27869)
Giteabot [Wed, 1 Nov 2023 23:19:02 +0000 (07:19 +0800)]
refactor postgres connection string building (#27723) (#27869)

Backport #27723 by @mpldr

This patchset changes the connection string builder to use net.URL and
the host/port parser to use the stdlib function for splitting host from
port. It also adds a footnote about a potentially required portnumber
for postgres UNIX sockets.

Fixes: #24552
Co-authored-by: Moritz Poldrack <33086936+mpldr@users.noreply.github.com>
11 months agoChange katex limits (#27823) (#27868)
Giteabot [Wed, 1 Nov 2023 21:26:45 +0000 (05:26 +0800)]
Change katex limits (#27823) (#27868)

Backport #27823 by @KN4CK3R

Fixes #27812

Use higher defaults again but limit the input size.

![grafik](https://github.com/go-gitea/gitea/assets/1666336/23cdf572-de30-4799-b9cf-ef386b1623b9)

Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
11 months agodoc: actions/act-runner: document running as a systemd service (#27844) (#27866)
Giteabot [Wed, 1 Nov 2023 17:18:01 +0000 (01:18 +0800)]
doc: actions/act-runner: document running as a systemd service (#27844) (#27866)

Backport #27844 by @nodiscc

This documents running `act-runner` as a systemd service under a
dedicated user account.

Co-authored-by: nodiscc <nodiscc@gmail.com>
11 months agoDelete repos of org when purge delete user (#27273) (#27728)
6543 [Wed, 1 Nov 2023 02:03:12 +0000 (03:03 +0100)]
Delete repos of org when purge delete user (#27273) (#27728)

Fixes https://codeberg.org/forgejo/forgejo/issues/1514

Backports #27273

---------

Co-authored-by: JakobDev <jakobdev@gmx.de>
11 months agoClean up template locale usage (#27856) (#27857)
wxiaoguang [Tue, 31 Oct 2023 16:35:55 +0000 (00:35 +0800)]
Clean up template locale usage (#27856) (#27857)

Backport #27856

The only conflict is `ThemeName` in `500.tmpl`, it has been resolved
manually by keeping using old
`{{.SignedUser.Theme}}{{else}}{{DefaultTheme}}`

11 months agoFix package webhook (#27839) (#27855)
Giteabot [Tue, 31 Oct 2023 10:26:28 +0000 (18:26 +0800)]
Fix package webhook (#27839) (#27855)

Backport #27839 by @lunny

Fix #23742

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
11 months agoAdd user secrets API integration tests (#27832) (#27852)
Giteabot [Tue, 31 Oct 2023 04:14:04 +0000 (12:14 +0800)]
Add user secrets API integration tests (#27832) (#27852)

Backport #27832 by @jbgomond

Adds the missing user secrets API integration tests so #27829 does not
happen again

Co-authored-by: Jean-Baptiste Gomond <dev@jbgomond.com>
11 months agoFix wrong relative path on obtain token from command line (#27850) (#27851)
Giteabot [Tue, 31 Oct 2023 03:36:22 +0000 (11:36 +0800)]
Fix wrong relative path on obtain token from command line (#27850) (#27851)

Backport #27850 by @lunny

Caused by #27845

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
11 months agodoc: actions/act-runner: document obtaining a runner registration token from gitea...
Giteabot [Tue, 31 Oct 2023 00:16:05 +0000 (08:16 +0800)]
doc: actions/act-runner: document obtaining a runner registration token from gitea CLI (#27845) (#27848)

11 months agoFix/upload artifact error windows (#27802) (#27840)
Giteabot [Mon, 30 Oct 2023 11:57:48 +0000 (19:57 +0800)]
Fix/upload artifact error windows (#27802) (#27840)

11 months agoAlways use whole user name as link (#27815) (#27838)
Giteabot [Mon, 30 Oct 2023 11:25:40 +0000 (19:25 +0800)]
Always use whole user name as link (#27815) (#27838)

Backport #27815 by @denyskon

Starting from #25790 this shared template only linked the username of
the user if both display name and username were shown. I experienced
myself always trying to click on the display name - I think it is
annoying for others too.

After:

![grafik](https://github.com/go-gitea/gitea/assets/47871822/a0e82127-b773-4ca4-890f-d18422a7bef2)

![grafik](https://github.com/go-gitea/gitea/assets/47871822/79efcf93-2f50-4fc4-ba15-afc6174be48c)

Co-authored-by: Denys Konovalov <kontakt@denyskon.de>
11 months agoFix bad method call when deleting user secrets via API (#27829) (#27831)
Giteabot [Sun, 29 Oct 2023 14:08:01 +0000 (22:08 +0800)]
Fix bad method call when deleting user secrets via API (#27829) (#27831)

Backport #27829 by @jbgomond

Fixed a little mistake when you deleting user secrets via the API. Found
it when working on #27725.
It should be backported to 1.21 I think.

Co-authored-by: Jean-Baptiste Gomond <dev@jbgomond.com>
11 months agoDockerfile small refactor (#27757) (#27826)
Giteabot [Sun, 29 Oct 2023 12:20:54 +0000 (20:20 +0800)]
Dockerfile small refactor (#27757) (#27826)

Backport #27757 by @nfsec

- Size and layer optimization,
- Maintaining consistency in definitions (comments, apk etc.),

Co-authored-by: Patryk KrawaczyƄski <nfsec@users.noreply.github.com>
11 months agoUpgrade xorm to 1.3.4 (#27807) (#27813)
Giteabot [Fri, 27 Oct 2023 12:17:27 +0000 (20:17 +0800)]
Upgrade xorm to 1.3.4 (#27807) (#27813)

Backport #27807 by @lng2020

Noticeable change:
Remove the `OrderBy("1") `
[patch](https://github.com/go-gitea/gitea/pull/27673#issuecomment-1768570142)
for mssql since xorm has [fixed
it](https://gitea.com/xorm/xorm/commit/0f085408afd85707635eadb2294ab52be04f3c0f).

Co-authored-by: Nanguan Lin <70063547+lng2020@users.noreply.github.com>
11 months agoChroma v2.10.0 (#27803) (#27805)
Giteabot [Fri, 27 Oct 2023 11:25:25 +0000 (19:25 +0800)]
Chroma v2.10.0 (#27803) (#27805)

Backport #27803 by @bt90

Bump the chroma version to v2.10.0:
https://github.com/alecthomas/chroma/releases/tag/v2.10.0

This release includes a better Java lexer
https://github.com/alecthomas/chroma/pull/873

Co-authored-by: bt90 <btom1990@googlemail.com>
11 months agoAdd dedicated class for empty placeholders (#27788) (#27792)
Giteabot [Thu, 26 Oct 2023 07:26:05 +0000 (15:26 +0800)]
Add dedicated class for empty placeholders (#27788) (#27792)

Backport #27788 by @silverwind

Fixes: https://github.com/go-gitea/gitea/issues/27784
<img width="1033" alt="Screenshot 2023-10-25 at 19 07 15"
src="https://github.com/go-gitea/gitea/assets/115237/1a363851-1a86-48cb-99ec-0a573371bb6e">
<img width="1051" alt="Screenshot 2023-10-25 at 19 07 41"
src="https://github.com/go-gitea/gitea/assets/115237/add4b606-2264-430a-af35-249ef005817f">

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
11 months agoClose all hashed buffers (#27787) (#27790)
Giteabot [Wed, 25 Oct 2023 20:24:25 +0000 (04:24 +0800)]
Close all hashed buffers (#27787) (#27790)

Backport #27787 by @KN4CK3R

Add missing `.Close()` calls. The current code does not delete the
temporary files if the data grows over 32mb.

Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
11 months agoAdd gap between diff boxes (#27776) (#27781)
Giteabot [Wed, 25 Oct 2023 01:09:08 +0000 (09:09 +0800)]
Add gap between diff boxes (#27776) (#27781)

Backport #27776 by @silverwind

Before (almost no gap between files):
<img width="1240" alt="Screenshot 2023-10-24 at 19 43 32"
src="https://github.com/go-gitea/gitea/assets/115237/30cdbdbc-d102-479c-89ce-3f68837ae0cd">

After (with 8px gap):
<img width="1241" alt="Screenshot 2023-10-24 at 19 43 22"
src="https://github.com/go-gitea/gitea/assets/115237/72b26a30-8730-4a36-8de9-be143b684b98">

Co-authored-by: silverwind <me@silverwind.io>
11 months agoDo not force creation of _cargo-index repo on publish (#27266) (#27765)
Giteabot [Tue, 24 Oct 2023 07:40:02 +0000 (15:40 +0800)]
Do not force creation of _cargo-index repo on publish (#27266) (#27765)

Backport #27266 by @merlleu

Hello there,
Cargo Index over HTTP is now prefered over git for package updates: we
should not force users who do not need the GIT repo to have the repo
created/updated on each publish (it can still be created in the packages
settings).

The current behavior when publishing is to check if the repo exist and
create it on the fly if not, then update it's content.
Cargo HTTP Index does not rely on the repo itself so this will be
useless for everyone not using the git protocol for cargo registry.

This PR only disable the creation on the fly of the repo when publishing
a crate.

This is linked to #26844 (error 500 when trying to publish a crate if
user is missing write access to the repo) because it's now optional.

Co-authored-by: merlleu <r.langdorph@gmail.com>
Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
11 months agoFix incorrect "tab" parameter for repo search sub-template (#27755) (#27764)
Giteabot [Tue, 24 Oct 2023 03:01:26 +0000 (11:01 +0800)]
Fix incorrect "tab" parameter for repo search sub-template (#27755) (#27764)

Backport #27755 by wxiaoguang

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
11 months agofix issues in translation file (#27699) (#27737)
Denys Konovalov [Tue, 24 Oct 2023 01:53:01 +0000 (03:53 +0200)]
fix issues in translation file (#27699) (#27737)

Backport #27699

- use correct comment sign for INI (`;`)
- remove duplicated `repo.branch.search` key
- remove duplicated spaces & similar

11 months agoFix label render containing invalid HTML (#27752) (#27762)
Giteabot [Tue, 24 Oct 2023 01:39:13 +0000 (09:39 +0800)]
Fix label render containing invalid HTML (#27752) (#27762)

Backport #27752 by @earl-warren

- The label HTML contained a quote that wasn't being closed.

Refs: https://codeberg.org/forgejo/forgejo/pulls/1651

(cherry picked from commit e2bc2c9a1fff482c49dbeb3a51e4e1c698bf506c)

Co-authored-by: Earl Warren <109468362+earl-warren@users.noreply.github.com>
Co-authored-by: Gusted <postmaster@gusted.xyz>
11 months agoFix `link-action` redirect network error (#27734) (#27749)
Giteabot [Mon, 23 Oct 2023 13:52:30 +0000 (21:52 +0800)]
Fix `link-action` redirect network error (#27734) (#27749)

Backport #27734 by @lng2020

<img width="823" alt="image"
src="https://github.com/go-gitea/gitea/assets/70063547/99da3d5a-c28a-4fd0-8ae0-88461a9142e2">

Co-authored-by: Nanguan Lin <70063547+lng2020@users.noreply.github.com>
Co-authored-by: 6543 <6543@obermui.de>
11 months agoFix duplicate project board when hitting `enter` key (#27746) (#27751)
Giteabot [Mon, 23 Oct 2023 13:04:53 +0000 (21:04 +0800)]
Fix duplicate project board when hitting `enter` key (#27746) (#27751)

Backport #27746 by @lng2020

When hitting the `enter` key to create a new project column, the request
is sent twice because the `submit` event and `key up` event are both
triggered.
Probably a better solution is to rewrite these parts of the code to
avoid using native jQuery but reuse the `form-fetch-action` class. But
it's beyond my ability.

Co-authored-by: Nanguan Lin <70063547+lng2020@users.noreply.github.com>
11 months agoFix incorrect ctx usage in defer function (#27740) (#27741)
wxiaoguang [Sun, 22 Oct 2023 14:36:49 +0000 (22:36 +0800)]
Fix incorrect ctx usage in defer function (#27740) (#27741)

11 months agofix labeler config on release/v1.21 (#27738)
Denys Konovalov [Sun, 22 Oct 2023 13:53:34 +0000 (15:53 +0200)]
fix labeler config on release/v1.21 (#27738)

Manual backport of #27525

11 months agoEnable followCursor for language stats bar (#27713) (#27739)
Giteabot [Sun, 22 Oct 2023 13:35:58 +0000 (21:35 +0800)]
Enable followCursor for language stats bar (#27713) (#27739)

Backport #27713 by @silverwind

Fixes: https://github.com/go-gitea/gitea/issues/27600
![](https://github.com/go-gitea/gitea/assets/115237/96743d90-0712-4f13-84ec-66f84e6ed2d7)

Also tested together with https://github.com/go-gitea/gitea/pull/27704,
works well.

Co-authored-by: silverwind <me@silverwind.io>
11 months agoAdd doctor dbconsistency fix to delete repos with no owner (#27290) (#27693)
6543 [Sun, 22 Oct 2023 00:21:41 +0000 (02:21 +0200)]
Add doctor dbconsistency fix to delete repos with no owner (#27290) (#27693)

Backport #27290

11 months agoFix org team endpoint (#27721) (#27727)
Giteabot [Sun, 22 Oct 2023 00:07:28 +0000 (08:07 +0800)]
Fix org team endpoint (#27721) (#27727)

Backport #27721 by @lng2020

Fix #27711

Co-authored-by: Nanguan Lin <70063547+lng2020@users.noreply.github.com>
11 months agoFeed UI Improvements (#27356) (#27717)
Giteabot [Sat, 21 Oct 2023 11:13:15 +0000 (19:13 +0800)]
Feed UI Improvements (#27356) (#27717)

Backport #27356 by @silverwind

Various improvements related to feeds:

- Fix markdown rendering
- Increase font size from 13px to default 14px via `flex-item`
- Add style to hashes
- Move the timestamp to title line. I realize it's not optimal for
translation, we may need to change all these translations

Before:
<img width="768" alt="Screenshot 2023-09-29 at 22 52 58"
src="https://github.com/go-gitea/gitea/assets/115237/edda8b84-23cf-4a43-90ad-a892798f4e6c">

After:
<img width="781" alt="Screenshot 2023-09-29 at 22 58 09"
src="https://github.com/go-gitea/gitea/assets/115237/7097474d-efcf-4f22-a2ab-834a4e25c4e8">

Co-authored-by: silverwind <me@silverwind.io>
11 months agoImprove diff tree spacing (#27714) (#27719)
Giteabot [Sat, 21 Oct 2023 10:44:58 +0000 (18:44 +0800)]
Improve diff tree spacing (#27714) (#27719)

Backport #27714 by @silverwind

1. Un-indent top-level items, matching GitHub rendering
2. Increase item padding and add 1px gap between items

Before and After:

<img width="247" alt="Screenshot 2023-10-20 at 18 37 32"
src="https://github.com/go-gitea/gitea/assets/115237/43c1ce86-1814-4a8a-9dd2-0c4a82a2be7c">
<img width="241" alt="Screenshot 2023-10-20 at 18 40 46"
src="https://github.com/go-gitea/gitea/assets/115237/b541b85b-c428-4903-becd-773ae5807495">

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: 6543 <m.huber@kithara.com>
11 months agoImprove feed icons and feed merge text color (#27498) (#27716)
Giteabot [Sat, 21 Oct 2023 10:29:06 +0000 (18:29 +0800)]
Improve feed icons and feed merge text color (#27498) (#27716)

Backport #27498 by @silverwind

1. Improve various feed icons
2. Fix merge message color

<img width="763" alt="image"
src="https://github.com/go-gitea/gitea/assets/115237/3f5bcb23-6d90-4c63-85f2-46bd7e1c96d6">
<img width="769" alt="image"
src="https://github.com/go-gitea/gitea/assets/115237/466c37b4-e2f4-42bb-922d-b86596cdc6d0">

Fixes: https://github.com/go-gitea/gitea/issues/27495
Continues: https://github.com/go-gitea/gitea/pull/27356

Co-authored-by: silverwind <me@silverwind.io>
11 months ago[FIX] resolve confusing colors in languages stats by insert a gap (#27704) (#27715)
Giteabot [Fri, 20 Oct 2023 18:04:44 +0000 (02:04 +0800)]
[FIX] resolve confusing colors in languages stats by insert a gap (#27704) (#27715)

Backport #27704 by @RightFS

The current language stats are too obsessed with color matching. Similar
colors are always next to each other. It is a bit troublesome to find
the place where the color matching is generated, so just follow the
example of github and add a gap.

## before

<img width="883" alt="image"
src="https://github.com/go-gitea/gitea/assets/12915306/cf54430c-616c-4b37-b561-5a37c20b2d94">

## after

<img width="877" alt="image"
src="https://github.com/go-gitea/gitea/assets/12915306/e518ea36-2b8f-4f11-a867-a58dc393db85">

Co-authored-by: MrDevil <Right.Sun@outlook.com>
11 months agoFix sticky diff header background (#27697) (#27712)
Giteabot [Fri, 20 Oct 2023 15:44:46 +0000 (23:44 +0800)]
Fix sticky diff header background (#27697) (#27712)

Backport #27697 by @silverwind

Fixes: https://github.com/go-gitea/gitea/issues/27604
Add negative margins so the header covers any shadow of active elements.
No rendering change of the content of the header because the padding
counteracts the effect.

<img width="128" alt="image"
src="https://github.com/go-gitea/gitea/assets/115237/3d0f55b6-9351-4985-a290-da9a92d15b4e">

Co-authored-by: silverwind <me@silverwind.io>
11 months agoAdapt `.changelog.yml` to new labeling system (#27701) (#27702)
Giteabot [Thu, 19 Oct 2023 22:29:50 +0000 (06:29 +0800)]
Adapt `.changelog.yml` to new labeling system (#27701) (#27702)

Backport #27701 by @delvh

Otherwise, it is not possible anymore to generate changelogs.

Co-authored-by: delvh <dev.lh@web.de>
11 months agocleanup repo details icons/labels (#27644) (#27654) v1.21.0-rc2
Giteabot [Thu, 19 Oct 2023 20:04:24 +0000 (04:04 +0800)]
cleanup repo details icons/labels (#27644) (#27654)

Backport #27644 by @denyskon

Fix #27596

Change confusing behavior when showing information about a repo via labels and icons.
Implement changes proposed by @lng2020 in
https://github.com/go-gitea/gitea/pull/27627#pullrequestreview-1678787673.

Co-authored-by: Denys Konovalov <kontakt@denyskon.de>
11 months agoFix required checkboxes in issue forms (#27592) (#27692)
Giteabot [Thu, 19 Oct 2023 13:35:29 +0000 (21:35 +0800)]
Fix required checkboxes in issue forms (#27592) (#27692)

Backport #27592 by @JakobDev

If you set a checkbox as required in a issue form at the moment, the
checkbox is checked and read only, what does not make much sense. With
this PR, the Checkbox actually needs to be checked. The label supports
now also Markdown. This matches GitHub's behaviour.

And yes, I know the CSS is a ugly workaround. It looks like the given
CSS code is part Fomantic and I don't know how to change that. The
Maintainers are free to change that.

![grafik](https://github.com/go-gitea/gitea/assets/15185051/3f35be75-b0b4-42a7-9048-a4970384a035)

Co-authored-by: JakobDev <jakobdev@gmx.de>
11 months agoUpgrade xorm (#27673) (#27691)
Giteabot [Thu, 19 Oct 2023 10:56:39 +0000 (18:56 +0800)]
Upgrade xorm (#27673) (#27691)

Backport #27673 by @lng2020

Related to https://gitea.com/xorm/xorm/pulls/2341

Co-authored-by: Nanguan Lin <70063547+lng2020@users.noreply.github.com>
11 months agoAlways delete existing scheduled action tasks (#27662) (#27688)
Giteabot [Thu, 19 Oct 2023 07:37:20 +0000 (15:37 +0800)]
Always delete existing scheduled action tasks (#27662) (#27688)

Backport #27662 by @KN4CK3R

Fixes #27650

Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
11 months agoClipboard copy enhancements (#27669) (#27681)
Giteabot [Wed, 18 Oct 2023 16:23:28 +0000 (00:23 +0800)]
Clipboard copy enhancements (#27669) (#27681)

Backport #27669 by @silverwind

1. Do not show temporary tooltips that are triggered from within
dropdowns. Previously this resulted in the tooltip being stuck to
top-left of the page like seen on issue comment URL copy. I could not
figure out any tippy options that prevent this, so I think it's better
to just not show it.
1. Refactor `initGlobalCopyToClipboardListener` so that it does not run
a often useless `document.querySelector` on every click, make
`data-clipboard-text-type` work with `data-clipboard-target`. No use in
current code base but still good to have. Finally some minor code
cleanup in the function.

Point 1 is for this copy button:

<img width="229" alt="image"
src="https://github.com/go-gitea/gitea/assets/115237/81f34746-8ea5-43d9-8c6f-f6f417a9e4ad">

Co-authored-by: silverwind <me@silverwind.io>
11 months agoSupport allowed hosts for webhook to work with proxy (#27655) (#27675)
Giteabot [Wed, 18 Oct 2023 13:07:52 +0000 (21:07 +0800)]
Support allowed hosts for webhook to work with proxy (#27655) (#27675)

Backport #27655 by @wolfogre

When `webhook.PROXY_URL` has been set, the old code will check if the
proxy host is in `ALLOWED_HOST_LIST` or reject requests through the
proxy. It requires users to add the proxy host to `ALLOWED_HOST_LIST`.
However, it actually allows all requests to any port on the host, when
the proxy host is probably an internal address.

But things may be even worse. `ALLOWED_HOST_LIST` doesn't really work
when requests are sent to the allowed proxy, and the proxy could forward
them to any hosts.

This PR fixes it by:

- If the proxy has been set, always allow connectioins to the host and
port.
- Check `ALLOWED_HOST_LIST` before forwarding.

Co-authored-by: Jason Song <i@wolfogre.com>
12 months agoFix poster is not loaded in get default merge message (#27657) (#27666)
Giteabot [Tue, 17 Oct 2023 16:20:35 +0000 (00:20 +0800)]
Fix poster is not loaded in get default merge message (#27657) (#27666)

Backport #27657 by @lunny

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
12 months agoHide archived labels by default from the suggestions when assigning labels for an...
Giteabot [Tue, 17 Oct 2023 14:46:35 +0000 (22:46 +0800)]
Hide archived labels by default from the suggestions when assigning labels for an issue (#27451) (#27661)

Backport #27451 by @puni9869

Followup of #27115
Finally closes #25237

## Screenshots
### Issue Sidebar
<img width="513" alt="image"
src="https://github.com/go-gitea/gitea/assets/80308335/9f7fda2f-5a03-4684-8619-fd3498a95b41">

### PR sidebar
<img width="367" alt="image"
src="https://github.com/go-gitea/gitea/assets/80308335/53db9b64-faec-4a67-91d6-76945596a469">

### PR sidebar with archived labels shown
<img width="352" alt="image"
src="https://github.com/go-gitea/gitea/assets/80308335/9dc5050f-4e69-4f76-bb83-582480a2281e">

Signed-off-by: puni9869 <punitinani1@hotmail.com>
Co-authored-by: puni9869 <80308335+puni9869@users.noreply.github.com>
Co-authored-by: silverwind <me@silverwind.io>
12 months agoImprove dropdown button alignment and fix hover bug (#27632) (#27637)
Giteabot [Mon, 16 Oct 2023 08:15:15 +0000 (16:15 +0800)]
Improve dropdown button alignment and fix hover bug (#27632) (#27637)

Backport #27632 by @wxiaoguang

1. fix #27631 , and add samples to devtest page
2. fix incorrect color for "ui dropdown button" when hover

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
12 months agoImprove retrying index issues (#27554) (#27634)
Giteabot [Mon, 16 Oct 2023 01:55:53 +0000 (09:55 +0800)]
Improve retrying index issues (#27554) (#27634)

Backport #27554 by @wolfogre

Fix #27540

Co-authored-by: Jason Song <i@wolfogre.com>
12 months agoFix 404 when deleting Docker package with an internal version (#27615) (#27630)
Giteabot [Sun, 15 Oct 2023 10:08:04 +0000 (18:08 +0800)]
Fix 404 when deleting Docker package with an internal version (#27615) (#27630)

Backport #27615 by @lng2020

close #27601
The Docker registry has an internal version, which leads to 404

Co-authored-by: Nanguan Lin <70063547+lng2020@users.noreply.github.com>
12 months agoChange the default branch in the agit docs (#27621) (#27623)
Giteabot [Sun, 15 Oct 2023 01:16:15 +0000 (09:16 +0800)]
Change the default branch in the agit docs (#27621) (#27623)

Backport #27621 by @lng2020

It's main now.
relevant #27579

Co-authored-by: Nanguan Lin <70063547+lng2020@users.noreply.github.com>
12 months agoBackport manually for a tmpl issue in v1.21 (#27612)
Nanguan Lin [Sat, 14 Oct 2023 11:51:58 +0000 (19:51 +0800)]
Backport manually for a tmpl issue in v1.21 (#27612)

backport #27514
close #27607

12 months agoFix build errors on BSD (in BSDMakefile) (#27594) (#27608)
Giteabot [Sat, 14 Oct 2023 07:29:55 +0000 (15:29 +0800)]
Fix build errors on BSD (in BSDMakefile) (#27594) (#27608)

Backport #27594 by @sryze

1. `make build` fails because `||` and `&&` have the same precedence in
sh/bash, so the `false` command always evaluated (leading to an error).

   ```
   + which gmake /usr/local/bin/gmake
   + false

   *** Failed target:  .BEGIN
*** Failed command: which "gmake" || printf "Error: GNU Make is
required!\n\n" 1>&2 && false
   *** Error code 1
   ```

2. When `GPREFIX` is set to an empty string with quotation marks,
`gmake` mistakenly thinks that it's a file name:

   ``` gmake: *** empty string invalid as file name.  Stop. ```

Co-authored-by: Sergey Zolotarev <sryze@protonmail.com>
12 months agoUpgrade go dependencies (#27599) (#27609)
Chongyi Zheng [Fri, 13 Oct 2023 17:23:17 +0000 (13:23 -0400)]
Upgrade go dependencies (#27599) (#27609)

Backport #27599

Upgrade all dependencies in `go.mod`

`golang.org/x/net` v0.17.0 also fixes
[CVE-2023-39325](https://github.com/advisories/GHSA-4374-p667-p6c8)

Co-authored-by: delvh <dev.lh@web.de>
12 months agoKeep filter when showing unfiltered results on explore page (#27192) (#27589)
Giteabot [Thu, 12 Oct 2023 00:56:21 +0000 (08:56 +0800)]
Keep filter when showing unfiltered results on explore page (#27192) (#27589)

Backport #27192 by @JakobDev

Fixes https://codeberg.org/Codeberg/Community/issues/1302

Co-authored-by: JakobDev <jakobdev@gmx.de>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
12 months agoDon't show Link to TOTP if not set up (#27585) (#27588)
Giteabot [Wed, 11 Oct 2023 20:59:21 +0000 (04:59 +0800)]
Don't show Link to TOTP if not set up (#27585) (#27588)

Backport #27585 by @JakobDev

Fixes https://codeberg.org/forgejo/forgejo/issues/1592

When login in with WebAuth, the page has a link to use TOTP instead.
This link is always displayed, no matter if the User has set up TOTP or
not, which do of cause not work for those who have not.

Co-authored-by: JakobDev <jakobdev@gmx.de>
12 months agoFix data-race bug when accessing task.LastRun (#27584) (#27586)
Giteabot [Wed, 11 Oct 2023 15:27:38 +0000 (23:27 +0800)]
Fix data-race bug when accessing task.LastRun (#27584) (#27586)

Backport #27584 by @wxiaoguang

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
12 months agoReplace ajax with fetch, improve image diff (#27267) (#27583)
Giteabot [Wed, 11 Oct 2023 14:12:31 +0000 (22:12 +0800)]
Replace ajax with fetch, improve image diff (#27267) (#27583)

Backport #27267 by @silverwind

1. Dropzone attachment removal, pretty simple replacement
2. Image diff: The previous code fetched every image twice, once via
`img[src]` and once via `$.ajax`. Now it's only fetched once and a
second time only when necessary. The image diff code was partially
rewritten.

Co-authored-by: silverwind <me@silverwind.io>
12 months agofully replace drone with actions (#27556) (#27575)
Giteabot [Wed, 11 Oct 2023 12:03:06 +0000 (20:03 +0800)]
fully replace drone with actions (#27556) (#27575)

Backport #27556 by @techknowlogick

this builds binaries and docker images for tags

Co-authored-by: techknowlogick <techknowlogick@gitea.com>
12 months agoshow manual cron run's last time (#27544) (#27577)
Giteabot [Wed, 11 Oct 2023 11:26:34 +0000 (19:26 +0800)]
show manual cron run's last time (#27544) (#27577)

Backport #27544 by @earl-warren

- Currently in the cron tasks, the 'Previous Time' only displays the
previous time of when the cron library executes the function, but not
any of the manual executions of the task.
- Store the last run's time in memory in the Task struct and use that,
when that time is later than time that the cron library has executed
this task.
- This ensures that if an instance admin manually starts a task, there's
feedback that this task is/has been run, because the task might be run
that quick, that the status icon already has been changed to an
checkmark,
- Tasks that are executed at startup now reflect this as well, as the
time of the execution of that task on startup is now being shown as
'Previous Time'.
- Added integration tests for the API part, which is easier to test
because querying the HTML table of cron tasks is non-trivial.
- Resolves https://codeberg.org/forgejo/forgejo/issues/949

(cherry picked from commit fd34fdac1408ece6b7d9fe6a76501ed9a45d06fa)

Co-authored-by: Earl Warren <109468362+earl-warren@users.noreply.github.com>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
Co-authored-by: silverwind <me@silverwind.io>
12 months agoRevert "Fix pr template (#27436)" (#27567)
Nanguan Lin [Wed, 11 Oct 2023 03:11:04 +0000 (11:11 +0800)]
Revert "Fix pr template (#27436)" (#27567)

Reverts backport go-gitea/gitea#27440
Fix #27564

12 months agoFix attachment download bug (#27486) (#27571)
Giteabot [Wed, 11 Oct 2023 02:39:12 +0000 (10:39 +0800)]
Fix attachment download bug (#27486) (#27571)

Backport #27486 by @lunny

Fix #27204

This PR allows `/<username>/<reponame>/attachments/<uuid>` access with
personal access token and also changed attachments API download url to
it so it can be download correctly.

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
12 months agoIncrease queue length (#27555) (#27562)
Giteabot [Tue, 10 Oct 2023 12:22:26 +0000 (20:22 +0800)]
Increase queue length (#27555) (#27562)

Backport #27555 by @wolfogre

It should be OK to increase the default queue length since the default
type is "level".

IMO, the old default length (100) is a little too small. See
https://github.com/go-gitea/gitea/issues/27540#issuecomment-1754269491

IIRC, a larger length could lead to more memory usage only when the type
is "channel," but it's an obscure case. Otherwise, it's just a limit
(for "level" or "redis").

Co-authored-by: Jason Song <i@wolfogre.com>
12 months agoRespect SSH.KeygenPath option when calculating ssh key fingerprints (#27536) (#27551)
Giteabot [Tue, 10 Oct 2023 07:37:58 +0000 (15:37 +0800)]
Respect SSH.KeygenPath option when calculating ssh key fingerprints (#27536) (#27551)

Backport #27536 by @picsel2

Fixes #27535

Co-authored-by: Sebastian Grabowski <sebastian@grabel.de>
12 months agoAvoid run change title process when the title is same (#27467) (#27558)
yp05327 [Tue, 10 Oct 2023 07:01:46 +0000 (16:01 +0900)]
Avoid run change title process when the title is same (#27467) (#27558)

Backport #27467 manually.

12 months agoRemove max-width and add hide text overflow (#27359) (#27550)
Giteabot [Tue, 10 Oct 2023 02:02:26 +0000 (10:02 +0800)]
Remove max-width and add hide text overflow (#27359) (#27550)

Backport #27359 by @kdumontnu

Closes https://github.com/go-gitea/gitea/issues/27358

Co-authored-by: Kyle D <kdumontnu@gmail.com>
12 months agouse hosted runners for nightly actions (#27485) (#27488)
Giteabot [Mon, 9 Oct 2023 18:10:42 +0000 (02:10 +0800)]
use hosted runners for nightly actions (#27485) (#27488)

Backport #27485 by @techknowlogick

I'm temporarily unable to properly evaluate actuated runners, and so I'm
switching back to hosted runners until I am able to focus on that again.

---------

Co-authored-by: techknowlogick <techknowlogick@gitea.com>
Co-authored-by: silverwind <me@silverwind.io>
12 months agoswitch to using official AWS step in release nightly (#27532) (#27547)
Giteabot [Mon, 9 Oct 2023 17:53:45 +0000 (01:53 +0800)]
switch to using official AWS step in release nightly (#27532) (#27547)

Backport #27532 by @techknowlogick

`jakejarvis/s3-sync-action@master` is out of date, and using official
actions is always recommended

Co-authored-by: techknowlogick <techknowlogick@gitea.com>
12 months agoFix `environment-to-ini` inherited key bug (#27543) (#27546)
Giteabot [Mon, 9 Oct 2023 17:46:58 +0000 (01:46 +0800)]
Fix `environment-to-ini` inherited key bug (#27543) (#27546)

Backport #27543 by @wxiaoguang

Fix  #27541

The INI package has a quirk: by default, the keys are inherited.
When maintaining the keys, the newly added sub key should not be
affected by the parent key.

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
12 months agoapi: GetPullRequestCommits: return file list (#27483) (#27539)
Giteabot [Mon, 9 Oct 2023 12:21:35 +0000 (20:21 +0800)]
api: GetPullRequestCommits: return file list (#27483) (#27539)

Backport #27483 by @msantos

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

---
Patch tested:

```json
[
  {
    "url": "http://100.115.92.198:9292/api/v1/repos/msantos/test/git/commits/7664dcb44167e0f9efd994e4ca6a9164694adc27",
    "sha": "7664dcb44167e0f9efd994e4ca6a9164694adc27",
    "created": "2023-10-06T09:57:08-04:00",
    "html_url": "http://100.115.92.198:9292/msantos/test/commit/7664dcb44167e0f9efd994e4ca6a9164694adc27",
...
    "files": [
      {
        "filename": "README.md",
        "status": "modified"
      }
    ],
    "stats": {
      "total": 2,
      "additions": 2,
      "deletions": 0
    }
  }
]
```

Co-authored-by: Michael Santos <michael.santos@gmail.com>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
12 months agoImprove dropdown's behavior when there is a search input in menu (#27526) (#27534)
Giteabot [Mon, 9 Oct 2023 07:15:18 +0000 (15:15 +0800)]
Improve dropdown's behavior when there is a search input in menu (#27526) (#27534)

Backport #27526 by @wxiaoguang

Follow #27225

The change in #27225 is not ideal, this should be the complete fix:
support the layout which Fomantic doesn't support.

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
12 months agoRestore warning commit status (#27504) (#27529)
Giteabot [Mon, 9 Oct 2023 03:56:02 +0000 (11:56 +0800)]
Restore warning commit status (#27504) (#27529)

Backport #27504 by @silverwind

Partial revert of https://github.com/go-gitea/gitea/pull/25839. This
commit status is used by a number of external integrations, so I think
we should not remove it (See
https://github.com/go-gitea/gitea/pull/25839#issuecomment-1729002077).
This is a rare case where an existing migration needed to be alterted to
avoid data loss.

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: delvh <dev.lh@web.de>
12 months agoUpdate JS and PY dependencies (#27501) (#27518)
silverwind [Sun, 8 Oct 2023 17:31:33 +0000 (19:31 +0200)]
Update JS and PY dependencies (#27501) (#27518)

Backport https://github.com/go-gitea/gitea/pull/27501 to 1.21

- Update all JS and PY dependencies
- Enable eslint `prefer-object-has-own` and autofix issue
- Fix styling on citation buttons
- Tested citation, mermaid, monaco, swagger, katex

Citation button issue was that these buttons were not filled:

<img width="136" alt="Screenshot 2023-10-07 at 14 05 08"
src="https://github.com/go-gitea/gitea/assets/115237/435f0c91-28ac-46b3-bae4-dad768b29c05">

Co-authored-by: techknowlogick <techknowlogick@gitea.com>
Co-authored-by: Giteabot <teabot@gitea.io>
12 months agoAdd hover background to wiki list page (#27507) (#27521)
Giteabot [Sun, 8 Oct 2023 13:48:51 +0000 (21:48 +0800)]
Add hover background to wiki list page (#27507) (#27521)

Backport #27507 by @BLumia

This patch adds a hover background for the wiki row in wiki list page,
which make its behavior more close to repo's file list page.

This patch also make the wiki-git-entry visible on the row is hovered
instead of the cel, so users won't be confused since the 'grid' is not
visible from the web page.

After the patch: (when the wiki named 'Home' is hovered)

![image](https://github.com/go-gitea/gitea/assets/10095765/f6c67c41-ad54-4ce4-a3b1-8c7551396ce0)

Co-authored-by: Gary Wang <git@blumia.net>
12 months agoFix mermaid flowchart margin issue (#27503) (#27516)
silverwind [Sun, 8 Oct 2023 13:31:47 +0000 (15:31 +0200)]
Fix mermaid flowchart margin issue (#27503) (#27516)

Backport https://github.com/go-gitea/gitea/pull/27503 to 1.21

Fixes: https://github.com/go-gitea/gitea/issues/27435
Related: https://github.com/mermaid-js/mermaid/issues/4907

<img width="924" alt="image"

src="https://github.com/go-gitea/gitea/assets/115237/494a1d2e-4c56-48d0-9843-82a5e5aa977e">

12 months agobump go-deps (#27489) (#27493)
Giteabot [Sun, 8 Oct 2023 00:07:09 +0000 (08:07 +0800)]
bump go-deps (#27489) (#27493)

Backport #27489 by @techknowlogick

---------

Co-authored-by: techknowlogick <techknowlogick@gitea.com>
Co-authored-by: silverwind <me@silverwind.io>
12 months agoEnable markdownlint `no-duplicate-header` (#27500) (#27506)
Giteabot [Sat, 7 Oct 2023 13:41:41 +0000 (21:41 +0800)]
Enable markdownlint `no-duplicate-header` (#27500) (#27506)

Backport #27500 by @silverwind

Duplicate headers in a single Markdown document are problemlematic
because the auto-generated links won't be stable. Enable this rule with
no exceptions which is also the default of `markdownlint`. For example:

```md
# A
## Example
# B
## Example
```
Docasaurus will generated `example` and `example-1` links for this. If
the first heading is altered, the link `example` will unexpectedly move
to the second example heading.

Ref: https://github.com/go-gitea/gitea/pull/27461#discussion_r1347987659

Co-authored-by: silverwind <me@silverwind.io>
12 months agoFix panic in storageHandler (#27446) (#27479) v1.21.0-rc1
Giteabot [Fri, 6 Oct 2023 14:51:26 +0000 (22:51 +0800)]
Fix panic in storageHandler (#27446) (#27479)

Backport #27446 by @sryze

storageHandler() is written as a middleware but is used as an endpoint
handler, and thus `next` is actually `nil`, which causes a null pointer
dereference when a request URL does not match the pattern (where it
calls `next.ServerHTTP()`).

Example CURL command to trigger the panic:

```
curl -I "http://yourhost/gitea//avatars/a"
```

Fixes #27409

---

Note: the diff looks big but it's actually a small change - all I did
was to remove the outer closure (and one level of indentation) ~and
removed the HTTP method and pattern checks as they seem redundant
because go-chi already does those checks~. You might want to check "Hide
whitespace" when reviewing it.

Alternative solution (a bit simpler): append `, misc.DummyOK` to the
route declarations that utilize `storageHandler()` - this makes it
return an empty response when the URL is invalid. I've tested this one
and it works too. Or maybe it would be better to return a 400 error in
that case (?)

Co-authored-by: Sergey Zolotarev <sryze@outlook.com>
12 months agoRevert #27426 (#27474)
delvh [Fri, 6 Oct 2023 12:47:45 +0000 (14:47 +0200)]
Revert #27426 (#27474)

Apparently, we didn't backport one of the refactoring PRs which caused
the fixup we backported to fail.

Fixes: https://github.com/go-gitea/gitea/issues/27473
12 months agoDon't let API add 2 exclusive labels from same scope (#27433) (#27460)
Giteabot [Thu, 5 Oct 2023 21:06:31 +0000 (05:06 +0800)]
Don't let API add 2 exclusive labels from same scope (#27433) (#27460)

Backport #27433 by @JakobDev

Fixes #27380

Co-authored-by: JakobDev <jakobdev@gmx.de>
12 months agoRefactor system setting (#27000) (#27452)
Giteabot [Thu, 5 Oct 2023 10:37:59 +0000 (18:37 +0800)]
Refactor system setting (#27000) (#27452)

Backport #27000 by @wxiaoguang

This PR reduces the complexity of the system setting system.

It only needs one line to introduce a new option, and the option can be
used anywhere out-of-box.

It is still high-performant (and more performant) because the config
values are cached in the config system.

![image](https://github.com/go-gitea/gitea/assets/2114189/f8cdd743-1145-41ab-9f8f-3996aa97d440)

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
12 months agoWhen comparing with an non-exist repository, return 404 but 500 (#27437) (#27442)
Giteabot [Wed, 4 Oct 2023 14:41:57 +0000 (22:41 +0800)]
When comparing with an non-exist repository, return 404 but 500 (#27437) (#27442)

Backport #27437 by @lunny

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
12 months agoFix pr template (#27436) (#27440)
Giteabot [Wed, 4 Oct 2023 12:56:02 +0000 (20:56 +0800)]
Fix pr template (#27436) (#27440)

Backport #27436 by @lunny

Fix #27431

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
12 months agoFix missing `ctx` in new_form.tmpl (#27434) (#27438)
Giteabot [Wed, 4 Oct 2023 12:12:06 +0000 (20:12 +0800)]
Fix  missing `ctx`  in new_form.tmpl  (#27434) (#27438)

Backport #27434 by @CaiCandong

Fix  #27432
Regression of #27265

Co-authored-by: CaiCandong <50507092+CaiCandong@users.noreply.github.com>
12 months agoFix yet another `ctx` template bug (#27417) (#27426)
Giteabot [Wed, 4 Oct 2023 07:52:57 +0000 (15:52 +0800)]
Fix yet another `ctx` template bug (#27417) (#27426)

Backport #27417 by @delvh

Fixes #27416

Co-authored-by: delvh <dev.lh@web.de>
12 months agoUse flex-container for repo and org settings (#27418) (#27430)
Giteabot [Wed, 4 Oct 2023 07:20:43 +0000 (15:20 +0800)]
Use flex-container for repo and org settings (#27418) (#27430)

Backport #27418 by @silverwind

Same as https://github.com/go-gitea/gitea/pull/26046 but for repo and
org settings pages, reducing the margins between the boxes:

<img width="1247" alt="Screenshot 2023-10-03 at 23 25 19"
src="https://github.com/go-gitea/gitea/assets/115237/4e68ad5e-5fdc-4466-aefb-ec71bf411d45">
<img width="1255" alt="Screenshot 2023-10-03 at 23 27 12"
src="https://github.com/go-gitea/gitea/assets/115237/9068369b-a75d-401e-8b8d-3bd4bbe097dc">

Co-authored-by: silverwind <me@silverwind.io>
12 months agoAdd Index to `action.user_id` (#27403) (#27425)
Giteabot [Wed, 4 Oct 2023 06:53:00 +0000 (14:53 +0800)]
Add Index to `action.user_id` (#27403) (#27425)

Backport #27403 by @JakobDev

Another Column that needs a Index. Found at
https://codeberg.org/forgejo/discussions/issues/61#issuecomment-1258744.

Co-authored-by: JakobDev <jakobdev@gmx.de>
12 months agoAdd 1.20.5 changelog (#27404) (#27412)
Lunny Xiao [Tue, 3 Oct 2023 14:21:19 +0000 (22:21 +0800)]
Add 1.20.5 changelog (#27404) (#27412)

frontend #27404

12 months agoDon't use subselect in `DeleteIssuesByRepoID` (#27332) (#27408)
Giteabot [Tue, 3 Oct 2023 09:59:45 +0000 (17:59 +0800)]
Don't use subselect in `DeleteIssuesByRepoID` (#27332) (#27408)

Backport #27332 by @JakobDev

Part of https://codeberg.org/forgejo/discussions/issues/61

This is workaround for a bug in MariaDB

Co-authored-by: JakobDev <jakobdev@gmx.de>
12 months agoAdd support for HEAD ref in /src/branch and /src/commit routes (#27384) (#27407)
Giteabot [Tue, 3 Oct 2023 08:13:49 +0000 (16:13 +0800)]
Add support for HEAD ref in /src/branch and /src/commit routes (#27384) (#27407)

Backport #27384 by @rbhz

Add support for HEAD in paths:
```
/src/branch/HEAD/README.md
/src/commit/HEAD/README.md
```

Closes #26920

Co-authored-by: Kirill Sorokin <48334247+rbhz@users.noreply.github.com>
12 months agoMake Actions tasks/jobs timeouts configurable by the user (#27400) (#27402)
Giteabot [Tue, 3 Oct 2023 02:26:35 +0000 (10:26 +0800)]
Make Actions tasks/jobs timeouts configurable by the user (#27400) (#27402)

Backport #27400 by @fantognazza

With this PR we added the possibility to configure the Actions timeouts
values for killing tasks/jobs.
Particularly this enhancement is closely related to the `act_runner`
configuration reported below:
```
# The timeout for a job to be finished.
# Please note that the Gitea instance also has a timeout (3h by default) for the job.
# So the job could be stopped by the Gitea instance if it's timeout is shorter than this.
timeout: 3h
```

---

Setting the corresponding key in the INI configuration file, it is
possible to let jobs run for more than 3 hours.

Signed-off-by: Francesco Antognazza <francesco.antognazza@gmail.com>
12 months agoFix git 2.11 error when checking IsEmpty (#27393) (#27397)
Giteabot [Mon, 2 Oct 2023 20:36:18 +0000 (04:36 +0800)]
Fix git 2.11 error when checking IsEmpty (#27393) (#27397)

Backport #27393 by @wxiaoguang

Fix #27389

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>