]> source.dussan.org Git - gitea.git/log
gitea.git
7 months agoenable tailwind nesting (#29746)
Rafael Heard [Thu, 14 Mar 2024 18:20:54 +0000 (14:20 -0400)]
enable tailwind nesting (#29746)

Currently, if you implement native CSS nesting within a Vue component a
warning will appear in the terminal. It states
`Nested CSS was detected, but CSS nesting has not been configured
correctly.
Please enable a CSS nesting plugin *before* Tailwind in your
configuration.` To fix this error we need to enable the built-in
[tailwinds nesting
config](https://tailwindcss.com/docs/using-with-preprocessors#nesting).

Example code to trigger the warning within a vue component:

```CSS
<style>
.example {
  &:hover,
  &:focus-visible {
    color: var(--color-text);
  }

  & svg {
    margin-right: 0.78rem;
  }
}
</style>
```

---------

Co-authored-by: rafh <rafaelheard@gmail.com>
Co-authored-by: silverwind <me@silverwind.io>
7 months agoSupport GITEA_I_AM_BEING_UNSAFE_RUNNING_AS_ROOT env (#29788)
Jason Song [Thu, 14 Mar 2024 08:44:49 +0000 (16:44 +0800)]
Support GITEA_I_AM_BEING_UNSAFE_RUNNING_AS_ROOT env (#29788)

It is convenient to skip by setting environment, since it's OK
to use root user in job containers.

It's not a bug, but I want to backport it to v1.21 since it doesn't
break anything.

---------

Co-authored-by: Giteabot <teabot@gitea.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
7 months agoFix missing translation on milestons (#29785)
Lunny Xiao [Thu, 14 Mar 2024 07:40:52 +0000 (15:40 +0800)]
Fix missing translation on milestons (#29785)

Caused by #26569
Fix #29778

7 months agoFix lint-swagger warning (#29787)
sillyguodong [Thu, 14 Mar 2024 04:59:52 +0000 (12:59 +0800)]
Fix lint-swagger warning (#29787)

Caused by: #23106
Fix:
https://github.com/go-gitea/gitea/actions/runs/8274650046/job/22640335697

1. Delete `UserBadgeList` in `options.go`, because it wasn't used. (The
struct defined in `options.go` is the struct used to parse the request
body)
2. Move `BadgeList` struct under `routers/api/v1/swagger` folder which
response should be defined in.

7 months agoTweak actions view sticky (#29781)
silverwind [Thu, 14 Mar 2024 04:30:10 +0000 (05:30 +0100)]
Tweak actions view sticky (#29781)

Add some space when the left side items are sticky due to scrolling the
right side.

<img width="419" alt="image"
src="https://github.com/go-gitea/gitea/assets/115237/292e1b03-a071-4744-bb79-e50d109056c8">

7 months agoadd skip ci support for pull request title (#29774)
Denys Konovalov [Thu, 14 Mar 2024 03:18:04 +0000 (04:18 +0100)]
add skip ci support for pull request title (#29774)

Extends #28075 to support [skip ci] inside PR titles.

Close #29265

7 months agoRefactor markup/csv: don't read all to memory (#29760)
coldWater [Thu, 14 Mar 2024 02:51:55 +0000 (10:51 +0800)]
Refactor markup/csv: don't read all to memory (#29760)

7 months agoFix `make generate-swagger` in go 1.22 (#29780)
silverwind [Thu, 14 Mar 2024 02:23:58 +0000 (03:23 +0100)]
Fix `make generate-swagger` in go 1.22 (#29780)

Fixes: https://github.com/go-gitea/gitea/issues/29664. No release
available for https://github.com/go-swagger/go-swagger/issues/3070 so
let's depend on latest commit hash. Output is the same as before for me.

7 months agoFix incorrect menu/link on webhook edit page (#29709)
yp05327 [Thu, 14 Mar 2024 01:37:15 +0000 (10:37 +0900)]
Fix incorrect menu/link on webhook edit page (#29709)

Fix #29699

---------

Co-authored-by: silverwind <me@silverwind.io>
7 months agoAdd test for webhook (#29755)
wxiaoguang [Thu, 14 Mar 2024 01:10:51 +0000 (09:10 +0800)]
Add test for webhook (#29755)

Follow #29690

7 months agoFix possible NPE in ToPullReviewList (#29759)
Lunny Xiao [Wed, 13 Mar 2024 19:46:15 +0000 (03:46 +0800)]
Fix possible NPE in ToPullReviewList (#29759)

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
7 months agofix missed RenderLabel change in card template (#29772)
6543 [Wed, 13 Mar 2024 18:00:38 +0000 (19:00 +0100)]
fix missed RenderLabel change in card template (#29772)

regression of #29680
close  #29770

PS: it would be nice to have a linter that is able to check template
helpers ...

7 months agoFix incorrect locale Tr for gpg command (#29754)
wxiaoguang [Wed, 13 Mar 2024 16:24:34 +0000 (00:24 +0800)]
Fix incorrect locale Tr for gpg command (#29754)

7 months agoImprove a11y document and dropdown item (#29753)
wxiaoguang [Wed, 13 Mar 2024 13:44:46 +0000 (21:44 +0800)]
Improve a11y document and dropdown item (#29753)

Co-authored-by: silverwind <me@silverwind.io>
7 months agoImprove QueryEscape helper function (#29768)
wxiaoguang [Wed, 13 Mar 2024 13:32:30 +0000 (21:32 +0800)]
Improve QueryEscape helper function (#29768)

Make it return "template.URL" to follow Golang template's context
auto-escaping.

7 months agoUse relative links for commits, mentions, and issues in markdown (#29427)
KN4CK3R [Wed, 13 Mar 2024 10:34:58 +0000 (11:34 +0100)]
Use relative links for commits, mentions, and issues in markdown (#29427)

Fixes #29404

Use relative links for
- commits
- mentions
- issues

---------

Co-authored-by: silverwind <me@silverwind.io>
7 months agoMove fork router functions to a standalone file (#29756)
Lunny Xiao [Wed, 13 Mar 2024 10:07:53 +0000 (18:07 +0800)]
Move fork router functions to a standalone file (#29756)

To reduce the pull.go file's size.

7 months agoConfigure pinned JS dependencies via updates.config.js (#29696)
silverwind [Wed, 13 Mar 2024 08:43:58 +0000 (09:43 +0100)]
Configure pinned JS dependencies via updates.config.js (#29696)

Split out from https://github.com/go-gitea/gitea/pull/29684. This
configures the [`updates`](https://github.com/silverwind/updates) module
to exclude these modules for reasons stated in the comments.

7 months agoRefactor to use optional.Option for issue index search option (#29739)
6543 [Wed, 13 Mar 2024 08:25:53 +0000 (09:25 +0100)]
Refactor to use optional.Option for issue index search option (#29739)

Signed-off-by: 6543 <6543@obermui.de>
7 months agoFix user router possbile panic (#29751)
Lunny Xiao [Wed, 13 Mar 2024 06:57:30 +0000 (14:57 +0800)]
Fix user router possbile panic (#29751)

regression from #28023

7 months agoRefactor label.IsArchived() (#29750)
6543 [Wed, 13 Mar 2024 06:04:07 +0000 (07:04 +0100)]
Refactor label.IsArchived() (#29750)

just some missed nits

7 months agoFix date rendering by adding `<gitea-absolute-date>` (#29725)
silverwind [Tue, 12 Mar 2024 22:37:02 +0000 (23:37 +0100)]
Fix date rendering by adding `<gitea-absolute-date>` (#29725)

Alternative to: https://github.com/go-gitea/gitea/pull/29698
Fixes: https://github.com/go-gitea/gitea/issues/29034
<img width="278" alt="image"
src="https://github.com/go-gitea/gitea/assets/115237/12ecd967-2723-410d-8a28-a1b0f41b7bba">

It also fixes a secondary issue that we were showing timestamp tooltips
over date, which makes no sense, so these are now gone as well:

<img width="284" alt="image"
src="https://github.com/go-gitea/gitea/assets/115237/a70432f3-97b6-41e6-b202-b53b76924a66">

7 months agoUpdate to labeler v5 (#29721)
Denys Konovalov [Tue, 12 Mar 2024 22:09:02 +0000 (23:09 +0100)]
Update to labeler v5 (#29721)

Updated to actions/labeler@v5

Updated labeler config accordingly, also improved the config and added
more labels.

---------

Co-authored-by: Giteabot <teabot@gitea.io>
7 months agoUpdate Chroma to v2.13.0 (#29732)
JakobDev [Tue, 12 Mar 2024 21:40:43 +0000 (22:40 +0100)]
Update Chroma to v2.13.0 (#29732)

This adds new lexers and includes some fixes. See
https://github.com/alecthomas/chroma/releases/tag/v2.13.0 for the full
changelog.

---------

Co-authored-by: Giteabot <teabot@gitea.io>
7 months agoHighlight archived labels (#29680)
6543 [Tue, 12 Mar 2024 17:32:05 +0000 (18:32 +0100)]
Highlight archived labels (#29680)

the issue is, that you can not distinguish between normal and archived
labels.

So this will make archived labels 80% **grayscale**. And prepend
"Archived: " to the tooltip info

![image](https://github.com/go-gitea/gitea/assets/24977596/fd77c4d2-eff5-4afd-9bfa-19cb9991c5e7)

![image](https://github.com/go-gitea/gitea/assets/24977596/2e0f30e5-f301-4c9c-8e9f-677298d90b27)

![image](https://github.com/go-gitea/gitea/assets/24977596/53d70abf-b306-453d-aa95-a3a035b19a33)

![image](https://github.com/go-gitea/gitea/assets/24977596/6020e5f5-2364-4807-979f-37dffa8735e5)

---
*Sponsored by Kithara Software GmbH*

---------

Co-authored-by: delvh <dev.lh@web.de>
7 months agoAdd more stats tables (#29730)
Lunny Xiao [Tue, 12 Mar 2024 11:21:09 +0000 (19:21 +0800)]
Add more stats tables (#29730)

Add `Tags`, `Branches` and `CommitStatus` to monitor/stats

7 months agoUse Get but not Post to get actions artifacts (#29734)
Lunny Xiao [Tue, 12 Mar 2024 10:53:53 +0000 (18:53 +0800)]
Use Get but not Post to get actions artifacts (#29734)

7 months agoDo some performance optimize for issues list and view issue/pull (#29515)
Lunny Xiao [Tue, 12 Mar 2024 07:23:44 +0000 (15:23 +0800)]
Do some performance optimize for issues list and view issue/pull (#29515)

This PR do some performance optimzations.

- [x] Add `index` for the column `comment_id` of `Attachment` table to
accelerate query from the database.
- [x] Remove unnecessary database queries when viewing issues. Before
some conditions which id = 0 will be sent to the database
- [x] Remove duplicated load posters
- [x] Batch loading attachements, isread of comments on viewing issue

---------

Co-authored-by: Zettat123 <zettat123@gmail.com>
7 months agoSome performance optimization on dashboard and issues page (#29010)
Lunny Xiao [Tue, 12 Mar 2024 04:57:19 +0000 (12:57 +0800)]
Some performance optimization on dashboard and issues page (#29010)

This PR do some loading speed optimization for feeds user interface
pages.
- Load action users batchly but not one by one.
- Load action repositories batchly but not one by one.
- Load action's Repo Owners batchly but not one by one.
- Load action's possible issues batchly but not one by one.
- Load action's possible comments batchly but not one by one.

7 months agoRemove jQuery AJAX from the issue branch reference selection (#29722)
Yarden Shoham [Tue, 12 Mar 2024 04:29:51 +0000 (06:29 +0200)]
Remove jQuery AJAX from the issue branch reference selection (#29722)

- Replaced a single jQuery AJAX instance with our fetch wrapper
- Tested the issue branch reference selection and it works as before

# Demo using `fetch` instead of jQuery AJAX

![demo](https://github.com/go-gitea/gitea/assets/20454870/7e195632-41f8-494b-b599-f6291860f330)

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
7 months agoLazy load object format with command line and don't do it in OpenRepository (#29712)
Lunny Xiao [Tue, 12 Mar 2024 04:21:27 +0000 (12:21 +0800)]
Lazy load object format with command line and don't do it in OpenRepository (#29712)

Most time, when invoking `git.OpenRepository`, `objectFormat` will not
be used, so it's a waste to invoke commandline to get the object format.
This PR make it a lazy operation, only invoke that when necessary.

7 months agoremove repetitive words (#29695)
pengqiseven [Mon, 11 Mar 2024 09:24:23 +0000 (17:24 +0800)]
remove repetitive words (#29695)

Signed-off-by: pengqiseven <912170095@qq.com>
7 months agoSync branches first (#29714)
Jason Song [Mon, 11 Mar 2024 06:42:50 +0000 (14:42 +0800)]
Sync branches first (#29714)

Follow #29493.

Sync branches to DB first, then trigger push events.

7 months agoAdd a warning for disallowed email domains (#29658)
Zettat123 [Mon, 11 Mar 2024 06:07:36 +0000 (14:07 +0800)]
Add a warning for disallowed email domains (#29658)

Resolve #29660

Follow #29522 and #29609

Add a warning for disallowed email domains when admins manually add/edit
users.

Thanks @yp05327 for the
[comment](https://github.com/go-gitea/gitea/pull/29605#issuecomment-1980105119)

![image](https://github.com/go-gitea/gitea/assets/15528715/6737b221-a3a2-4180-9ef8-b846c10f96e0)

7 months agoFix inconsistent rendering of block mathematical expressions (#29677)
yp05327 [Mon, 11 Mar 2024 05:00:50 +0000 (14:00 +0900)]
Fix inconsistent rendering of block mathematical expressions (#29677)

Fix #28735

GitHub render `\```math\``` ` as a block now.
Add `display` class will render it as a block.

After:

![image](https://github.com/go-gitea/gitea/assets/18380374/2a1c20c7-438e-4ab1-8c66-cf91c8343087)

![image](https://github.com/go-gitea/gitea/assets/18380374/b81b8a93-8bca-46a5-b7db-e0d2f53e1342)

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
7 months agoUse repo object format name instead of detecting from git repository (#29702)
Lunny Xiao [Sun, 10 Mar 2024 21:30:36 +0000 (05:30 +0800)]
Use repo object format name instead of detecting from git repository (#29702)

It's unnecessary to detect the repository object format from git
repository. Just use the repository's object format name.

7 months agoImprove CSV rendering (#29638)
silverwind [Sun, 10 Mar 2024 19:28:59 +0000 (20:28 +0100)]
Improve CSV rendering (#29638)

Before:

<img width="1332" alt="Screenshot 2024-03-06 at 21 42 17"
src="https://github.com/go-gitea/gitea/assets/115237/0ea07eee-31f8-4783-bd56-37bd8396f00d">

After:
<img width="1336" alt="Screenshot 2024-03-06 at 21 41 58"
src="https://github.com/go-gitea/gitea/assets/115237/eb7f9cc9-587f-4e3b-92bd-cc67ca639963">

7 months agoRemove jQuery AJAX from the comment edit history (#29703)
Yarden Shoham [Sun, 10 Mar 2024 19:26:41 +0000 (21:26 +0200)]
Remove jQuery AJAX from the comment edit history (#29703)

- Removed all jQuery AJAX calls and replaced with our fetch wrapper
- Tested the comment edit history list, diff, and delete functionality
and it works as before

# Demo using `fetch` instead of jQuery AJAX

![demo](https://github.com/go-gitea/gitea/assets/20454870/e8c557bc-f2b9-4d73-b55e-0850c1b19364)

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
7 months agofix: rendering internal file links in org (#29669)
Ankit R Gadiya [Sun, 10 Mar 2024 16:30:14 +0000 (22:00 +0530)]
fix: rendering internal file links in org (#29669)

The internal links to other files in the repository were not rendering
with the Src Prefix (/src/branch-name/file-path). This commit fixes that
by using the `SrcLink` as base if available.

Resolves #29668

7 months agoFix broken webhooks (#29690)
Lunny Xiao [Sun, 10 Mar 2024 01:32:48 +0000 (09:32 +0800)]
Fix broken webhooks (#29690)

Fix #29689

7 months agoSuppress error from monaco-editor (#29684)
silverwind [Sat, 9 Mar 2024 17:37:29 +0000 (18:37 +0100)]
Suppress error from monaco-editor (#29684)

Fixes: https://github.com/go-gitea/gitea/issues/29414
I see no way for us to catch this error, so downgrade it until
https://github.com/microsoft/monaco-editor/issues/4325 is fixed, which
will likely take a few weeks to propagate up from vscode.

The entries in `updates.config.js` will make
[`updates`](https://github.com/silverwind/updates) not upgrade these
anymore and I think it's good documentation as well to have the reasons
why we don't upgrade these dependencies.

7 months agoFix action runner offline label padding (#29691)
Chongyi Zheng [Sat, 9 Mar 2024 13:13:08 +0000 (08:13 -0500)]
Fix action runner offline label padding (#29691)

Before:

The `offline` padding is `calc(.833em - 1px)` from `basic` CSS class,
but `idle` padding is `6px`.

<img width="1035" alt="image"
src="https://github.com/go-gitea/gitea/assets/37034805/ccb42615-20d7-4032-a805-40cd9643012d">

After:

<img width="1035" alt="image"
src="https://github.com/go-gitea/gitea/assets/37034805/d6af99c8-76cb-4850-96d6-5289b06e1ca8">

7 months agoUpdate allowed attachment types (#29688)
silverwind [Sat, 9 Mar 2024 12:41:32 +0000 (13:41 +0100)]
Update allowed attachment types (#29688)

Update to match GitHub's latest.

Co-authored-by: Giteabot <teabot@gitea.io>
7 months agoCompletely style the webkit autofill (#29683)
silverwind [Sat, 9 Mar 2024 12:14:42 +0000 (13:14 +0100)]
Completely style the webkit autofill (#29683)

Previously it was only partially styled, e.g. there was black text on
white background even in dark theme caused by fomantic styles.

<img width="195" alt="image"
src="https://github.com/go-gitea/gitea/assets/115237/bc5cf516-2aef-45c3-854a-c9f5497aacca">

<img width="195" alt="Screenshot 2024-03-09 at 02 09 29"
src="https://github.com/go-gitea/gitea/assets/115237/ef0af17d-6e0b-402e-b24d-bfa34dc2f4e0">

Co-authored-by: Giteabot <teabot@gitea.io>
7 months agoInclude go files in tailwind processing (#29686)
silverwind [Sat, 9 Mar 2024 12:09:22 +0000 (13:09 +0100)]
Include go files in tailwind processing (#29686)

We need to scan `.go` files for tailwind classes. Does not seem to
affect build time much luckily.

Fixes:
https://github.com/go-gitea/gitea/pull/29678#discussion_r1518448600

Verified via `rg tw-object-contain public/assets/css/index.css`.

---------

Co-authored-by: Giteabot <teabot@gitea.io>
7 months agoFix WebHookEditor regression from jQuery removal (#29692)
Yarden Shoham [Sat, 9 Mar 2024 11:59:16 +0000 (13:59 +0200)]
Fix WebHookEditor regression from jQuery removal (#29692)

Make these calls optional

---------

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
7 months agoPatch in exact search for meilisearch (#29671)
6543 [Sat, 9 Mar 2024 01:39:27 +0000 (02:39 +0100)]
Patch in exact search for meilisearch (#29671)

meilisearch does not have an search option to contorl fuzzynes per query
right now:
 - https://github.com/meilisearch/meilisearch/issues/1192
 - https://github.com/orgs/meilisearch/discussions/377
 - https://github.com/meilisearch/meilisearch/discussions/1096

so we have to create a workaround by post-filter the search result in
gitea until this is addressed.

For future works I added an option in backend only atm, to enable
fuzzynes for issue indexer too.
And also refactored the code so the fuzzy option is equal in logic to
code indexer

---
*Sponsored by Kithara Software GmbH*

7 months agoUse more specific selector for `name` links (#29679)
silverwind [Fri, 8 Mar 2024 23:21:45 +0000 (00:21 +0100)]
Use more specific selector for `name` links (#29679)

Followup https://github.com/go-gitea/gitea/pull/29305. As per discussion
in https://github.com/go-gitea/gitea/pull/29666#discussion_r1517506422,
make this selector only search in the current `.markup` document, as
there can be multiples displayed at the same time.

@DanielMatiasCarvalho maybe you can review.

7 months agoReplace more gt- with tw- (#29678)
silverwind [Fri, 8 Mar 2024 21:02:05 +0000 (22:02 +0100)]
Replace more gt- with tw- (#29678)

This will conclude the trivial class replacements.

7 months agoFix commit_status problem when testing (#29672)
charles [Fri, 8 Mar 2024 15:43:48 +0000 (23:43 +0800)]
Fix commit_status problem when testing (#29672)

Close #29661

fix #29656

Co-authored-by: Giteabot <teabot@gitea.io>
7 months agoSupport pasting URLs over markdown text (#29566)
silverwind [Fri, 8 Mar 2024 15:15:58 +0000 (16:15 +0100)]
Support pasting URLs over markdown text (#29566)

Support pasting URLs over selection text in the textarea editor. Does
not work in EasyMDE and I don't intend to support it. Image paste works
as usual in both Textarea and EasyMDE.

The new `replaceTextareaSelection` function changes textarea content via
[`insertText`](https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand#using_inserttext)
command, which preserves history, e.g. `CTRL-Z` works and is also
demostrated below. We should later refactor the image paste code to use
the same function because it currently destroys history.

Overriding the formatting via `Shift` key is supported as well, e.g.
`Ctrl+Shift+V` will insert the URL as-is, like on GitHub.

![urlpaste](https://github.com/go-gitea/gitea/assets/115237/522b1023-6797-401c-9e4a-498570adfc88)

7 months agobump python version to 3.12 in dev container (#29670)
yp05327 [Fri, 8 Mar 2024 15:10:01 +0000 (00:10 +0900)]
bump python version to 3.12 in dev container (#29670)

![image](https://github.com/go-gitea/gitea/assets/18380374/963dc021-ac9b-4713-8344-654f966c80a4)

The default version is 3.9.2, which is not supported by poetry.

---------

Co-authored-by: silverwind <me@silverwind.io>
7 months agoAdd cache for branch divergence on branch list page (#29577)
Lunny Xiao [Fri, 8 Mar 2024 10:21:24 +0000 (18:21 +0800)]
Add cache for branch divergence on branch list page (#29577)

The branch page for blender project will take 6s because calculating
divergence is very slow.
This PR will add a cache for the branch divergence calculation. So when
the second visit the branch list, it will take only less 200ms.

7 months agoFix user-defined markup links targets (#29305)
DC [Fri, 8 Mar 2024 09:53:01 +0000 (09:53 +0000)]
Fix user-defined markup links targets (#29305)

This seeks to fix the bug reported on issue #29196.

Cause:
ID's with custom characters (- , _ , etc.), were not linking correctly
in the Markdown file when rendered in the browser because the ID in the
respective destinies would be different than the one in anchor, while
for IDs with only letters, the ID would be the same.

Fix:
It was suggested that to fix this bug, it should more or less like
GitHub does it. While in gitea the anchors would be put in HTML like
this:
```
<p dir="auto"><a href="#user-content-_toc152597800" rel="nofollow">Review</a></p>
<p dir="auto"><a href="#user-content-_toc152597802" rel="nofollow">Staging</a></p>
<p dir="auto"><a href="#user-content-_toc152597803" rel="nofollow">Development</a></p>
<p dir="auto"><a href="#user-content-_toc152597828" rel="nofollow">Testing</a></p>
<p dir="auto"><a href="#user-content-_toc152597829" rel="nofollow">Unit-tests</a></p>

```
In GitHub, the same anchor's href properties would be the same without
"user-content-" trailing behind.

So my code made sure to change those anchors, so it would not include
"user-content-" and then add respective Event Listeners so it would
scroll into the supposed places.

Fixes: #29196
---------

Co-authored-by: silverwind <me@silverwind.io>
7 months agoDon't show AbortErrors on logout (#29639)
silverwind [Fri, 8 Mar 2024 09:47:32 +0000 (10:47 +0100)]
Don't show AbortErrors on logout (#29639)

When logging out of Gitea, a error toast can be seen for a split second.
I don't know why or how it happens but I found it it's an `AbortError`
(related to
[AbortController#abort](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort)),
so let's hide it.

7 months agoStyle fomantic grey labels (#29458)
silverwind [Fri, 8 Mar 2024 09:42:12 +0000 (10:42 +0100)]
Style fomantic grey labels (#29458)

Fomantic grey labels in the dashboard repo lists were showing original
fomantic colors, fixed that. Also slightly tweaked the light theme
colors so it uses same opacity values as dark theme.

<img width="165" alt="Screenshot 2024-03-07 at 21 06 23"
src="https://github.com/go-gitea/gitea/assets/115237/72744d6f-2ee1-4e5d-8ba0-b482a446f535">
<img width="167" alt="Screenshot 2024-03-07 at 21 06 00"
src="https://github.com/go-gitea/gitea/assets/115237/1ba93775-e5a9-4b28-b90f-59c1e9199687">

7 months agoDon't use `<br />` in alert block (#29650)
Yarden Shoham [Fri, 8 Mar 2024 09:30:41 +0000 (11:30 +0200)]
Don't use `<br />` in alert block (#29650)

- Follows https://github.com/go-gitea/gitea/pull/29121

When I implemented alert blocks I was always testing the markdown in
issue comments. I used `<br />` for line breaks and it looked good. I
have since learned that the markdown on README files doesn't allow these
tags. So a comment with

```md
> [!NOTE]
> If you're interested in using our APIs, we have experimental support with [documentation](https://try.gitea.io/api/swagger).
```

looked like this in a comment

![image](https://github.com/go-gitea/gitea/assets/20454870/96b1de01-2c87-4d4f-83dd-98192b83e9d0)
but looked like this in a README

![image](https://github.com/go-gitea/gitea/assets/20454870/474b636d-dd7a-4b7f-ba27-643803c71aa3)

So I changed how we render the alert block by having the alert itself
have a dedicated paragraph, so line breaks happen naturally between
paragraphs.

# Before

![image](https://github.com/go-gitea/gitea/assets/20454870/474b636d-dd7a-4b7f-ba27-643803c71aa3)

![image](https://github.com/go-gitea/gitea/assets/20454870/167a8d37-9a44-4479-9340-5dc80347b595)

# After

![image](https://github.com/go-gitea/gitea/assets/20454870/2f99fec0-98ff-4ba8-97fe-b4567041ae79)

![image](https://github.com/go-gitea/gitea/assets/20454870/ffdeae11-fb06-4d00-b497-eae135f0d7ad)

---------

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
Co-authored-by: silverwind <me@silverwind.io>
7 months agoFix incorrect rendering csv file when file size is larger than UI.CSV.MaxFileSize...
yp05327 [Fri, 8 Mar 2024 08:44:50 +0000 (17:44 +0900)]
Fix incorrect rendering csv file when file size is larger than UI.CSV.MaxFileSize (#29653)

Fix #29506

7 months agoSet user's 24h preference from their current OS locale (#29651)
silverwind [Fri, 8 Mar 2024 07:57:52 +0000 (08:57 +0100)]
Set user's 24h preference from their current OS locale (#29651)

Fixes: https://github.com/go-gitea/gitea/issues/28371
Fixed by using a JS solution that formats according to `lang`, but alters the 24h format setting as per user's locale. This will work for all tooltips:

<img width="243" alt="Screenshot 2024-03-07 at 23 03 35" src="https://github.com/go-gitea/gitea/assets/115237/6d16c71c-6786-4eda-8cdc-50ec68ba62c6">
<img width="250" alt="Screenshot 2024-03-07 at 23 03 17" src="https://github.com/go-gitea/gitea/assets/115237/4e26bbb7-12df-4b81-bd37-14705e87e8f7">
<img width="310" alt="Screenshot 2024-03-07 at 23 14 34" src="https://github.com/go-gitea/gitea/assets/115237/1ef599f0-6401-4e19-b1da-59cdfc09b0f6">

I think there is only one other place in the UI where we render such absolute dates, which is in the actions view and which I've also fixed:

<img width="275" alt="Screenshot 2024-03-07 at 23 04 00" src="https://github.com/go-gitea/gitea/assets/115237/df0fbe1f-96ee-4338-ab5e-2b10e215005d">

7 months agoMove get/set default branch from git package to gitrepo package to hide repopath...
Lunny Xiao [Fri, 8 Mar 2024 07:30:10 +0000 (15:30 +0800)]
Move get/set default branch from git package to gitrepo package to hide repopath (#29126)

7 months agoMake runs-on support variable expression (#29468)
sillyguodong [Fri, 8 Mar 2024 06:14:35 +0000 (14:14 +0800)]
Make runs-on support variable expression (#29468)

As title.
Close issue: https://gitea.com/gitea/act_runner/issues/445
Follow: https://gitea.com/gitea/act/pulls/91

Move `getSecretsOfTask` and `getVariablesOfTask` under `models` because
of circular dependency issues.

7 months agoFilter for default-branch selection (#29388)
Tim-Niclas Oelschläger [Fri, 8 Mar 2024 05:36:27 +0000 (06:36 +0100)]
Filter for default-branch selection (#29388)

Filter for default-branch selection (fixes #4751)

before:

![image](https://github.com/go-gitea/gitea/assets/72873130/dcae266d-2e04-41bf-8739-64a85c9007f6)

after:

![image](https://github.com/go-gitea/gitea/assets/72873130/5f27c0a7-1d30-4ccd-b4bb-6c34fff1b79f)

---------

Co-authored-by: silverwind <me@silverwind.io>
7 months agoFixing the issue when status check per rule matches multiple actions (#29631)
charles [Fri, 8 Mar 2024 05:02:13 +0000 (13:02 +0800)]
Fixing the issue when status check per rule matches multiple actions (#29631)

Close #29628
rule
```
Test / Build*
Test / Build *
Test / Build 2*
Test / Build 1*
```

![image](https://github.com/go-gitea/gitea/assets/30816317/19bef0a9-fa97-43c5-887b-dece76064aa8)
rule2
```
Test / Build*
Test / Build 1*
```

![image](https://github.com/go-gitea/gitea/assets/30816317/19bef0a9-fa97-43c5-887b-dece76064aa8)

rule3
```
Test / Build*
Test / Build 1*
NotExist*
```

![image](https://github.com/go-gitea/gitea/assets/30816317/f6a5e832-2e1b-4049-915b-45bec5ef070c)

---------

Co-authored-by: Zettat123 <zettat123@gmail.com>
7 months agoFix 500 when deleting account with incorrect password or unsupported login type ...
Lunny Xiao [Fri, 8 Mar 2024 04:28:21 +0000 (12:28 +0800)]
Fix 500 when deleting account with incorrect password or unsupported login type (#29579)

Fix #26210

---------

Co-authored-by: Jason Song <i@wolfogre.com>
7 months agoPartially enable MSSQL case-sensitive collation support (#29238)
wxiaoguang [Fri, 8 Mar 2024 03:19:35 +0000 (11:19 +0800)]
Partially enable MSSQL case-sensitive collation support (#29238)

Follow #28662

7 months agoStore webhook event in database (#29145)
oliverpool [Thu, 7 Mar 2024 22:18:38 +0000 (23:18 +0100)]
Store webhook event in database (#29145)

Refactor the webhook logic, to have the type-dependent processing happen
only in one place.

---

## Current webhook flow

1. An event happens
2. It is pre-processed (depending on the webhook type) and its body is
added to a task queue
3. When the task is processed, some more logic (depending on the webhook
type as well) is applied to make an HTTP request

This means that webhook-type dependant logic is needed in step 2 and 3.
This is cumbersome and brittle to maintain.

Updated webhook flow with this PR:
1. An event happens
2. It is stored as-is and added to a task queue
3. When the task is processed, the event is processed (depending on the
webhook type) to make an HTTP request

So the only webhook-type dependent logic happens in one place (step 3)
which should be much more robust.

## Consequences of the refactor

- the raw event must be stored in the hooktask (until now, the
pre-processed body was stored)
- to ensure that previous hooktasks are correctly sent, a
`payload_version` is added (version 1: the body has already been
pre-process / version 2: the body is the raw event)

So future webhook additions will only have to deal with creating an
http.Request based on the raw event (no need to adjust the code in
multiple places, like currently).

Moreover since this processing happens when fetching from the task
queue, it ensures that the queuing of new events (upon a `git push` for
instance) does not get slowed down by a slow webhook.

As a concrete example, the PR #19307 for custom webhooks, should be
substantially smaller:
- no need to change `services/webhook/deliver.go`
- minimal change in `services/webhook/webhook.go` (add the new webhook
to the map)
- no need to change all the individual webhook files (since with this
refactor the `*webhook_model.Webhook` is provided as argument)

7 months agoFix bug hidden on CI and make ci failed if tests failure (#29254)
Lunny Xiao [Thu, 7 Mar 2024 16:43:32 +0000 (00:43 +0800)]
Fix bug hidden on CI and make ci failed if tests failure (#29254)

The tests on migration tests failed but CI reports successfully

https://github.com/go-gitea/gitea/actions/runs/7364373807/job/20044685969#step:8:141

This PR will fix the bug on migration v283 and also the CI hidden
behaviour.

The reason is on the Makefile

`GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql.ini $(GO) test
$(GOTESTFLAGS) -tags='$(TEST_TAGS)' $(MIGRATE_TEST_PACKAGES)` will
return the error exit code.

But

`for pkg in $(shell $(GO) list
code.gitea.io/gitea/models/migrations/...); do \
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql.ini $(GO) test
$(GOTESTFLAGS) -tags '$(TEST_TAGS)' $$pkg; \
done`

will not work.

This also fix #29602

7 months agoRemove jQuery AJAX from the repo editor (#29636)
Yarden Shoham [Thu, 7 Mar 2024 07:28:33 +0000 (09:28 +0200)]
Remove jQuery AJAX from the repo editor (#29636)

# Preview Tab
- Removed the jQuery AJAX call and replaced with our fetch wrapper
- Tested the preview tab functionality and it works as before

# Diff Tab
- Removed the jQuery AJAX call and replaced with htmx
- Tested the diff tab functionality and it works as before

## htmx Attributes
- `hx-post="{{.RepoLink}}..."`: make a POST request to the endpoint
- `hx-indicator=".tab[data-tab='diff']"`: attach the loading indicator
to the tab body
- `hx-target=".tab[data-tab='diff']"`: target the tab body for swapping
with the response
- `hx-swap="innerHTML"`: swap the target's inner HTML
- `hx-include="#edit_area"`: include the value of the textarea (content)
in the request body
- `hx-vals='{"context":"{{.BranchLink}}"}'`: include the context in the
request body
- `hx-params="context,content"`: include only these keys in the request
body

# Demo using `fetch` and `htmx` instead of jQuery AJAX

![demo](https://github.com/go-gitea/gitea/assets/20454870/585cd6e8-f329-4c9e-ab53-a540acbd7988)

---------

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
Co-authored-by: silverwind <me@silverwind.io>
7 months agoUse strict protocol check when redirect (#29642)
wxiaoguang [Thu, 7 Mar 2024 02:03:41 +0000 (10:03 +0800)]
Use strict protocol check when redirect (#29642)

7 months agoUpdate various logos and unify their filenames (#29637)
silverwind [Wed, 6 Mar 2024 22:20:05 +0000 (23:20 +0100)]
Update various logos and unify their filenames (#29637)

1. Checked all logos, updated 3 of them to newer versions.
2. Remove `open-with-` infix on the editor logos to be consistent with
other files.

<img width="626" alt="image"
src="https://github.com/go-gitea/gitea/assets/115237/3b2d9486-6e0a-45c6-b0e4-d38dc4c0b118">

7 months agoTweak actions color and borders (#29640)
silverwind [Wed, 6 Mar 2024 21:44:24 +0000 (22:44 +0100)]
Tweak actions color and borders (#29640)

- Increase contrast overall
- Unalias the ansi color in dark theme and copy them to light
- Add outer border
- Add border radius

<img width="1337" alt="Screenshot 2024-03-06 at 22 30 03"
src="https://github.com/go-gitea/gitea/assets/115237/11407c0f-0bb2-435e-a034-22b1f106d9b0">
<img width="1335" alt="Screenshot 2024-03-06 at 22 36 59"
src="https://github.com/go-gitea/gitea/assets/115237/267db442-0979-4acc-a79e-8579b4cb0262">

7 months agoAdd download URL for executable files (#28260)
Earl Warren [Wed, 6 Mar 2024 16:10:06 +0000 (00:10 +0800)]
Add download URL for executable files (#28260)

Consider executable files as a valid case when returning a DownloadURL for them.
They are just regular files with the difference being the executable permission bit being set.

Co-authored-by: Gusted <postmaster@gusted.xyz>
7 months agoMove all login and account creation page labels to be above inputs (#29432)
Rafael Heard [Wed, 6 Mar 2024 14:20:26 +0000 (09:20 -0500)]
Move all login and account creation page labels to be above inputs (#29432)

There are a few inconsistencies within Gitea and this PR addresses one
of them. This PR updates the sign-in page layout, including the register
and openID tabs, to match the layout of the settings pages
(/user/settings) for more consistency.

This PR updates the following routes:
`/user/login`
`/user/sign_up`
`/user/login/openid`
`/user/forgot_password`
`/user/link_account`
`/user/recover_account`

**Before**
<img width="968" alt="Screenshot 2024-02-05 at 8 27 24 AM"
src="https://github.com/go-gitea/gitea/assets/6152817/fb0cb517-57c0-4eed-be1d-56f36bd1960d">

**After**
<img width="968" alt="Screenshot 2024-02-05 at 8 26 39 AM"
src="https://github.com/go-gitea/gitea/assets/6152817/428d691d-0a42-4a67-a646-05527f2a7b41">

This PR addresses a revert of the original PR due to this
[comment](https://github.com/go-gitea/gitea/pull/28753#issuecomment-1956596817).

---------

Co-authored-by: rafh <rafaelheard@gmail.com>
7 months agoAvoid issue info panic (#29625)
wxiaoguang [Wed, 6 Mar 2024 13:12:44 +0000 (21:12 +0800)]
Avoid issue info panic (#29625)

Fix #29624

7 months agoCache repository default branch commit status to reduce query on commit status table...
Lunny Xiao [Wed, 6 Mar 2024 12:17:19 +0000 (20:17 +0800)]
Cache repository default branch commit status to reduce query on commit status table (#29444)

After repository commit status has been introduced on dashaboard, the
most top SQL comes from `GetLatestCommitStatusForPairs`.

This PR adds a cache for the repository's default branch's latest
combined commit status. When a new commit status updated, the cache will
be marked as invalid.

<img width="998" alt="image"
src="https://github.com/go-gitea/gitea/assets/81045/76759de7-3a83-4d54-8571-278f5422aed3">

7 months agoAvoid unexpected panic in graceful manager (#29629)
wxiaoguang [Wed, 6 Mar 2024 11:50:39 +0000 (19:50 +0800)]
Avoid unexpected panic in graceful manager (#29629)

There is a fundamental design problem of the "manager" and the "wait
group".
If nothing has started, the "Wait" just panics: sync: WaitGroup is
reused before previous Wait has returned
There is no clear solution besides a complete rewriting of the "manager"

If there are some mistakes in the app.ini, end users would just see the
"panic", but not the real error messages. A real case: #27643

This PR is just a quick fix for the annoying panic problem.

7 months agoAdd a link for the recently pushed branch notification (#29627)
wxiaoguang [Wed, 6 Mar 2024 11:25:00 +0000 (19:25 +0800)]
Add a link for the recently pushed branch notification (#29627)

7 months agoFix wrong header of org project view page (#29626)
yp05327 [Wed, 6 Mar 2024 10:23:27 +0000 (19:23 +0900)]
Fix wrong header of org project view page (#29626)

Follow #29248

The project view page still using `user/overview/header.tmpl`

Before:

![image](https://github.com/go-gitea/gitea/assets/18380374/9cb638a3-7cc6-4efa-979a-e2592007fd12)

After:

![image](https://github.com/go-gitea/gitea/assets/18380374/62b0b2ea-8cb0-459f-b27a-bad3908eb1c0)

7 months agoDetect broken git hooks (#29494)
Jason Song [Wed, 6 Mar 2024 09:56:04 +0000 (17:56 +0800)]
Detect broken git hooks (#29494)

Detect broken git hooks by checking if the commit id of branches in DB
is the same with the git repo.

It can help #29338 #28277 and maybe more issues.

Users could complain about actions, webhooks, and activities not
working, but they were not aware that it is caused by broken git hooks
unless they could see a warning.

<img width="1348" alt="image"
src="https://github.com/go-gitea/gitea/assets/9418365/2b92a46d-7f1d-4115-bef4-9f970bd695da">

It should be merged after #29493. Otherwise, users could see a ephemeral
warning after committing and opening the repo home page immediately.

And it also waits for #29495, since the doc link (the anchor part) will
be updated.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Giteabot <teabot@gitea.io>
7 months agoSync branches to DB immediately when handle git hook calling (#29493)
Jason Song [Wed, 6 Mar 2024 08:47:52 +0000 (16:47 +0800)]
Sync branches to DB immediately when handle git hook calling (#29493)

Unlike other async processing in the queue, we should sync branches to
the DB immediately when handling git hook calling. If it fails, users
can see the error message in the output of the git command.

It can avoid potential inconsistency issues, and help #29494.

---------

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
7 months agoFix wrong line number in code search result (#29260)
yp05327 [Wed, 6 Mar 2024 07:24:43 +0000 (16:24 +0900)]
Fix wrong line number in code search result (#29260)

Fix #29136

Before: The result is a table and all line numbers are all in one row.

After: Use a separate table column for the line numbers.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
7 months agoMake wiki default branch name changable (#29603)
wxiaoguang [Wed, 6 Mar 2024 06:26:32 +0000 (14:26 +0800)]
Make wiki default branch name changable (#29603)

Fix #29000
Fix #28685
Fix #18568

Related: #27497

And by the way fix #24036, add a Cancel button there (one line)

7 months agoA small refactor for agit implementation (#29614)
Lunny Xiao [Wed, 6 Mar 2024 05:52:48 +0000 (13:52 +0800)]
A small refactor for agit implementation (#29614)

This PR made the code simpler, reduced unnecessary database queries and
fixed some warnning for the errors.New .

---------

Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
7 months agoUpdate Twitter Logo (#29621)
silverwind [Wed, 6 Mar 2024 05:21:39 +0000 (06:21 +0100)]
Update Twitter Logo (#29621)

<img width="430" alt="image"
src="https://github.com/go-gitea/gitea/assets/115237/9cf7b0a3-406b-4dd6-ab3d-d31a96b9335a">

7 months agoFix 500 error when adding PR comment (#29622)
wxiaoguang [Wed, 6 Mar 2024 05:09:38 +0000 (13:09 +0800)]
Fix 500 error when adding PR comment (#29622)

7 months agoRun editorconfig-checker on `locale_en-US.ini` (#29608)
silverwind [Wed, 6 Mar 2024 01:48:14 +0000 (02:48 +0100)]
Run editorconfig-checker on `locale_en-US.ini` (#29608)

Will prevent trailing whitespace etc being introduced in this file.

---------

Co-authored-by: Giteabot <teabot@gitea.io>
7 months agobump protobuf module (#29617)
techknowlogick [Wed, 6 Mar 2024 01:35:29 +0000 (20:35 -0500)]
bump protobuf module (#29617)

7 months agoAdd ac claim for old docker/build-push-action@v3 / current buildx gha cache (#29584)
ChristopherHX [Tue, 5 Mar 2024 17:34:42 +0000 (18:34 +0100)]
Add ac claim for old docker/build-push-action@v3 / current buildx gha cache (#29584)

Also resolves a warning for current releases

```
| ##[group]GitHub Actions runtime token ACs
| ##[warning]Cannot parse GitHub Actions Runtime Token ACs: "undefined" is not valid JSON
| ##[endgroup]
====>
| ##[group]GitHub Actions runtime token ACs
| ##[endgroup]
```
\* this is an error in v3

References in the docker org:
-
https://github.com/docker/build-push-action/blob/831ca179d3cf91cf0c90ca465a408fa61e2129a2/src/main.ts#L24
-
https://github.com/docker/actions-toolkit/blob/7d8b4dc6694df35a06fae786427672ce27a8c18d/src/github.ts#L61

No known official action of GitHub makes use of this claim.

Current releases throw an error when configure to use actions cache
```
| ERROR: failed to solve: failed to configure gha cache exporter: invalid token without access controls
| ##[error]buildx failed with: ERROR: failed to solve: failed to configure gha cache exporter: invalid token without access controls
```

7 months agoSkip email domain check when admins edit user emails (#29609)
Zettat123 [Tue, 5 Mar 2024 16:51:56 +0000 (00:51 +0800)]
Skip email domain check when admins edit user emails (#29609)

Follow #29522

Administrators should be able to set a user's email address even if the
email address is not in `EMAIL_DOMAIN_ALLOWLIST`

7 months agoImprove natural sort (#29611)
wxiaoguang [Tue, 5 Mar 2024 15:13:35 +0000 (23:13 +0800)]
Improve natural sort (#29611)

Hugely simplify the code, and add more tests (only new approach could
pass)

7 months agoAdd empty repo check in `DetectAndHandleSchedules` (#29606)
yp05327 [Tue, 5 Mar 2024 14:47:07 +0000 (23:47 +0900)]
Add empty repo check in `DetectAndHandleSchedules` (#29606)

![image](https://github.com/go-gitea/gitea/assets/18380374/e6081301-bd3e-4cf6-ba4e-e574348dffb4)

7 months agoFix contributor graphs mobile layout and responsiveness (#29597)
silverwind [Tue, 5 Mar 2024 14:21:52 +0000 (15:21 +0100)]
Fix contributor graphs mobile layout and responsiveness (#29597)

Also removed a unneeded and actually conflicting class name
`stats-table`.

Fixes: https://github.com/go-gitea/gitea/issues/29192
<img width="445" alt="image"
src="https://github.com/go-gitea/gitea/assets/115237/787804ed-6ba4-437f-b314-f23cbe2edf7a">

7 months agoSkip email domain check when admin users adds user manually (#29522)
Zettat123 [Tue, 5 Mar 2024 05:55:47 +0000 (13:55 +0800)]
Skip email domain check when admin users adds user manually (#29522)

Fix #27457

Administrators should be able to manually create any user even if the
user's email address is not in `EMAIL_DOMAIN_ALLOWLIST`.

7 months agoReplace more `gt-` with `tw-`, update frontend docs (#29595)
silverwind [Tue, 5 Mar 2024 05:29:32 +0000 (06:29 +0100)]
Replace more `gt-` with `tw-`, update frontend docs (#29595)

Tested a few things, all working fine. Not sure if the chinese machine
translation is good.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
7 months agoRemove unnecessary ctxData for "attachments" template (#29600)
wxiaoguang [Tue, 5 Mar 2024 04:59:16 +0000 (12:59 +0800)]
Remove unnecessary ctxData for "attachments" template (#29600)

The "attachments" template never uses it

7 months agoAdjust tailwind content globs (#29596)
silverwind [Tue, 5 Mar 2024 04:31:29 +0000 (05:31 +0100)]
Adjust tailwind content globs (#29596)

Tailwind content is not going to appear in `web_src/css`,
`web_src/fomantic` or `web_src/svg` or the JSON templates, so we don't
need to have tailwind scan these directories which will speed up the
build.

---------

Co-authored-by: delvh <dev.lh@web.de>
7 months agoUse flex wrap to layout the PR update button (#29590)
wxiaoguang [Tue, 5 Mar 2024 03:03:14 +0000 (11:03 +0800)]
Use flex wrap to layout the PR update button (#29590)

Follow #29418

I think using "flex-wrap: wrap" here is better than hard-coding the screen width.

By using "flex-wrap: wrap", the UI layouts automatically for various
widths (even if in some languages, the sentence might be pretty long)

7 months agoMake "/user/login" page redirect if the current user has signed in (#29583)
wxiaoguang [Tue, 5 Mar 2024 02:12:03 +0000 (10:12 +0800)]
Make "/user/login" page redirect if the current user has signed in (#29583)

Fix #29582 and maybe more.
Maybe fix #29116

7 months ago[skip ci] Updated translations via Crowdin
GiteaBot [Tue, 5 Mar 2024 00:23:19 +0000 (00:23 +0000)]
[skip ci] Updated translations via Crowdin

7 months agoFix projects mode bugs (#29593)
Denys Konovalov [Mon, 4 Mar 2024 20:49:21 +0000 (21:49 +0100)]
Fix projects mode bugs (#29593)

Fix for regressions introduced by #28805

Enabled projects on repos created before the PR weren't detected. Also,
the way projects mode was detected in settings didn't match the way it
was detected on permission check, which leads to confusion.

Co-authored-by: Giteabot <teabot@gitea.io>