]> source.dussan.org Git - gitea.git/log
gitea.git
12 months ago[skip ci] Updated translations via Crowdin
GiteaBot [Sat, 7 Oct 2023 00:22:38 +0000 (00:22 +0000)]
[skip ci] Updated translations via Crowdin

12 months agoRemove .exe suffix when cross-compiling on Windows (#27448)
Sergey Zolotarev [Fri, 6 Oct 2023 20:39:21 +0000 (20:39 +0000)]
Remove .exe suffix when cross-compiling on Windows (#27448)

When compiling GItea for Linux on Windows, you get a `gitea.exe` file as
output, but because it's a Linux executable, the `.exe` extension is
unnecessary.

This PR adds a check for `GOOS` environment variable in addition to
`OS`.

12 months agomove re-useable workflow
techknowlogick [Fri, 6 Oct 2023 19:22:10 +0000 (15:22 -0400)]
move re-useable workflow

12 months agoadd checkout to disk-clean
techknowlogick [Fri, 6 Oct 2023 19:16:56 +0000 (15:16 -0400)]
add checkout to disk-clean

12 months agouse hosted runners for nightly actions (#27485)
techknowlogick [Fri, 6 Oct 2023 19:13:47 +0000 (15:13 -0400)]
use hosted runners for nightly actions (#27485)

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

---------

Co-authored-by: silverwind <me@silverwind.io>
12 months agoAvoid run change title process when the title is same (#27467)
yp05327 [Fri, 6 Oct 2023 18:00:53 +0000 (03:00 +0900)]
Avoid run change title process when the title is same (#27467)

If user only changed the target branch or just did nothing and clicked
the `Save` button, you will see the change log as following:

![image](https://github.com/go-gitea/gitea/assets/18380374/d30927dd-9227-4653-8fac-b890ef0b3f88)

This makes no sense, so we should check whether the title is surely
changed before run the `ChangeTitle`.

12 months agoFix panic in storageHandler (#27446)
Sergey Zolotarev [Fri, 6 Oct 2023 13:23:14 +0000 (13:23 +0000)]
Fix panic in storageHandler (#27446)

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

Example CURL command to trigger the panic:

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

Fixes #27409

---

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

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

12 months agoRename the default themes to gitea-light, gitea-dark, gitea-auto (#27419)
silverwind [Fri, 6 Oct 2023 07:46:36 +0000 (09:46 +0200)]
Rename the default themes to gitea-light, gitea-dark, gitea-auto (#27419)

Part of https://github.com/go-gitea/gitea/issues/27097:

- `gitea` theme is renamed to `gitea-light`
- `arc-green` theme is renamed to `gitea-dark`
- `auto` theme is renamed to `gitea-auto`

I put both themes in separate CSS files, removing all colors from the
base CSS. Existing users will be migrated to the new theme names. The
dark theme recolor will follow in a separate PR.

## :warning: BREAKING :warning:

1. If there are existing custom themes with the names `gitea-light` or
`gitea-dark`, rename them before this upgrade and update the `theme`
column in the `user` table for each affected user.
2. The theme in `<html>` has moved from `class="theme-name"` to
`data-theme="name"`, existing customizations that depend on should be
updated.

---------

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Giteabot <teabot@gitea.io>
12 months agoRephrase template documentation to be more clear about .gitea/template (#27450)
Andrew Imeson [Fri, 6 Oct 2023 06:51:33 +0000 (02:51 -0400)]
Rephrase template documentation to be more clear about .gitea/template (#27450)

Closes #27336

---------

Co-authored-by: silverwind <me@silverwind.io>
12 months agoRemove redundant `len` check around loop (#27464)
Eng Zer Jun [Fri, 6 Oct 2023 06:49:37 +0000 (14:49 +0800)]
Remove redundant `len` check around loop (#27464)

This pull request is a minor code cleanup.

From the Go specification (https://go.dev/ref/spec#For_range):

> "1. For a nil slice, the number of iterations is 0."
> "3. If the map is nil, the number of iterations is 0."

`len` returns 0 if the slice or map is nil
(https://pkg.go.dev/builtin#len). Therefore, checking `len(v) > 0`
before a loop is unnecessary.

---

At the time of writing this pull request, there wasn't a lint rule that
catches these issues. The closest I could find is
https://staticcheck.dev/docs/checks/#S103

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
12 months ago[skip ci] Updated translations via Crowdin
GiteaBot [Fri, 6 Oct 2023 00:23:05 +0000 (00:23 +0000)]
[skip ci] Updated translations via Crowdin

12 months agofix wording in SECURITY.md (#27463)
Nuyube [Thu, 5 Oct 2023 21:17:29 +0000 (17:17 -0400)]
fix wording in SECURITY.md (#27463)

12 months agoFix `Installation from package` doc (#27459)
Nanguan Lin [Thu, 5 Oct 2023 13:57:28 +0000 (21:57 +0800)]
Fix `Installation from package` doc (#27459)

Fix the title size and add notes to the Gitea snap package.
Related issue #27424, #27423, #27422, #27420

12 months agoDon't let API add 2 exclusive labels from same scope (#27433)
JakobDev [Thu, 5 Oct 2023 03:37:36 +0000 (05:37 +0200)]
Don't let API add 2 exclusive labels from same scope (#27433)

Fixes #27380

12 months agoRefactor system setting (#27000)
wxiaoguang [Thu, 5 Oct 2023 01:08:19 +0000 (09:08 +0800)]
Refactor system setting (#27000)

This PR reduces the complexity of the system setting system.

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

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

12 months ago[skip ci] Updated translations via Crowdin
GiteaBot [Thu, 5 Oct 2023 00:23:21 +0000 (00:23 +0000)]
[skip ci] Updated translations via Crowdin

12 months agoWhen comparing with an non-exist repository, return 404 but 500 (#27437)
Lunny Xiao [Wed, 4 Oct 2023 13:59:03 +0000 (21:59 +0800)]
When comparing with an non-exist repository, return 404 but 500 (#27437)

12 months agoFix pr template (#27436)
Lunny Xiao [Wed, 4 Oct 2023 12:28:25 +0000 (20:28 +0800)]
Fix pr template (#27436)

Fix #27431

12 months agoUse minimal required version on CI and remove unnecessary services (#27429)
Lunny Xiao [Wed, 4 Oct 2023 11:42:02 +0000 (19:42 +0800)]
Use minimal required version on CI and remove unnecessary services (#27429)

12 months agoFix missing `ctx` in new_form.tmpl (#27434)
CaiCandong [Wed, 4 Oct 2023 10:12:17 +0000 (18:12 +0800)]
Fix  missing `ctx`  in new_form.tmpl  (#27434)

Fix  #27432
Regression of #27265

12 months agoUse flex-container for repo and org settings (#27418)
silverwind [Wed, 4 Oct 2023 06:47:54 +0000 (08:47 +0200)]
Use flex-container for repo and org settings (#27418)

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

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

Co-authored-by: Giteabot <teabot@gitea.io>
12 months agoFix yet another `ctx` template bug (#27417)
delvh [Wed, 4 Oct 2023 02:11:01 +0000 (04:11 +0200)]
Fix yet another `ctx` template bug (#27417)

Fixes #27416

12 months agoAdd Index to `action.user_id` (#27403)
JakobDev [Wed, 4 Oct 2023 01:41:25 +0000 (03:41 +0200)]
Add Index to `action.user_id` (#27403)

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

Co-authored-by: Giteabot <teabot@gitea.io>
12 months ago[skip ci] Updated translations via Crowdin
GiteaBot [Wed, 4 Oct 2023 00:23:10 +0000 (00:23 +0000)]
[skip ci] Updated translations via Crowdin

12 months agoRequire MySQL 8.0, PostgreSQL 12, MSSQL 2012 (#27337)
silverwind [Tue, 3 Oct 2023 17:27:57 +0000 (19:27 +0200)]
Require MySQL 8.0, PostgreSQL 12, MSSQL 2012 (#27337)

- MySQL 5.7 support and testing is dropped
- MySQL tests now execute against 8.1, up from 5.7 and 8.0
- PostgreSQL 10 and 11 support ist dropped
- PostgreSQL tests now execute against 16, up from 15
- MSSQL 2008 support is dropped
- MSSQL tests now run against locked 2022 version

Fixes: https://github.com/go-gitea/gitea/issues/25657
Ref: https://endoflife.date/mysql
Ref: https://endoflife.date/postgresql
Ref: https://endoflife.date/mssqlserver

## :warning: BREAKING :warning:

Support for MySQL 5.7, PostgreSQL 10 and 11, and MSSQL 2008 is dropped.
You are encouraged to upgrade to supported versions.

---------

Co-authored-by: techknowlogick <techknowlogick@gitea.com>
12 months agoAdd 1.20.5 changelog (#27404) (#27411)
Lunny Xiao [Tue, 3 Oct 2023 14:22:03 +0000 (22:22 +0800)]
Add 1.20.5 changelog (#27404) (#27411)

frontport #27404

---------

Co-authored-by: delvh <dev.lh@web.de>
12 months agoverify MinIO works with bitnami/minio:2023.8.31 (#27022)
Earl Warren [Tue, 3 Oct 2023 14:21:14 +0000 (16:21 +0200)]
verify MinIO works with bitnami/minio:2023.8.31 (#27022)

12 months agoEven more `db.DefaultContext` refactor (#27352)
JakobDev [Tue, 3 Oct 2023 10:30:41 +0000 (12:30 +0200)]
Even more `db.DefaultContext` refactor (#27352)

Part of #27065

---------

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: delvh <dev.lh@web.de>
12 months agoDon't use subselect in `DeleteIssuesByRepoID` (#27332)
JakobDev [Tue, 3 Oct 2023 08:17:28 +0000 (10:17 +0200)]
Don't use subselect in `DeleteIssuesByRepoID` (#27332)

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

This is workaround for a bug in MariaDB

12 months agoAdd support for HEAD ref in /src/branch and /src/commit routes (#27384)
Kirill Sorokin [Tue, 3 Oct 2023 07:37:06 +0000 (10:37 +0300)]
Add support for HEAD ref in /src/branch and /src/commit routes (#27384)

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

Closes #26920

12 months agoMake Actions tasks/jobs timeouts configurable by the user (#27400)
Francesco Antognazza [Mon, 2 Oct 2023 21:09:26 +0000 (23:09 +0200)]
Make Actions tasks/jobs timeouts configurable by the user (#27400)

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

---

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

Signed-off-by: Francesco Antognazza <francesco.antognazza@gmail.com>
12 months agoFix git 2.11 error when checking IsEmpty (again) (#27399)
wxiaoguang [Mon, 2 Oct 2023 15:59:39 +0000 (23:59 +0800)]
Fix git 2.11 error when checking IsEmpty (again) (#27399)

Follow  #27393

Sorry that I made a mistake in #27393. The `errbuf` is not empty when
the err is `exit status 129`.

12 months agoDifferentiate between `push` and `pull` `mirror sync in progress` (#27390)
delvh [Mon, 2 Oct 2023 14:52:18 +0000 (16:52 +0200)]
Differentiate between `push` and `pull` `mirror sync in progress` (#27390)

Previously, if you had both a push and a pull mirror, the message did
not clarify if you've accidentally synchronized the wrong one.
Additionally fixed two typos that were encountered while debugging.

## Screenshots

![grafik](https://github.com/go-gitea/gitea/assets/51889757/164d5d20-728d-4365-9cb5-c37e95857cdf)

![grafik](https://github.com/go-gitea/gitea/assets/51889757/90bfffd2-abd4-4847-b8e2-db4231700a6d)

12 months agoFix git 2.11 error when checking IsEmpty (#27393)
wxiaoguang [Mon, 2 Oct 2023 14:05:21 +0000 (22:05 +0800)]
Fix git 2.11 error when checking IsEmpty (#27393)

Fix #27389

12 months agofix: comment typo (#27388)
24601 [Mon, 2 Oct 2023 08:31:03 +0000 (16:31 +0800)]
fix: comment typo (#27388)

fix a typo in the comment

12 months agoTest more templates for if they contain an error (#27367)
Lunny Xiao [Mon, 2 Oct 2023 07:56:55 +0000 (15:56 +0800)]
Test more templates for if they contain an error (#27367)

12 months agoDocument the line-number counting behavior (#27386)
wxiaoguang [Mon, 2 Oct 2023 07:23:18 +0000 (15:23 +0800)]
Document the line-number counting behavior (#27386)

Ref #27377

12 months agoRemove upgrade from Gogs doc because the diverse has been 7 years and the code base...
Lunny Xiao [Mon, 2 Oct 2023 06:53:55 +0000 (14:53 +0800)]
Remove upgrade from Gogs doc because the diverse has been 7 years and the code base changed totally (#27387)

The documentation becomes no help since that but make people confusing.

12 months agoFix incorrect Chinese translation of linked-references.zh-cn.md (#27382)
Ayaka [Mon, 2 Oct 2023 06:13:08 +0000 (14:13 +0800)]
Fix incorrect Chinese translation of linked-references.zh-cn.md (#27382)

---

The original text "To address this" should be translated to "为了解决这个问题".
"工单" looks like corresponds to "issue".

12 months agolink to file from its history (#27354)
Denys Konovalov [Mon, 2 Oct 2023 04:04:32 +0000 (06:04 +0200)]
link to file from its history (#27354)

Fixes #3852
Fixes https://github.com/go-gitea/gitea/issues/26707

Add a button on file history which directs you to the file at the
selected commit.

Co-authored-by: silverwind <me@silverwind.io>
12 months agosimplify issue deletion query (#27312)
Earl Warren [Mon, 2 Oct 2023 02:30:10 +0000 (04:30 +0200)]
simplify issue deletion query (#27312)

- There's no need for `In` to be used, as it's a single parameter that's
being passed.

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

(cherry picked from commit 4a4955f43ae7fc50cfe3b48409a0a10c82625a19)

Co-authored-by: Gusted <postmaster@gusted.xyz>
12 months ago[skip ci] Updated licenses and gitignores
GiteaBot [Mon, 2 Oct 2023 00:23:46 +0000 (00:23 +0000)]
[skip ci] Updated licenses and gitignores

12 months agoCargo package - Fix missing domain in cargo sparse url (#27370)
merlleu [Sun, 1 Oct 2023 13:43:15 +0000 (15:43 +0200)]
Cargo package - Fix missing domain in cargo sparse url (#27370)

Hello, it seems that one my previous PR (adding the sparse index to the
cargo package content page), did not worked as expected: the
gitea-origin-url does not add the AppURL because of the `sparse+` prefix
in the url.
Currently the rendered page gives the following:
```toml
[registry]
default = "gitea"

[registries.gitea]
index = "sparse+/api/packages/ownername/cargo/" # Sparse index
# index = "https://git.example.com/ownername/_cargo-index.git" # Git

[net]
git-fetch-with-cli = true
```

12 months agoHide archived labels when filtering by labels on the issue list (#27115)
puni9869 [Sun, 1 Oct 2023 13:04:39 +0000 (18:34 +0530)]
Hide archived labels when filtering by labels on the issue list (#27115)

Followup  https://github.com/go-gitea/gitea/pull/26820
## Archived labels UI for issue filter and issue filter actions for
issues/pull request pages.

Changed:
* Enhanced the Issue filter and Issue filter actions UI page to
seamlessly incorporate a list of archived labels.
* Pagination functionality is same as before. If archived label checkbox
is checked then we are adding a query string`archived=true` in the url
to save the state of page.
* Issue filter actions menu is separated into different template.
* Adding the archived flag in issue url labels.
* Pull Request page is also work the same.

Outsourced:
* Defer the implementation of specialized handling for archived labels
to upcoming pull requests. This step will be undertaken subsequent to
the successful merge of this pull request.

Screenshots
### Issue page
<img width="1360" alt="image"
src="https://github.com/go-gitea/gitea/assets/80308335/d7efb2ef-5b2b-449d-83f0-d430a32ec432">

### Issue page with label filter on archived label checkbox when not
checked --> No archived label is there in list
<img width="1249" alt="image"
src="https://github.com/go-gitea/gitea/assets/80308335/ceea68ef-91f2-4693-910f-2e25e236bfc9">

### Issue page with label filter on archived label checkbox when checked
--> Show archived label in the list.
<img width="710" alt="image"
src="https://github.com/go-gitea/gitea/assets/80308335/2414d26b-2079-4c3c-bd9e-f2f5411bcabf">

### Issue page with label filter on issue action menu on archived label
checkbox when checked --> Show archived label in the list.
<img width="409" alt="image"
src="https://github.com/go-gitea/gitea/assets/80308335/259cac87-3e21-4778-99a2-a6a0b8c81178">

### Applied the archived=true in Issue labels when archived checkbox is
checked.
<img width="984" alt="image"
src="https://github.com/go-gitea/gitea/assets/80308335/657ce3db-c0ae-402e-b12d-3b580d3c2ed0">

---

Part of https://github.com/go-gitea/gitea/issues/25237

---------

Signed-off-by: puni9869 <punitinani1@hotmail.com>
Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: Giteabot <teabot@gitea.io>
12 months agoFix unexpected context canceled when migrating repository (#27368)
CaiCandong [Sun, 1 Oct 2023 12:04:35 +0000 (20:04 +0800)]
Fix unexpected context canceled when migrating repository (#27368)

Fix #27363

Regression of #27089

12 months agoFix ldap admin privileges update bug (#27051)
CaiCandong [Sun, 1 Oct 2023 11:32:12 +0000 (19:32 +0800)]
Fix ldap admin privileges update bug (#27051)

When the user does not set a username lookup condition, LDAP will get an
empty string `""` for the user, hence the following code
```
if isExist, err := user_model.IsUserExist(db.DefaultContext, 0, sr.Username)
```
The user presence determination will always be nonexistent, so updates
to user information will never be performed.

Fix #27049

12 months agoAllow get release download files and lfs files with oauth2 token format (#26430)
Lunny Xiao [Sun, 1 Oct 2023 10:41:52 +0000 (18:41 +0800)]
Allow get release download files and lfs files with oauth2 token format (#26430)

Fix #26165
Fix #25257

12 months agoFix missing ctx for GetRepoLink in dashboard (#27372)
CaiCandong [Sun, 1 Oct 2023 09:26:28 +0000 (17:26 +0800)]
Fix missing ctx for GetRepoLink in dashboard (#27372)

As title
Fix #27369
Regression of #27265

12 months agohighlight user details link (#26998)
Denys Konovalov [Sun, 1 Oct 2023 03:58:24 +0000 (05:58 +0200)]
highlight user details link (#26998)

This PR adds a separated column in the users table for operations. The
username link now redirects back to user page.

![grafik](https://github.com/go-gitea/gitea/assets/47871822/df8c8b30-3da6-443c-ae0f-6e3cac7dd9bb)

Resolves
https://github.com/go-gitea/gitea/pull/26713#pullrequestreview-1603001285

Co-authored-by: silverwind <me@silverwind.io>
12 months agoFeed UI Improvements (#27356)
silverwind [Sat, 30 Sep 2023 15:48:34 +0000 (17:48 +0200)]
Feed UI Improvements (#27356)

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">

12 months agoAbsolute positioned checkboxes overlay floated elements (#26870)
Rafael Heard [Sat, 30 Sep 2023 09:30:44 +0000 (05:30 -0400)]
Absolute positioned checkboxes  overlay floated elements (#26870)

Currently, checkboxes are positioned as absolute. This positioning
causes the input to overlay an element that has been floated within the
editor. Floated elements are useful if you want your text to wrap around
this element. This PR fixes the overlaying of checkboxes by removing the
absolute positioning, updating the `ul` padding, and
displaying`.task-list-item` `flex` to ensure inputs and the associated
label are on the same line.

Screenshots:

Before:
<img width="762" alt="Screenshot 2023-09-01 at 3 40 59 PM"
src="https://github.com/go-gitea/gitea/assets/6152817/570247c7-7f5c-4697-bfc9-ad4655e37991">

After:
<img width="762" alt="Screenshot 2023-09-01 at 3 42 20 PM"
src="https://github.com/go-gitea/gitea/assets/6152817/db53df45-1294-4eee-84c0-b21ac4fdf805">

---------

Co-authored-by: rafh <rafaelheard@gmail.com>
12 months agoFix template bug (#27362)
Lunny Xiao [Sat, 30 Sep 2023 09:03:04 +0000 (17:03 +0800)]
Fix template bug (#27362)

Fix #27361

12 months ago[skip ci] Updated translations via Crowdin
GiteaBot [Sat, 30 Sep 2023 00:22:01 +0000 (00:22 +0000)]
[skip ci] Updated translations via Crowdin

12 months agoFix repo count in org action settings (#27245)
yp05327 [Fri, 29 Sep 2023 15:46:07 +0000 (00:46 +0900)]
Fix repo count in org action settings (#27245)

Only in org action settings, repo count is missing

Before:

![image](https://github.com/go-gitea/gitea/assets/18380374/4a74c090-c55f-4f06-810a-c390337efa9d)

![image](https://github.com/go-gitea/gitea/assets/18380374/e234f7e7-178c-4186-bbc0-0f291192b011)

![image](https://github.com/go-gitea/gitea/assets/18380374/c1db70cd-973b-40d5-ba17-1f354aed9149)
In other setting page:

![image](https://github.com/go-gitea/gitea/assets/18380374/43bfec6b-a1a4-48a9-8280-ab6f967b7ec4)

After:

![image](https://github.com/go-gitea/gitea/assets/18380374/9a697bd8-ce9f-40e2-8749-b46726d68d84)

![image](https://github.com/go-gitea/gitea/assets/18380374/3b6d1e59-64dd-4655-953b-064718e6aa7a)

![image](https://github.com/go-gitea/gitea/assets/18380374/5604c063-556c-4252-8778-4e5a5e23b7e1)

12 months agoIntroduce fixes and more rigorous tests for 'Show on a map' feature (#26803)
Panagiotis "Ivory" Vasilopoulos [Fri, 29 Sep 2023 14:57:06 +0000 (14:57 +0000)]
Introduce fixes and more rigorous tests for 'Show on a map' feature (#26803)

This change introduces a fix for the PR #26214 to set the UserLocationMapURL correctly.

12 months agoAdd protected branch name description (#27257)
Lunny Xiao [Fri, 29 Sep 2023 14:02:35 +0000 (22:02 +0800)]
Add protected branch name description (#27257)

Co-authored-by: delvh <dev.lh@web.de>
12 months agorename TotalTimes() to TotalTimesForEachUser() (#27261)
6543 [Fri, 29 Sep 2023 13:04:14 +0000 (14:04 +0100)]
rename TotalTimes() to TotalTimesForEachUser() (#27261)

make function name more descriptive as it would otherwise imply it could
be used for e.g. #26672 too ...

---
*Sponsored by Kithara Software GmbH*

12 months agoMore `db.DefaultContext` refactor (#27265)
JakobDev [Fri, 29 Sep 2023 12:12:54 +0000 (14:12 +0200)]
More `db.DefaultContext` refactor (#27265)

Part of #27065

This PR touches functions used in templates. As templates are not static
typed, errors are harder to find, but I hope I catch it all. I think
some tests from other persons do not hurt.

12 months agoImprove tree not found page (#26570)
yp05327 [Fri, 29 Sep 2023 07:42:39 +0000 (16:42 +0900)]
Improve tree not found page (#26570)

Before:

![before](https://github.com/go-gitea/gitea/assets/18380374/383822d5-7d77-4ec3-b49b-4ab1e8b167ce)

After:

![after](https://github.com/go-gitea/gitea/assets/18380374/32afa0a3-fa05-4087-b96e-7d067f0ed756)

In Github:
https://github.com/yp05327/test/blob/main/test.drawio

Updated:
UI changed

![image](https://github.com/go-gitea/gitea/assets/18380374/41ed07ff-b815-4b4e-9779-5ab36b5f3980)

![image](https://github.com/go-gitea/gitea/assets/18380374/5d7b28d6-a2fc-4d4c-8d6d-d93f9c9a270b)

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
12 months agoUpdate comparison page with RhodeCode CE & EE (#27329)
Marcin Kuźmiński [Fri, 29 Sep 2023 05:31:54 +0000 (07:31 +0200)]
Update comparison page with RhodeCode CE & EE (#27329)

Update RhodeCode features and add EE version

12 months agoAdd logs for data broken of comment review (#27326)
Lunny Xiao [Fri, 29 Sep 2023 02:31:36 +0000 (10:31 +0800)]
Add logs for data broken of comment review (#27326)

Fix #27306

12 months agoAdd support for forking single branch (#25821)
Dmitry Sharshakov [Fri, 29 Sep 2023 01:48:39 +0000 (04:48 +0300)]
Add support for forking single branch (#25821)

Fixes #25117

Add UI for choosing branch to fork

Change default branch on single-branch forks

![image](https://github.com/go-gitea/gitea/assets/19504461/28505f69-a9a2-43a8-8b19-a0cdac3ddc5a)

---------

Co-authored-by: Denys Konovalov <kontakt@denyskon.de>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
12 months ago[skip ci] Updated translations via Crowdin
GiteaBot [Fri, 29 Sep 2023 00:23:01 +0000 (00:23 +0000)]
[skip ci] Updated translations via Crowdin

12 months agoFix the approval count of PR when there is no protection branch rule (#27272)
Nanguan Lin [Thu, 28 Sep 2023 23:24:36 +0000 (07:24 +0800)]
Fix the approval count of PR when there is no protection branch rule (#27272)

As title

![ksnip_20230926-115158](https://github.com/go-gitea/gitea/assets/70063547/a60be44a-06ad-421e-ba27-e4e0adfa5db7)

12 months agoAdd Index to `comment.dependent_issue_id` (#27325)
JakobDev [Thu, 28 Sep 2023 20:58:35 +0000 (22:58 +0200)]
Add Index to `comment.dependent_issue_id` (#27325)

This Column is missing index. It is used by
[issue_service.deleteIssue](https://github.com/go-gitea/gitea/blob/7ea2a910cebaf51cfd13c0941029c404e408ae54/services/issue/issue.go#L300).

Co-authored-by: Giteabot <teabot@gitea.io>
12 months agoImprovements of releases list and tags list (#25859)
Zettat123 [Thu, 28 Sep 2023 13:21:47 +0000 (21:21 +0800)]
Improvements of releases list and tags list (#25859)

Follow #23465 and #25624

This PR introduces the following improvements:
- We do not need to call `GetTags` to get tags because tags have been
loaded by `RepoAssignment`

https://github.com/go-gitea/gitea/blob/ef90fdbd1d7e1f62ed5bf18757e00e97817eb602/modules/context/repo.go#L663-L668
- Similarly, the number of tags and releases also have been loaded by
`RepoAssignment`, so the related code has been removed from the
handlers. The query condition of `GetReleaseCountByRepoID` in
`RepoAssignment` has been changed to include draft releases.

https://github.com/go-gitea/gitea/blob/ef90fdbd1d7e1f62ed5bf18757e00e97817eb602/modules/context/repo.go#L538-L551
- `releasesOrTags` function has been removed. The code for rendering
releases list and tags list moved to `Releases` and `TagList`
respectively.

12 months agoFix Bug in Issue Config when only contact links are set (#26521)
JakobDev [Thu, 28 Sep 2023 12:16:40 +0000 (14:16 +0200)]
Fix Bug in Issue Config when only contact links are set (#26521)

Blank Issues should be enabled if they are not explicit disabled through
the `blank_issues_enabled` field of the Issue Config. The Implementation
has currently a Bug: If you create a Issue Config file with only
`contact_links` and without a `blank_issues_enabled` field,
`blank_issues_enabled` is set to false by default.

The fix is only one line, but I decided to also improve the tests to
make sure there are no other problems with the Implementation.

This is a bugfix, so it should be backported to 1.20.

12 months agoFix review UI (#27322)
wxiaoguang [Thu, 28 Sep 2023 10:00:26 +0000 (18:00 +0800)]
Fix review UI (#27322)

Close #26730

1. The `diff-detail-box` was abused, it shouldn't be used for
"DiffFileList/DiffFileTree".
2. Fix the sticky position for various screens.

![image](https://github.com/go-gitea/gitea/assets/2114189/558a5c06-c94c-4e5c-8395-d38473dd21c2)

![image](https://github.com/go-gitea/gitea/assets/2114189/3390fb0e-7dc7-457f-bd0c-398fdb6d24c0)

![image](https://github.com/go-gitea/gitea/assets/2114189/d19dd350-aecf-4909-8ef9-73b09d94560e)

12 months agoImprove issue history dialog and make poster can delete their own history (#27323)
wxiaoguang [Thu, 28 Sep 2023 08:43:20 +0000 (16:43 +0800)]
Improve issue history dialog and make poster can delete their own history (#27323)

Fix #27313 (see the comment)

And some UI improvements:

### Before

![image](https://github.com/go-gitea/gitea/assets/2114189/420a314d-8f34-4e30-a557-f41cf4f0d2f2)

![image](https://github.com/go-gitea/gitea/assets/2114189/60ca0be4-b55e-4e65-be73-fd53e0d4fc36)

### After

![image](https://github.com/go-gitea/gitea/assets/2114189/d354f815-5a0c-4e63-8d59-d03ed344dbea)

![image](https://github.com/go-gitea/gitea/assets/2114189/6ef437a4-aa6f-4917-a260-00625ee71e79)

![image](https://github.com/go-gitea/gitea/assets/2114189/9d88a36c-616b-4dc9-8c6b-76adaad8acf6)

12 months agoImprove branch list UI (#27319)
wxiaoguang [Thu, 28 Sep 2023 04:04:32 +0000 (12:04 +0800)]
Improve branch list UI (#27319)

1. Put the `"octicon-shield-lock"` into the flex container, then it
doesn't need a separate flex box
2. Remove some unnecessary `gt-df` helpers
3. Make `btn` button has the same flex behavior as `ui button`

![image](https://github.com/go-gitea/gitea/assets/2114189/60ce75f7-7fac-4157-9c42-91c7dee9300e)

![image](https://github.com/go-gitea/gitea/assets/2114189/ea606baf-6f52-41e1-b964-c4840d3b1529)

12 months agodoctor: delete action entries without existing user (#27292)
6543 [Thu, 28 Sep 2023 03:03:08 +0000 (04:03 +0100)]
doctor: delete action entries without existing user (#27292)

just extend doctor with a usefully check :)

Co-authored-by: techknowlogick <techknowlogick@gitea.com>
12 months agofix orphan check for deleted branch (#27310)
Earl Warren [Thu, 28 Sep 2023 02:07:33 +0000 (04:07 +0200)]
fix orphan check for deleted branch (#27310)

- Modify the deleted branch orphan check to check for the new table
instead.
- Regression from 6e19484f4d3bf372212f2da462110a1a8c10cbf2
- Resolves https://codeberg.org/forgejo/forgejo/issues/1522

(cherry picked from commit c1d888686fe445e4edecb9d835c5b3893b574b75)

Co-authored-by: Gusted <postmaster@gusted.xyz>
12 months agomake writing main test easier (#27270)
Lunny Xiao [Thu, 28 Sep 2023 01:38:53 +0000 (09:38 +0800)]
make writing main test easier (#27270)

This PR removed `unittest.MainTest` the second parameter
`TestOptions.GiteaRoot`. Now it detects the root directory by current
working directory.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
12 months ago[skip ci] Updated translations via Crowdin
GiteaBot [Thu, 28 Sep 2023 00:22:57 +0000 (00:22 +0000)]
[skip ci] Updated translations via Crowdin

12 months agoFix protected branch icon location (#26576)
yp05327 [Wed, 27 Sep 2023 22:21:31 +0000 (07:21 +0900)]
Fix protected branch icon location (#26576)

12 months agomove the `gitea admin` subcommands into separate files (#27307)
Nanguan Lin [Wed, 27 Sep 2023 12:25:38 +0000 (20:25 +0800)]
move the `gitea admin` subcommands into separate files (#27307)

As title.
Probably it's better to put those sub cmd to different dirs. Will do
that in the future.

12 months agoFix chinese translation (#27296)
Lunny Xiao [Wed, 27 Sep 2023 08:15:12 +0000 (16:15 +0800)]
Fix chinese translation (#27296)

Fix translation from #27291
Source Map will be kept as English in Chinese usage habit.

12 months agobump bleve (#27300)
techknowlogick [Wed, 27 Sep 2023 07:10:58 +0000 (03:10 -0400)]
bump bleve (#27300)

Co-authored-by: yp05327 <576951401@qq.com>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
12 months agoRedefine the meaning of column is_active to make Actions Registration Token generatio...
Lunny Xiao [Wed, 27 Sep 2023 05:37:48 +0000 (13:37 +0800)]
Redefine the meaning of column is_active to make Actions Registration Token generation easier (#27143)

Partially Fix #25041

This PR redefined the meaning of column `is_active` in table
`action_runner_token`.
Before this PR, `is_active` means whether it has been used by any
runner. If it's true, other runner cannot use it to register again.

In this PR, `is_active` means whether it's validated to be used to
register runner. And if it's true, then it can be used to register
runners until it become false. When creating a new `is_active` register
token, any previous tokens will be set `is_active` to false.

12 months agoUse vitest globals (#27102)
silverwind [Wed, 27 Sep 2023 04:37:13 +0000 (06:37 +0200)]
Use vitest globals (#27102)

Enable [globals](https://vitest.dev/config/#globals) in vitest, reducing
the noise in test files.

12 months agoFix divider in subscription page (#27298)
yp05327 [Wed, 27 Sep 2023 04:00:57 +0000 (13:00 +0900)]
Fix divider in subscription page (#27298)

the divider should always display in the subscription page.

Co-authored-by: techknowlogick <techknowlogick@gitea.com>
12 months agoFix yaml test (#27297)
Lunny Xiao [Wed, 27 Sep 2023 03:30:03 +0000 (11:30 +0800)]
Fix yaml test (#27297)

12 months agoEnable production source maps for index.js, fix CSS sourcemaps (#27291)
silverwind [Wed, 27 Sep 2023 02:05:49 +0000 (04:05 +0200)]
Enable production source maps for index.js, fix CSS sourcemaps (#27291)

Previously, the production build never output sourcemaps. Now we emit
one file for `index.js` because it is the most likely one where we need
to be able to better debug reported issues like
https://github.com/go-gitea/gitea/issues/27213. This will currently
increase the binary size of gitea by around 700kB which is what the
gzipped source map file has.

Also, I fixed the CSS sourcemap generation which was broken since the
introduction of lightningcss.

12 months agoFix some animation bugs (#27287)
wxiaoguang [Wed, 27 Sep 2023 01:15:58 +0000 (09:15 +0800)]
Fix some animation bugs (#27287)

Fix #27286
Replace #27279

12 months agoAdd missed return to actions view fetch (#27289)
silverwind [Wed, 27 Sep 2023 00:34:52 +0000 (02:34 +0200)]
Add missed return to actions view fetch (#27289)

Should fix: #27213

12 months agoFix more yaml lint errors (#27284)
Lunny Xiao [Tue, 26 Sep 2023 16:56:42 +0000 (00:56 +0800)]
Fix more yaml lint errors (#27284)

Fix #27268

12 months agoFix incorrect change from #27231 (#27275)
delvh [Tue, 26 Sep 2023 13:10:29 +0000 (15:10 +0200)]
Fix incorrect change from #27231 (#27275)

12 months agoAdd missing IconHTML size (#27269)
wxiaoguang [Tue, 26 Sep 2023 11:59:04 +0000 (19:59 +0800)]
Add missing IconHTML size (#27269)

Fix #27223

Regression of #27122

12 months agoDocument the queue item's marshaling behavior (#27271)
wxiaoguang [Tue, 26 Sep 2023 05:58:57 +0000 (13:58 +0800)]
Document the queue item's marshaling behavior (#27271)

Close #26843

12 months ago[skip ci] Updated translations via Crowdin
GiteaBot [Tue, 26 Sep 2023 00:23:08 +0000 (00:23 +0000)]
[skip ci] Updated translations via Crowdin

12 months agoAnother round of `db.DefaultContext` refactor (#27103)
JakobDev [Mon, 25 Sep 2023 13:17:37 +0000 (15:17 +0200)]
Another round of `db.DefaultContext` refactor (#27103)

Part of #27065

---------

Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
12 months agoFix more "locale" usages (#27259)
wxiaoguang [Mon, 25 Sep 2023 12:42:40 +0000 (20:42 +0800)]
Fix more "locale" usages (#27259)

12 months agoAlways use `ctx.Locale.Tr` inside templates (#27231)
delvh [Mon, 25 Sep 2023 08:56:50 +0000 (10:56 +0200)]
Always use `ctx.Locale.Tr` inside templates (#27231)

12 months agoDisable `Test Delivery` and `Replay` webhook buttons when webhook is inactive (#27211)
Yarden Shoham [Mon, 25 Sep 2023 07:33:00 +0000 (10:33 +0300)]
Disable `Test Delivery` and `Replay` webhook buttons when webhook is inactive (#27211)

These buttons are now disabled when the webhook is not active.

The buttons were always enabled before this change.

- Fixes #26824
- Replaces #26814

# Before

![image](https://github.com/go-gitea/gitea/assets/20454870/e783d0d8-b433-440e-b95f-50d7c42613d3)

![image](https://github.com/go-gitea/gitea/assets/20454870/b4886151-9f32-4e83-8001-dd3f20c23d70)

# After

![image](https://github.com/go-gitea/gitea/assets/20454870/74b76a72-0818-4143-8548-5d42c4119a05)

![image](https://github.com/go-gitea/gitea/assets/20454870/d5ae4e5c-c1ac-4751-a072-e6f7511b1e07)

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
12 months agoAdd missing public user visibility in user details page (#27246)
yp05327 [Mon, 25 Sep 2023 06:27:03 +0000 (15:27 +0900)]
Add missing public user visibility in user details page (#27246)

It seems that `Public` user visibility is missing in the template.

Before:

![image](https://github.com/go-gitea/gitea/assets/18380374/a8e7f3e0-1b77-41a0-921a-10adba90211e)

After:

![image](https://github.com/go-gitea/gitea/assets/18380374/b0bffe13-0ca6-453e-95d7-0794528d5733)

12 months agoUse mask-based fade-out effect for `.new-menu` (#27181)
silverwind [Mon, 25 Sep 2023 01:03:00 +0000 (03:03 +0200)]
Use mask-based fade-out effect for `.new-menu` (#27181)

The `.new-menu` was using a pseudo-element based fade-out effect.
Replace this with a more modern mask-based effect which in this case
required a child element to avoid fading out the background as well, so
I applied it to child `new-menu-inner` which was present on all these
menus except explore where I added it.

There is no visual difference except that the items on the explore page
have no `gap` between them any longer, making it consistent with other
menus. Before and after:

<img width="221" alt="Screenshot 2023-09-21 at 21 13 19"
src="https://github.com/go-gitea/gitea/assets/115237/b4a38ce2-cee1-4c54-84a5-e1d0bfd79e29">
<img width="222" alt="Screenshot 2023-09-21 at 21 32 36"
src="https://github.com/go-gitea/gitea/assets/115237/bb6b1335-d935-4ad4-bb85-3b0fc3027c2b">

Also, this cleans up the related CSS vars:

- `--color-header-wrapper-transparent` is removed, no longer needed
- `--color-header-wrapper` is defined in base theme as well, was
previously unset and therefor transparent.

[no whitespace
diff](https://github.com/go-gitea/gitea/pull/27181/files?diff=unified&w=1)
[demo of mask fade](https://jsfiddle.net/silverwind/tsfadb3u/)

12 months ago[skip ci] Updated translations via Crowdin
GiteaBot [Mon, 25 Sep 2023 00:24:48 +0000 (00:24 +0000)]
[skip ci] Updated translations via Crowdin

12 months agoFix z-index on markdown completion (#27237)
silverwind [Sun, 24 Sep 2023 23:29:36 +0000 (01:29 +0200)]
Fix z-index on markdown completion (#27237)

Fixes: https://github.com/go-gitea/gitea/issues/27230
12 months agoUpdate database-preparation and add note re: MariaDB (#27232)
techknowlogick [Sun, 24 Sep 2023 21:24:17 +0000 (17:24 -0400)]
Update database-preparation and add note re: MariaDB (#27232)

update DB docs per feedback.
https://gitea.com/gitea/gitea-docusaurus/issues/69

12 months agocleanup locale function usage (#27227)
Denys Konovalov [Sun, 24 Sep 2023 20:31:58 +0000 (22:31 +0200)]
cleanup locale function usage (#27227)