]> source.dussan.org Git - gitea.git/log
gitea.git
10 months agoUse "is-loading" to avoid duplicate form submit for code comment (#28143) (#28147)
Giteabot [Tue, 21 Nov 2023 04:02:58 +0000 (12:02 +0800)]
Use "is-loading" to avoid duplicate form submit for code comment (#28143) (#28147)

Backport #28143 by @wxiaoguang

Compare by ignoring spaces:
https://github.com/go-gitea/gitea/pull/28143/files?diff=split&w=1

When the form is going to be submitted, add the "is-loading" class to
show an indicator and avoid user UI events.

When the request finishes (success / error), remove the "is-loading"
class to make user can interact the UI.

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
10 months agoFix typo in `packages.cleanup.success` (#28133) (#28136)
Giteabot [Mon, 20 Nov 2023 13:43:40 +0000 (21:43 +0800)]
Fix typo in `packages.cleanup.success` (#28133) (#28136)

Backport #28133 by @wolfogre

Follow
https://github.com/go-gitea/gitea/pull/28129#discussion_r1398971596

Co-authored-by: Jason Song <i@wolfogre.com>
10 months agoAdd missing `packages.cleanup.success` (#28129) (#28132)
Giteabot [Mon, 20 Nov 2023 09:39:54 +0000 (17:39 +0800)]
Add missing `packages.cleanup.success` (#28129) (#28132)

Backport #28129 by @wolfogre

Co-authored-by: Jason Song <i@wolfogre.com>
10 months agoUpdate docs for docusaurus v3 (#28126)
John Olheiser [Mon, 20 Nov 2023 05:24:50 +0000 (23:24 -0600)]
Update docs for docusaurus v3 (#28126)

Signed-off-by: jolheiser <john.olheiser@gmail.com>
10 months agoFix Matrix and MSTeams nil dereference (#28089) (#28105)
Giteabot [Fri, 17 Nov 2023 13:50:45 +0000 (21:50 +0800)]
Fix Matrix and MSTeams nil dereference (#28089) (#28105)

Backport #28089 by @KN4CK3R

Fixes #28088
Fixes #28094

Added missing tests.

Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
10 months agoChange default size of attachments and repo files (#28100) (#28106)
Giteabot [Fri, 17 Nov 2023 12:30:42 +0000 (20:30 +0800)]
Change default size of attachments and repo files (#28100) (#28106)

Backport #28100 by @lng2020

https://github.com/go-gitea/gitea/pull/27946 forgets to change them in
code. Sorry about that.

Co-authored-by: Nanguan Lin <70063547+lng2020@users.noreply.github.com>
10 months agoFix incorrect pgsql conn builder behavior (#28085) (#28098)
Giteabot [Fri, 17 Nov 2023 10:45:04 +0000 (18:45 +0800)]
Fix incorrect pgsql conn builder behavior (#28085) (#28098)

Backport #28085 by @wxiaoguang

Fix #28083 and fix the tests

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
11 months agoFix permissions for Token DELETE endpoint to match GET and POST (#27610) (#28099)
Giteabot [Fri, 17 Nov 2023 04:24:16 +0000 (12:24 +0800)]
Fix permissions for Token DELETE endpoint to match GET and POST (#27610) (#28099)

Backport #27610 by @evantobin

Fixes #27598

In #27080, the logic for the tokens endpoints were updated to allow
admins to create and view tokens in other accounts. However, the same
functionality was not added to the DELETE endpoint. This PR makes the
DELETE endpoint function the same as the other token endpoints and adds
unit tests

Co-authored-by: Evan Tobin <me@evantob.in>
11 months agoFix system config cache expiration timing (#28072) (#28090)
Giteabot [Thu, 16 Nov 2023 13:37:57 +0000 (21:37 +0800)]
Fix system config cache expiration timing (#28072) (#28090)

Backport #28072

To avoid unnecessary database access, the `cacheTime` should always be
set if the revision has been checked.

Fix #28057

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
11 months agoRestricted users only see repos in orgs which their team was assigned to (#28025...
Giteabot [Tue, 14 Nov 2023 15:44:46 +0000 (23:44 +0800)]
Restricted users only see repos in orgs which their team was assigned to (#28025) (#28051)

Backport #28025 by @6543

---
*Sponsored by Kithara Software GmbH*

Co-authored-by: 6543 <m.huber@kithara.com>
11 months agoAdd v1.21.0 changelog (#28005) (#28048) v1.21.0
Denys Konovalov [Tue, 14 Nov 2023 14:02:59 +0000 (15:02 +0100)]
Add v1.21.0 changelog (#28005) (#28048)

Backport changelog for v1.21.0 as Giteabot doesn't seem to be in the
mood for it

---------

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: silverwind <me@silverwind.io>
11 months agoenable system users for comment.LoadPoster (#28014) (#28032)
Giteabot [Tue, 14 Nov 2023 13:50:05 +0000 (21:50 +0800)]
enable system users for comment.LoadPoster (#28014) (#28032)

Backport #28014 by @earl-warren

System users (Ghost, ActionsUser, etc) have a negative id and may be the
author of a comment, either because it was created by a now deleted user
or via an action using a transient token.

The GetPossibleUserByID function has special cases related to system
users and will not fail if given a negative id.

Refs: https://codeberg.org/forgejo/forgejo/issues/1425

(cherry picked from commit 6a2d2fa24390116d31ae2507c0a93d423f690b7b)

Co-authored-by: Earl Warren <109468362+earl-warren@users.noreply.github.com>
11 months agoFix viewing wiki commit on empty repo (#28040) (#28044)
Giteabot [Tue, 14 Nov 2023 13:49:12 +0000 (21:49 +0800)]
Fix viewing wiki commit on empty repo (#28040) (#28044)

Backport #28040 by @JakobDev

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

For some weird reason we need to cast this nil.

Co-authored-by: JakobDev <jakobdev@gmx.de>
11 months agoAdd word break to the repo list in admin settings page (#28034) (#28035)
Giteabot [Tue, 14 Nov 2023 06:31:43 +0000 (14:31 +0800)]
Add word break to the repo list in admin settings page (#28034) (#28035)

Backport #28034 by @yp05327

Before:

![image](https://github.com/go-gitea/gitea/assets/18380374/ed464937-e20d-4f5b-b997-e86c2d96469d)

After:

![image](https://github.com/go-gitea/gitea/assets/18380374/471e77b3-516e-4ae9-b901-0cf8745eb9aa)

Co-authored-by: yp05327 <576951401@qq.com>
11 months agofixed duplicate attachments on dump on windows (#28019) (#28031)
Giteabot [Tue, 14 Nov 2023 01:56:21 +0000 (09:56 +0800)]
fixed duplicate attachments on dump on windows (#28019) (#28031)

Backport #28019 by @anudeepreddy

Hi,

This PR fixes #27988. The use of `path.join`(which uses `/` as the file
separator) to construct paths and comparing them with paths constructed
using `filepath.join`(which uses platform specific file separator) is
the root cause of this issue.

The desired behavior is to ignore attachments when dumping data
directory. Due to the what's mentioned above, the function
`addRecursiveExclude` is not actually ignoring the attachments directory
and is being written to the archive. The attachment directory is again
added to the archive (with different file separator as mentioned in the
issue) causing a duplicate entry on windows.

The solution is to use `filepath.join` in `addResursiveExclude` to
construct `currentAbsPath`.

Co-authored-by: Anudeep Reddy <anudeepc85@gmail.com>
11 months agoDont leak private users via extensions (#28023) (#28029)
Giteabot [Mon, 13 Nov 2023 23:03:42 +0000 (07:03 +0800)]
Dont leak private users via extensions (#28023) (#28029)

Backport #28023 by @6543

there was no check in place if a user could see a other user, if you
append e.g. `.rss`

11 months agoChange default size of issue/pr attachments and repo file (#27946) (#28017)
Giteabot [Mon, 13 Nov 2023 14:27:39 +0000 (22:27 +0800)]
Change default size of issue/pr attachments and repo file (#27946) (#28017)

Backport #27946 by @lng2020

As title. Some attachments and file sizes can easily be larger than
these limits

Co-authored-by: Nanguan Lin <70063547+lng2020@users.noreply.github.com>
11 months agoFix wrong xorm Delete usage(backport for 1.21) (#28002)
Nanguan Lin [Sun, 12 Nov 2023 12:58:22 +0000 (20:58 +0800)]
Fix wrong xorm Delete usage(backport for 1.21) (#28002)

manually backport for https://github.com/go-gitea/gitea/pull/27995
The conflict is `ctx` and `db.Defaultctx`.

11 months agoMove some JS code from `fomantic.js` to standalone files (#27994) (#28001)
Giteabot [Sun, 12 Nov 2023 10:29:56 +0000 (18:29 +0800)]
Move some JS code from `fomantic.js` to standalone files (#27994) (#28001)

Backport #27994 by @wxiaoguang

To improve maintainability, this PR:

1. Rename `web_src/js/modules/aria` to `web_src/js/modules/fomantic`
(the code there are all for aria of fomantic)
2. Move api/transition related code to
`web_src/js/modules/fomantic/api.js` and
`web_src/js/modules/fomantic/transition.js`

No logic is changed.

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
11 months agoRender email addresses as such if followed by punctuation (#27987) (#27992)
Giteabot [Sat, 11 Nov 2023 05:26:18 +0000 (13:26 +0800)]
Render email addresses as such if followed by punctuation (#27987) (#27992)

Backport #27987 by @yardenshoham

Added the following characters to the regular expression for the email:

- ,
- ;
- ?
- !

Also added a test case.

- Fixes #27616

# Before

![image](https://github.com/go-gitea/gitea/assets/20454870/c57eac26-f281-43ef-a51d-9c9a81b63efa)

# After

![image](https://github.com/go-gitea/gitea/assets/20454870/fc7d5c08-4350-4af0-a7f0-d1444d2d75af)

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
Co-authored-by: Yarden Shoham <git@yardenshoham.com>
11 months agoShow error toast when file size exceeds the limits (#27985) (#27986)
Giteabot [Fri, 10 Nov 2023 11:52:04 +0000 (19:52 +0800)]
Show error toast when file size exceeds the limits (#27985) (#27986)

Backport #27985 by @lng2020

As title.
Before that, there was no alert at all.
After:

![error_toast](https://github.com/go-gitea/gitea/assets/70063547/c54ffeed-76f8-4c3a-b5dc-b9b3e0f8fc76)

Co-authored-by: Nanguan Lin <70063547+lng2020@users.noreply.github.com>
11 months agoFix citation error when the file size is larger than 1024 bytes (#27958) (#27965)
Giteabot [Wed, 8 Nov 2023 14:45:57 +0000 (22:45 +0800)]
Fix citation error when the file size is larger than 1024 bytes (#27958) (#27965)

Backport #27958 by @yp05327

Mentioned in:
https://github.com/go-gitea/gitea/pull/27931#issuecomment-1798016960

Same to #25131, so use the same method to fix this problem.

Co-authored-by: yp05327 <576951401@qq.com>
11 months agoAdd word-break to repo description in home page (#27924) (#27957)
Giteabot [Wed, 8 Nov 2023 01:29:33 +0000 (09:29 +0800)]
Add word-break to repo description in home page (#27924) (#27957)

Backport #27924 by @yp05327

In #25315, @denyskon fixed UI on mobile view.
But for the repo description, on desktop view there's no word-break.
So maybe we can just add `gt-word-break` to fix it on both mobile view
and desktop view.

Before:
desktop view:

![image](https://github.com/go-gitea/gitea/assets/18380374/a7659f5b-fbe9-400a-8cc2-cca44778556e)
mobile view:

![image](https://github.com/go-gitea/gitea/assets/18380374/611f1b81-58ac-4213-b165-5c73e24ca79e)

After:
desktop view:

![image](https://github.com/go-gitea/gitea/assets/18380374/f21bf3a7-f6aa-457d-9bfa-5c57659c68b1)
mobile view(almost same?)

![image](https://github.com/go-gitea/gitea/assets/18380374/ad2d1a4d-1172-402c-b5fc-5e910657847d)

Co-authored-by: yp05327 <576951401@qq.com>
Co-authored-by: silverwind <me@silverwind.io>
11 months agoDocument REACTION_MAX_USER_NUM setting option (#27954) (#27959)
Giteabot [Wed, 8 Nov 2023 00:54:48 +0000 (08:54 +0800)]
Document REACTION_MAX_USER_NUM setting option (#27954) (#27959)

Backport #27954 by @6543

as title

---
*Sponsored by Kithara Software GmbH*

Co-authored-by: 6543 <m.huber@kithara.com>
11 months agoFix rendering assignee changed comments without assignee (#27927) (#27952)
Giteabot [Tue, 7 Nov 2023 21:02:36 +0000 (05:02 +0800)]
Fix rendering assignee changed comments without assignee (#27927) (#27952)

Backport #27927 by @invliD

When an assignee changed event comment is rendered, most of it is
guarded behind the assignee ID not being 0. However, if it is 0, that
results in quite broken rendering for that comment and the next one.
This can happen, for example, when repository data imported from outside
of Gitea is incomplete.

This PR makes sure comments with an assignee ID of 0 are not rendered at
all.

---

Screenshot before:
<img width="272" alt="Bildschirm­foto 2023-11-05 um 20 12 18"
src="https://github.com/go-gitea/gitea/assets/42910/7d629d76-fee4-4fe5-9e3a-bf524050cead">
The comments in this screenshot are:
1. A regular text comment
2. A user being unassigned
3. A user being assigned
4. The title of the PR being changed

Comments 2 and 3 are rendered without any text, which indents the next
comment and does not leave enough vertical space.

Co-authored-by: Sebastian Brückner <code@nik.dev>
11 months agoAdd word break to release title (#27942) (#27947)
Giteabot [Tue, 7 Nov 2023 12:30:51 +0000 (20:30 +0800)]
Add word break to release title (#27942) (#27947)

Backport #27942 by @yp05327

Before:

![image](https://github.com/go-gitea/gitea/assets/18380374/74c925e0-15ae-4602-8b56-0b69f54a5e7a)

After:

![image](https://github.com/go-gitea/gitea/assets/18380374/027c34ef-0cbc-4156-a198-44bf5dd924e2)

Co-authored-by: yp05327 <576951401@qq.com>
11 months agoUpdate environment-to-ini flag parsing (#27914) (#27940)
Giteabot [Mon, 6 Nov 2023 21:10:10 +0000 (05:10 +0800)]
Update environment-to-ini flag parsing (#27914) (#27940)

Backport #27914 by @fashberg

This Fixes #27913

This commit updates `environment-to-ini` to be compatible with update
urfave/cli/v2

Doc: <https://cli.urfave.org/v2/examples/combining-short-options/>

Co-authored-by: Folke <folke@ashberg.de>
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.