]> source.dussan.org Git - gitea.git/log
gitea.git
17 months agonightly image tag for releases
techknowlogick [Mon, 1 May 2023 18:18:56 +0000 (14:18 -0400)]
nightly image tag for releases

17 months agoRemove `font-awesome` and fomantic `icon` module (#24471)
silverwind [Mon, 1 May 2023 17:25:54 +0000 (19:25 +0200)]
Remove `font-awesome` and fomantic `icon` module (#24471)

Fixes https://github.com/go-gitea/gitea/issues/10410.
This PR removes around 120kB of CSS.

17 months agoImprove "new-menu" (#24465)
wxiaoguang [Mon, 1 May 2023 16:08:37 +0000 (00:08 +0800)]
Improve "new-menu" (#24465)

I am not sure what "new-menu" means, but I think we need to fix these
problems:

1. it shouldn't have "stackable", which makes the items stacked when
width is small. the `new-menu` already has `overflow: auto`
2. `justify-content: center` doesn't work with `overflow: auto` (for
small width), so use `margin: auto`
*
https://bhch.github.io/posts/2021/04/centring-flex-items-and-allowing-overflow-scroll/
3. `runner-new-menu` is dead code (copying & pasting ?)

17 months agoRemove fomantic breadcrumb module (#24463)
silverwind [Mon, 1 May 2023 15:40:02 +0000 (17:40 +0200)]
Remove fomantic breadcrumb module (#24463)

### File path before/after

<img width="522" alt="Screenshot 2023-05-01 at 13 23 33"
src="https://user-images.githubusercontent.com/115237/235445636-57776038-c98e-4cab-8abe-045138a76958.png">
<img width="522" alt="Screenshot 2023-05-01 at 13 24 08"
src="https://user-images.githubusercontent.com/115237/235445638-70bef62a-1b70-41f8-ba51-728db4d54402.png">

### File edit before/after

<img width="499" alt="Screenshot 2023-05-01 at 13 24 46"
src="https://user-images.githubusercontent.com/115237/235445676-7b3cc23e-289b-40a6-8d4f-0d7fb2efb55e.png">
<img width="497" alt="Screenshot 2023-05-01 at 13 24 52"
src="https://user-images.githubusercontent.com/115237/235445677-db9f3974-8456-46de-a32b-9198110c0540.png">

### Cherry-pick before/after

<img width="590" alt="Screenshot 2023-05-01 at 13 25 30"
src="https://user-images.githubusercontent.com/115237/235445717-99445024-1bb2-46d4-9bd8-8086bad57d34.png">
<img width="582" alt="Screenshot 2023-05-01 at 13 25 37"
src="https://user-images.githubusercontent.com/115237/235445720-9c1dc497-eb23-4e10-a727-27f4d6df69e6.png">

17 months agoAdd rerun workflow button and refactor to use SVG octicons (#24350)
yp05327 [Mon, 1 May 2023 14:14:20 +0000 (23:14 +0900)]
Add rerun workflow button and refactor to use SVG octicons (#24350)

Changes:
- Add rerun workflow button. Then users can rerun the whole workflow by
only one-click.
- Refactor to use SVG octicons in RepoActionView.vue

![image](https://user-images.githubusercontent.com/18380374/234736083-dea9b333-ec11-4095-a113-763f3716fba7.png)

![image](https://user-images.githubusercontent.com/18380374/234736107-d657d19c-f70a-42f4-985f-156a8c7efb7a.png)

![image](https://user-images.githubusercontent.com/18380374/234736160-9ad372df-7089-4d18-9bab-48bca3f01878.png)

---------

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
17 months agoRemove .lgtm and reference to old bot (#24464)
silverwind [Mon, 1 May 2023 12:49:30 +0000 (14:49 +0200)]
Remove .lgtm and reference to old bot (#24464)

Since we now use
[gitea-backporter](https://github.com/GiteaBot/gitea-backporter) for
LGTM, we no longer need this.

17 months agoRemove unnecessary g-menu-stackable-scrollable (#24462)
wxiaoguang [Mon, 1 May 2023 10:51:14 +0000 (18:51 +0800)]
Remove unnecessary g-menu-stackable-scrollable (#24462)

Fix #24460

That's a mistake but ..... no idea why I wrote so ... remove it.

17 months agoReplace remaining fontawesome dropdown icons with SVG (#24455)
silverwind [Mon, 1 May 2023 09:35:02 +0000 (11:35 +0200)]
Replace remaining fontawesome dropdown icons with SVG (#24455)

- Replace leftover dropdown triangles with SVG
- Replace remove icon with SVG and add styling for it:

<img width="817" alt="Screenshot 2023-05-01 at 00 40 05"
src="https://user-images.githubusercontent.com/115237/235379271-4674d4f7-b11e-4d6d-90f9-1478325443ca.png">
<img width="816" alt="Screenshot 2023-05-01 at 00 46 56"
src="https://user-images.githubusercontent.com/115237/235379451-b515afb3-9773-4f6f-a259-e7048235bcba.png">

17 months agoMove links out of translation (#24446)
KN4CK3R [Mon, 1 May 2023 07:17:27 +0000 (09:17 +0200)]
Move links out of translation (#24446)

Addition to
https://github.com/go-gitea/gitea/pull/24426#discussion_r1181261215

I updated all existing translations too because otherwise they would
show something like

> For more information on the Container registry, see [the
documentation](#).%!(EXTRA
string=https://docs.gitea.io/en-us/packages/container/)

---------

Co-authored-by: Giteabot <teabot@gitea.io>
17 months agotarget correct conditional
techknowlogick [Mon, 1 May 2023 04:31:50 +0000 (00:31 -0400)]
target correct conditional

17 months ago[skip ci] Updated licenses and gitignores
GiteaBot [Mon, 1 May 2023 00:25:30 +0000 (00:25 +0000)]
[skip ci] Updated licenses and gitignores

17 months agoSet stop_on_error (#24453)
KN4CK3R [Sun, 30 Apr 2023 22:31:16 +0000 (00:31 +0200)]
Set stop_on_error (#24453)

Current air version runs the old binary if the build fails. This
restores the old behaviour.

```
...
code.gitea.io/gitea/services/cron
code.gitea.io/gitea/routers/web/user/setting
code.gitea.io/gitea/routers/web/org
make[2]: *** [Makefile:814: gitea] Error 1
make[2]: Leaving directory '/src'
failed to build, error: exit status 2
running...
2023/04/30 21:04:11 cmd/web.go:125:runWeb() [I] Starting Gitea on PID: 29153
2023/04/30 21:04:11 cmd/web.go:178:runWeb() [I] Global init
...
```

Reference: https://github.com/cosmtrek/air/pull/336

17 months agoRemove all direct references to font-awesome (#24448)
Yarden Shoham [Sun, 30 Apr 2023 22:02:56 +0000 (01:02 +0300)]
Remove all direct references to font-awesome (#24448)

- Related #10410
- I had to add an SVG for an empty checkbox
https://github.com/primer/octicons/issues/942

# Before

![image](https://user-images.githubusercontent.com/20454870/235374683-13f355c3-1245-40db-adda-4c710fc80288.png)

# After

![image](https://user-images.githubusercontent.com/20454870/235374655-cc637132-f314-424d-9243-13d45b8915d5.png)

---------

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
17 months agoAdd `ui-monospace` and `SF Mono` to `--fonts-monospace` (#24442)
silverwind [Sun, 30 Apr 2023 18:58:32 +0000 (20:58 +0200)]
Add `ui-monospace` and `SF Mono` to `--fonts-monospace` (#24442)

- Add `ui-monospace` to support Safari 13.4+.
- Add `SF Mono` variant to support the font on non-mac.
- Quote fonts as per [W3C
recommendation](https://www.w3.org/TR/2018/REC-css-fonts-3-20180920/#propdef-font-family).

> it is recommended to quote font family names that contain white space,
digits, or punctuation characters other than hyphens

Fixes: https://github.com/go-gitea/gitea/issues/22125
17 months agoFix incorrect CurrentUser check for docker rootless (#24441)
wxiaoguang [Sun, 30 Apr 2023 18:14:57 +0000 (02:14 +0800)]
Fix incorrect CurrentUser check for docker rootless (#24441)

The IsRunUserMatchCurrentUser logic is fragile, the "SSH" config is not
ready when it executes.

17 months agoFix config list overflow and layout (#24312)
silverwind [Sun, 30 Apr 2023 17:32:07 +0000 (19:32 +0200)]
Fix config list overflow and layout (#24312)

Fixes: https://github.com/go-gitea/gitea/issues/24299
<img width="531" alt="Screenshot 2023-04-24 at 21 05 40"
src="https://user-images.githubusercontent.com/115237/234091905-9db42697-87b3-40a0-bd18-9e910ad8a2ae.png">

17 months agoMove docs pipelines to use Actions (#24434)
techknowlogick [Sun, 30 Apr 2023 16:23:26 +0000 (12:23 -0400)]
Move docs pipelines to use Actions (#24434)

similar to #24314, this moves drone cron pipelines to (GitHub) Actions.
As these are mostly compatible with Gitea Actions, when we start to
dogfood, these will already be migrated.

I also removed the discord notify pipeline, as it hasn't been working
for several months.

17 months agoImprove issue list filter (#24425)
wxiaoguang [Sun, 30 Apr 2023 15:51:20 +0000 (23:51 +0800)]
Improve issue list filter (#24425)

Partial regression of #24393, not only regression, but broken for long
time, 24393 didn't really improve it but used wrong `overflow: scroll`.

Actually, that "ui secondary filter menu labels" shouldn't be set as
scrollable (I missed that at that time), the problem is: if a "ui menu"
has "dropdown" items, then it should not be scrollable. Otherwise the
dropdown menu can't be shown correctly.

And there are more problems:

* The "issue-filters" shouldn't be used anywhere else (copying&pasting
problem again ....)
* There is also an "issue-actions" container, it should also be fixed.
* There are similar problems on the milestone page.
* The old comment in code: "grid column" doesn't work well.

The major changes of this PR are: use "flex: 1" instead of "ui grid
column".

After this PR, not 100% perfect but much better than before.

17 months agoMove `Rename branch` from repo settings page to the page of branches list (#24380)
sillyguodong [Sun, 30 Apr 2023 15:08:51 +0000 (23:08 +0800)]
Move `Rename branch` from repo settings page to the page of branches list (#24380)

Co-Author: @wxiaoguang

It is more convenient that user just need to enter a new branch name after he selects the branch which he want to rename.
So this PR move the function of renaming branch to the page of branches list.

This PR also restyle the button of `new branch`, `download`, `delete`....

https://user-images.githubusercontent.com/33891828/235277997-413060bb-759f-430a-b5c4-df5e40ffcd28.mov

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
17 months agoImprove milestone filter on issues page (#22423)
Lunny Xiao [Sun, 30 Apr 2023 13:12:49 +0000 (21:12 +0800)]
Improve milestone filter on issues page (#22423)

Now we have `All milestones`, `No milestones`, `Open milestones` and
`Closed milestones`.
Fix #11924
Fix #22411

<img width="1166" alt="image"
src="https://user-images.githubusercontent.com/81045/212243375-95eea035-a972-44b8-8088-53db614cb07e.png">

17 months agoUse globally shared HTMLRender (#24436)
wxiaoguang [Sun, 30 Apr 2023 12:22:23 +0000 (20:22 +0800)]
Use globally shared HTMLRender (#24436)

The old `HTMLRender` is not ideal.

1. It shouldn't be initialized multiple times, it consumes a lot of
memory and is slow.
2. It shouldn't depend on short-lived requests, the `WatchLocalChanges`
needs a long-running context.
3. It doesn't make sense to use FuncsMap slice.

HTMLRender was designed to only work for GItea's specialized 400+
templates, so it's good to make it a global shared instance.

17 months agoRework header bar on issue, pull requests and milestone (#24420)
silverwind [Sun, 30 Apr 2023 03:33:25 +0000 (05:33 +0200)]
Rework header bar on issue, pull requests and milestone (#24420)

- Make search bar dynamic full width via flexbox
- Make all buttons `small` so font size is the same for all elements in
the header
- Remove primary color from search field, add SVG icon like on Code tab
- Fix button vertical padding being enlarged by SVG icons

[View diff without
whitespace](https://github.com/go-gitea/gitea/pull/24420/files?diff=unified&w=1)

<img width="1226" alt="Screenshot 2023-04-29 at 11 58 53"
src="https://user-images.githubusercontent.com/115237/235296851-74848267-664f-4c1f-b94c-a1b94196ff75.png">
<img width="1219" alt="Screenshot 2023-04-29 at 11 59 39"
src="https://user-images.githubusercontent.com/115237/235296852-bcfde5ed-8658-43c2-b7e5-3ad84611e76f.png">

Mobile:
<img width="437" alt="Screenshot 2023-04-29 at 11 59 52"
src="https://user-images.githubusercontent.com/115237/235296860-99263373-7b27-4540-868c-a93e70f281ca.png">
<img width="433" alt="Screenshot 2023-04-29 at 12 00 00"
src="https://user-images.githubusercontent.com/115237/235296862-6cf64317-a864-405a-a00f-b5ab620349f5.png">

17 months ago[skip ci] Updated translations via Crowdin
GiteaBot [Sun, 30 Apr 2023 00:25:54 +0000 (00:25 +0000)]
[skip ci] Updated translations via Crowdin

17 months agoRemove unused setting `time.FORMAT` (#24430)
Yarden Shoham [Sat, 29 Apr 2023 20:51:43 +0000 (23:51 +0300)]
Remove unused setting `time.FORMAT` (#24430)

It's loaded and then never used.

---------

Co-authored-by: Giteabot <teabot@gitea.io>
17 months agoFix user-cards format (#24428)
KN4CK3R [Sat, 29 Apr 2023 19:43:01 +0000 (21:43 +0200)]
Fix user-cards format (#24428)

Fixes #24418

17 months agoAdd follow organization and fix the logic of following page (#24345)
yp05327 [Sat, 29 Apr 2023 19:13:58 +0000 (04:13 +0900)]
Add follow organization and fix the logic of following page (#24345)

![image](https://user-images.githubusercontent.com/18380374/234740589-066f2e5c-30c7-4fc3-a539-066100e1f138.png)

![image](https://user-images.githubusercontent.com/18380374/234740605-88efe55d-7eaa-422e-ab86-0b5a402ca11c.png)

Maybe we can fix user card tmpl in #24319?
Or maybe a list is better here

![image](https://user-images.githubusercontent.com/18380374/234451417-7f93df20-4b19-4abb-a62d-4c67e1aa2220.png)

---------

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Giteabot <teabot@gitea.io>
17 months agoAdd "Updated" column for admin repositories list (#24429)
Yarden Shoham [Sat, 29 Apr 2023 18:40:10 +0000 (21:40 +0300)]
Add "Updated" column for admin repositories list (#24429)

- Closes #12454

# Before

![image](https://user-images.githubusercontent.com/20454870/235314351-82f5a414-7827-4029-8779-a837283a5a05.png)
# After

![image](https://user-images.githubusercontent.com/20454870/235314376-ccf4bb95-6823-4fce-9b9a-a23da2351769.png)

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
17 months agoAdd ability to specify '--not' from GetAllCommits (#24409)
Matthew Walowski [Sat, 29 Apr 2023 12:34:14 +0000 (05:34 -0700)]
Add ability to specify '--not' from GetAllCommits (#24409)

For my specific use case, I'd like to get all commits that are on one
branch but NOT on the other branch.

For instance, I'd like to get all the commits on `Branch1` that are not
also on `master` (I.e. all commits that were made after `Branch1` was
created).

This PR adds a `not` query param that gets passed down to the `git log`
command to allow the user to exclude items from `GetAllCommits`.

See [git
documentation](https://git-scm.com/docs/git-log#Documentation/git-log.txt---not)

---------

Co-authored-by: Giteabot <teabot@gitea.io>
17 months agoImprove template helper (#24417)
wxiaoguang [Sat, 29 Apr 2023 12:02:29 +0000 (20:02 +0800)]
Improve template helper (#24417)

It seems that we really need the "context function" soon. So we should
clean up the helper functions first.

Major changes:

* Improve StringUtils and add JsonUtils
* Remove one-time-use helper functions like CompareLink
* Move other code (no change) to util_avatar/util_render/util_misc (no
need to propose changes for them)

I have tested the changed templates:

![image](https://user-images.githubusercontent.com/2114189/235283862-608dbf6b-2da3-4d06-8157-b523ca93edb4.png)

![image](https://user-images.githubusercontent.com/2114189/235283888-1dfc0471-e622-4d64-9d76-7859819580d3.png)

![image](https://user-images.githubusercontent.com/2114189/235283903-d559f14d-4abb-4a50-915f-2b9cbc381a7a.png)

![image](https://user-images.githubusercontent.com/2114189/235283955-b7b5adea-aca3-4758-b38a-3aae3f7c6048.png)

---------

Co-authored-by: Giteabot <teabot@gitea.io>
17 months agoStart cleaning the messy ".ui.left / .ui.right", improve label list page, fix stackab...
wxiaoguang [Sat, 29 Apr 2023 11:35:59 +0000 (19:35 +0800)]
Start cleaning the messy ".ui.left / .ui.right", improve label list page, fix stackable menu (#24393)

Since 2015/2016, there is a global pollution: ".ui.left" / ".ui.right".

Fomantic UI doesn't work this way, it just conflicts with many Fomantic
definitions.

This PR starts the cleaning work of such techinical debts.

And, the "label list" page has been quite messy for long time, for
example, why "li" appears in "div" ......

And fix #24296

<details>

![image](https://user-images.githubusercontent.com/2114189/235051281-54c5374c-b5fd-4b5f-9aa2-02d4bb2d9112.png)

![image](https://user-images.githubusercontent.com/2114189/235055703-2ba042e0-4db7-4e63-8646-02f390d496b5.png)

![image](https://user-images.githubusercontent.com/2114189/235056310-4f6ffdc2-5758-4927-8fb8-314d9fb72a6b.png)

![image](https://user-images.githubusercontent.com/2114189/235058400-dab1c9ec-3325-4671-8345-aee6b0b68042.png)

![image](https://user-images.githubusercontent.com/2114189/235058424-85509532-b9bc-43ad-b00f-a87184c60f22.png)

</details>

17 months agoImprove protected branch setting page (#24379)
Hester Gong [Sat, 29 Apr 2023 10:44:52 +0000 (18:44 +0800)]
Improve protected branch setting page (#24379)

Main changes:

1. Change html structure of protected branch page, use [`grouped
fields`](https://fomantic-ui.com/collections/form.html#grouped-fields)
instead of `fields` for better margin, and wrap `grouped fields` around
related `field`s, remove unnecessary `<div id="protection_box"
class="fields">` outer div

2. Changed some order of field to make them more categorized, used `ui
dividing header` for categorization and fine tune css.

Before:

<img width="1907" alt="Screen Shot 2023-04-27 at 14 56 19"
src="https://user-images.githubusercontent.com/17645053/234783731-bce8a7ce-dfc9-4d47-a3a8-b962ebea9467.png">
<img width="1849" alt="Screen Shot 2023-04-27 at 14 56 30"
src="https://user-images.githubusercontent.com/17645053/234783740-c47d314e-5e2d-4854-98fd-c88f85ef3584.png">
<img width="1872" alt="Screen Shot 2023-04-27 at 14 56 36"
src="https://user-images.githubusercontent.com/17645053/234783745-18e35a75-07e8-451d-b001-f9bcf16fcab5.png">

After:

https://user-images.githubusercontent.com/17645053/235114568-da010aad-7654-4410-ab8c-5d0fce7edadb.mov

3. Changed "Enable Merge Whitelist" to radio checkbox, and added "Enable
Merge" radio checkbox, which are exclusive

Before:

<img width="926" alt="Screen Shot 2023-04-28 at 13 08 29"
src="https://user-images.githubusercontent.com/17645053/235059233-75790f7a-e5ea-4e1c-82c6-509fef8b84b3.png">

After:

<img width="942" alt="Screen Shot 2023-04-28 at 13 09 28"
src="https://user-images.githubusercontent.com/17645053/235059367-852d1f61-8407-4126-8c79-315b9c1ffada.png">

4. Add a link to set default branch on branch list page (with reference
to github)

https://user-images.githubusercontent.com/17645053/234787404-61c1c7b6-aabf-429f-a109-5b690e4e0b5a.mov

5. Removed dead codes.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Giteabot <teabot@gitea.io>
17 months agoSkip known flaky `queue` tests on CI environment (#24419)
silverwind [Sat, 29 Apr 2023 09:53:11 +0000 (11:53 +0200)]
Skip known flaky `queue` tests on CI environment (#24419)

Random CI failures are annoying. It's better to just skip the affected
tests so maintainers can use their valuable time for more productive
topics.

Related: https://github.com/go-gitea/gitea/issues/23608
Related: https://github.com/go-gitea/gitea/issues/23977
Related: https://github.com/go-gitea/gitea/issues/18703

17 months agogetting the tag list does not require being signed in (#24413)
Earl Warren [Sat, 29 Apr 2023 04:40:55 +0000 (06:40 +0200)]
getting the tag list does not require being signed in (#24413)

Fixes: https://codeberg.org/forgejo/forgejo/issues/681
17 months agoAdd integration test for API raw content reference formats (#24388)
6543 [Sat, 29 Apr 2023 02:38:22 +0000 (04:38 +0200)]
Add integration test for API raw content reference formats (#24388)

This pull request adds an integration test to validate the behavior of
raw content API's reference handling for all supported formats .

close  #24242

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
17 months ago[skip ci] Updated translations via Crowdin
GiteaBot [Sat, 29 Apr 2023 00:23:39 +0000 (00:23 +0000)]
[skip ci] Updated translations via Crowdin

17 months agoRevert "Add Debian package registry" (#24412)
Yarden Shoham [Fri, 28 Apr 2023 22:06:41 +0000 (01:06 +0300)]
Revert "Add Debian package registry" (#24412)

Reverts go-gitea/gitea#22854

17 months agoAdd Debian package registry (#22854)
KN4CK3R [Fri, 28 Apr 2023 21:51:36 +0000 (23:51 +0200)]
Add Debian package registry (#22854)

Co-authored-by: @awkwardbunny
This PR adds a Debian package registry. You can follow [this
tutorial](https://www.baeldung.com/linux/create-debian-package) to build
a *.deb package for testing. Source packages are not supported at the
moment and I did not find documentation of the architecture "all" and
how these packages should be treated.

---------

Co-authored-by: Brian Hong <brian@hongs.me>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
17 months agoMake repo size style matches others (commits/branches/tags) (#24408)
wxiaoguang [Fri, 28 Apr 2023 21:23:19 +0000 (05:23 +0800)]
Make repo size style matches others (commits/branches/tags) (#24408)

The "unit" part shouldn't have bold style.

17 months agoOverride alias template to preserve anchor fragment (#24394)
John Olheiser [Fri, 28 Apr 2023 20:51:17 +0000 (15:51 -0500)]
Override alias template to preserve anchor fragment (#24394)

This PR fixes an annoyance where docs aliases aren't preserving their
anchor fragments.

The refactor included aliases to keep old links from dying, but
currently they redirect without their anchor, which was used _often_ to
jump to sections.

This overrides the alias template with an alternative that preserves the
anchor fragment.

To note, this is just a copy of the [embedded
template](https://github.com/gohugoio/hugo/blob/5c7b79cf7f00aa2651dd5f0364ee575af6715a31/tpl/tplimpl/embedded/templates/alias.html),
but defaults to a JS redirect that preserves the anchor, and uses the
meta tag as a fallback for noscript users.

---------

Signed-off-by: jolheiser <john.olheiser@gmail.com>
17 months agoChangelog 1.19.2 (#24365) (#24403)
Yarden Shoham [Fri, 28 Apr 2023 19:20:52 +0000 (22:20 +0300)]
Changelog 1.19.2 (#24365) (#24403)

Frontport #24365

Add changelog for 1.19.2

Signed-off-by: jolheiser <john.olheiser@gmail.com>
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
Co-authored-by: Giteabot <teabot@gitea.io>
17 months agoImprove commit date in commit graph (#24399)
yp05327 [Fri, 28 Apr 2023 18:58:59 +0000 (03:58 +0900)]
Improve commit date in commit graph (#24399)

The commit date time is based on server's time zone not user's local
time zone.

Before:

![image](https://user-images.githubusercontent.com/18380374/235074112-cc1e032f-6b43-4876-a1bc-dd48b393866b.png)

After:

![image](https://user-images.githubusercontent.com/18380374/235074056-329811e8-3e81-4b55-b5a1-580ac22b6d72.png)

17 months agoFix unclear `IsRepositoryExist` logic (#24374)
wxiaoguang [Fri, 28 Apr 2023 18:14:26 +0000 (02:14 +0800)]
Fix unclear `IsRepositoryExist` logic (#24374)

There was only one `IsRepositoryExist` function, it did: `has && isDir`

However it's not right, and it would cause 500 error when creating a new
repository if the dir exists.

Then, it was changed to `has || isDir`, it is still incorrect, it
affects the "adopt repo" logic.

To make the logic clear:

* IsRepositoryModelOrDirExist
* IsRepositoryModelExist

17 months agoEnsure final newline in `assets/go-licenses.json` (#24407)
silverwind [Fri, 28 Apr 2023 17:39:18 +0000 (19:39 +0200)]
Ensure final newline in `assets/go-licenses.json` (#24407)

This will ensure that the file always has a final newline. I'm not sure
where this bug with inconsistent final newline actually comes from, it
is likely Windows-related.

---------

Co-authored-by: delvh <dev.lh@web.de>
17 months agoMore detailed branch delete message (#22696)
Maarten Becker [Fri, 28 Apr 2023 06:32:32 +0000 (08:32 +0200)]
More detailed branch delete message (#22696)

Fix #22624 . Message explains that deleted branch can only be restored for a short time period.

17 months agoRefactor docs (#23752)
John Olheiser [Fri, 28 Apr 2023 03:33:41 +0000 (22:33 -0500)]
Refactor docs (#23752)

This was intended to be a small followup for
https://github.com/go-gitea/gitea/pull/23712, but...here we are.

1. Our docs currently use `slug` as the entire URL, which makes
refactoring tricky (see https://github.com/go-gitea/gitea/pull/23712).
Instead, this PR attempts to make future refactoring easier by using
slugs as an extension of the section. (Hugo terminology)
- What the above boils down to is this PR attempts to use directory
organization as URL management. e.g. `usage/comparison.en-us.md` ->
`en-us/usage/comparison/`, `usage/packages/overview.en-us.md` ->
`en-us/usage/packages/overview/`
- Technically we could even remove `slug`, as Hugo defaults to using
filename, however at least with this PR it means `slug` only needs to be
the name for the **current file** rather than an entire URL
2. This PR adds appropriate aliases (redirects) for pages, so anything
on the internet that links to our docs should hopefully not break.
3. A minor nit I've had for a while, renaming `seek-help` to `support`.
It's a minor thing, but `seek-help` has a strange connotation to it.
4. The commits are split such that you can review the first which is the
"actual" change, and the second is added redirects so that the first
doesn't break links elsewhere.

---------

Signed-off-by: jolheiser <john.olheiser@gmail.com>
17 months agoFix layouts of admin table / adapt repo / email test (#24370)
wxiaoguang [Fri, 28 Apr 2023 01:48:41 +0000 (09:48 +0800)]
Fix layouts of admin table / adapt repo / email test  (#24370)

Ref:
https://github.com/go-gitea/gitea/pull/24315#pullrequestreview-1403034993

And fix the incorrect layout for "dasbboard", the "form" shouldn't
follow `<h4 class="ui top attached header">`, so move it to inner.

Diff with ignoring spaces:
https://github.com/go-gitea/gitea/pull/24370/files?diff=unified&w=1

A known bug: the adapt/delete button doesn't work due to a historical
messy logic, will fix it in next PR (#24374)

![image](https://user-images.githubusercontent.com/2114189/234754656-d160b098-b8d4-4783-962a-27d5c764863c.png)

![image](https://user-images.githubusercontent.com/2114189/234762327-3e77e2e4-a156-4498-8a8b-092e14cf9204.png)

![image](https://user-images.githubusercontent.com/2114189/234767811-74b7272c-e40c-4850-8e3c-499e3b53b827.png)

![image](https://user-images.githubusercontent.com/2114189/234761247-e6aad889-dcad-443c-948f-2d44df68725b.png)

17 months agoMove secrets and runners settings to actions settings (#24200)
Hester Gong [Fri, 28 Apr 2023 00:08:47 +0000 (08:08 +0800)]
Move secrets and runners settings to actions settings (#24200)

This PR moves the secrets and runners settings to actions settings on
all settings(repo,org,user,admin) levels.

After this PR, if
[ENABLED](https://github.com/go-gitea/gitea/blob/5e7543fcf441afb30aba6188edac754ef32b9ac3/custom/conf/app.example.ini#L2604)
inside `app.ini` under `[actions]` is set to `false`, the "Actions" tab
(including runners management and secrets management) will not be shown.

After, the settings under actions settings for each level:

1. Admin Level
"Runners Management"
<img width="1437" alt="Screen Shot 2023-04-26 at 14 34 20"
src="https://user-images.githubusercontent.com/17645053/234489731-15822d21-38e1-4560-8bbe-69f122376abc.png">

2. User Level
"Secrets Management"
<img width="1427" alt="Screen Shot 2023-04-26 at 14 34 30"
src="https://user-images.githubusercontent.com/17645053/234489795-68c9c0cb-24f8-4f09-95c6-458ab914c313.png">

3. Repo and Organization Levels
"Runners Management" and "Secrets Management"
   Org:
<img width="1437" alt="Screen Shot 2023-04-26 at 14 35 07"
src="https://user-images.githubusercontent.com/17645053/234489996-f3af5ebb-d354-46ca-9087-a0b586845281.png">

<img width="1433" alt="Screen Shot 2023-04-26 at 14 35 14"
src="https://user-images.githubusercontent.com/17645053/234490004-3abf8fed-81fd-4ce2-837a-935dade1793d.png">

    Repo:
<img width="1419" alt="Screen Shot 2023-04-26 at 14 34 50"
src="https://user-images.githubusercontent.com/17645053/234489904-80c11038-4b58-462c-9d0b-8b7cf70bc2b3.png">

<img width="1430" alt="Screen Shot 2023-04-26 at 14 34 57"
src="https://user-images.githubusercontent.com/17645053/234489918-4e8d1fe2-9bcd-4d8a-96c1-238a8088d92e.png">

It also finished these tasks :

- [x] rename routers function "runners" to "actions", and refactor
related file names
- [x] check and modify part of the runners related functions to match
their name
- [x] Fix backend check caused by fmt check

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
17 months agoGitea Actions add `base_ref`, `head_ref`, `api_url`, `ref_type` fields (#24356)
ChristopherHX [Thu, 27 Apr 2023 23:35:21 +0000 (01:35 +0200)]
Gitea Actions add `base_ref`, `head_ref`, `api_url`, `ref_type` fields (#24356)

As discussed in https://gitea.com/gitea/act_runner/issues/147
`github.base_ref` is empty.
This change adds these fields to the server side context data.

17 months agoFix auth check bug (#24382)
Lunny Xiao [Thu, 27 Apr 2023 20:43:27 +0000 (04:43 +0800)]
Fix auth check bug (#24382)

Fix https://github.com/go-gitea/gitea/pull/24362/files#r1179095324

`getAuthenticatedMeta` has checked them, these code are duplicated one.
And the first invokation has a wrong permission check. `DownloadHandle`
should require read permission but not write.

17 months agoDisplay 'Unknown' when runner.version is empty (#24378)
yp05327 [Thu, 27 Apr 2023 08:44:38 +0000 (17:44 +0900)]
Display 'Unknown' when runner.version is empty (#24378)

Before:

![image](https://user-images.githubusercontent.com/18380374/234782197-43d8f86d-afe2-4626-8e46-b621d7cde8f9.png)
After:

![image](https://user-images.githubusercontent.com/18380374/234782064-6828ae3b-5957-451f-82bb-22ab60b6c2a8.png)

17 months agoFix incorrect last online time in runner_edit.tmpl (#24376)
yp05327 [Thu, 27 Apr 2023 07:56:49 +0000 (16:56 +0900)]
Fix incorrect last online time in runner_edit.tmpl (#24376)

Before:

![image](https://user-images.githubusercontent.com/18380374/234772748-7f4b416f-4056-4a5e-89f0-727d2fa14a41.png)

After:

![image](https://user-images.githubusercontent.com/18380374/234772682-8b076054-d0be-4f5f-892d-8d0427275493.png)

17 months agoRefactor "route" related code, fix Safari cookie bug (#24330)
wxiaoguang [Thu, 27 Apr 2023 06:06:45 +0000 (14:06 +0800)]
Refactor "route" related code, fix Safari cookie bug (#24330)

Fix #24176

Clean some misuses of route package, clean some legacy FIXMEs

---------

Co-authored-by: Giteabot <teabot@gitea.io>
17 months agoAdd custom helm repo name generated from url (#24363)
Vladimir Smagin [Thu, 27 Apr 2023 05:40:00 +0000 (12:40 +0700)]
Add custom helm repo name generated from url (#24363)

Fresh version of "Add custom helm repo name generated from url #21024"
https://github.com/go-gitea/gitea/pull/21024

Co-authored-by: Giteabot <teabot@gitea.io>
17 months agoAdd API for gitignore templates (#22783)
JakobDev [Thu, 27 Apr 2023 03:51:20 +0000 (05:51 +0200)]
Add API for gitignore templates (#22783)

This implements the [Gitignores template API of GitHub](https://docs.github.com/en/rest/gitignore?apiVersion=2022-11-28) in Gitea

17 months agoAdd eslint-plugin-regexp (#24361)
silverwind [Thu, 27 Apr 2023 02:08:16 +0000 (04:08 +0200)]
Add eslint-plugin-regexp (#24361)

Add
[`eslint-plugin-regexp`](https://github.com/ota-meshi/eslint-plugin-regexp)
and fix discovered issues. Config is mostly the recommended one, but I
relaxed a few rules.

17 months agoSupport uploading file to empty repo by API (#24357)
wxiaoguang [Thu, 27 Apr 2023 01:36:26 +0000 (09:36 +0800)]
Support uploading file to empty repo by API (#24357)

The uploading API already works (the only nit is the the IsEmpty flag is
out-of-sync, this PR also fixes it)

Close #14633

17 months ago[skip ci] Updated translations via Crowdin
GiteaBot [Thu, 27 Apr 2023 01:07:47 +0000 (01:07 +0000)]
[skip ci] Updated translations via Crowdin

17 months agoRequire repo scope for PATs for private repos and basic authentication (#24362)
John Olheiser [Thu, 27 Apr 2023 00:24:03 +0000 (19:24 -0500)]
Require repo scope for PATs for private repos and basic authentication (#24362)

> The scoped token PR just checked all API routes but in fact, some web
routes like `LFS`, git `HTTP`, container, and attachments supports basic
auth. This PR added scoped token check for them.

---------

Signed-off-by: jolheiser <john.olheiser@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
17 months agoAlert error message if open dependencies are included in the issues that try to batch...
sillyguodong [Wed, 26 Apr 2023 16:54:17 +0000 (00:54 +0800)]
Alert error message if open dependencies are included in the issues that try to batch close (#24329)

fix #24185

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
17 months agoFix 404 error when leaving the last private org team (#24322)
yp05327 [Wed, 26 Apr 2023 16:27:46 +0000 (01:27 +0900)]
Fix 404 error when leaving the last private org team (#24322)

If the user only belongs to one org team and the org is private,
leaving the org team will redirect to `ctx.Org.OrgLink + "/teams/"`
which is inaccessible.

So we need to check whether the user still belongs to the org.

17 months agoModify width of ui container, fine tune css for settings pages and org header (#24315)
Hester Gong [Wed, 26 Apr 2023 15:59:08 +0000 (23:59 +0800)]
Modify width of ui container, fine tune css for settings pages and org header (#24315)

Close #24302
Part of #24229, Follows #24246
This PR focused on CSS style fine-tune, main changes:

1. Give `.ui.ui.ui.container` a width of `1280px` with a max-width of
`calc(100vw - 64px)`, so the main contents looks better on large
devices.

2. Share styles for table elements in all levels settings pages to fix
overflow of runners table on mobile and for consistency (The headers on
mobile can be further improved, but haven't found a proper way yet).

3. Use [stackable
grid](https://fomantic-ui.com/collections/grid.html#stackable) and
[device column width](https://fomantic-ui.com/examples/responsive.html)
for responsiveness for some pages (repo/org collaborators settings
pages, org teams related page)

4. Fixed #24302 by sharing label related CSS in reporg.css

5. Fine tune repo tags settings page

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
17 months agoAdd .livemd as a markdown extension (#22730)
contra-bit [Wed, 26 Apr 2023 15:22:54 +0000 (17:22 +0200)]
Add .livemd as a markdown extension (#22730)

## Needs and benefits
[Livebook](https://livebook.dev/) notebooks are used for code
documentation and for deep dives and note-taking in the elixir
ecosystem. Rendering these in these as Markdown on frogejo has many
benefits, since livemd is a subset of markdown. Some of the benefits
are:
- New users of elixir and livebook are scared by unformated .livemd
files, but are shown what they expect
- Sharing a notebook is as easy as sharing a link, no need to install
the software in order to see the results.

[goldmark-meraid ](https://github.com/abhinav/goldmark-mermaid) is a
mermaid-js parser already included in gitea. This makes the .livemd
rendering integration feature complete. With this PR class diagrams, ER
Diagrams, flow charts and much more will be rendered perfectly.

With the additional functionality gitea will be an ideal tool for
sharing resources with fellow software engineers working in the elixir
ecosystem. Allowing the git forge to be used without needing to install
any software.

## Feature Description
This issue requests the .livemd extension to be added as a Markdown
language extension.

- `.livemd` is the extension of Livebook which is an Elixir version of
Jupyter Notebook.
- `.livemd` is` a subset of Markdown.

This would require the .livemd to be recognized as a markdown file. The
Goldmark the markdown parser should handle the parsing and rendering
automatically.

Here is the corresponding commit for GitHub linguist:
https://github.com/github/linguist/pull/5672

Here is a sample page of a livemd file:

https://github.com/github/linguist/blob/master/samples/Markdown/livebook.livemd

## Screenshots

The first screenshot shows how github shows the sample .livemd in the
browser.
The second screenshot shows how mermaid js, renders my development
notebook and its corresponding ER Diagram. The source code can be found
here:
https://codeberg.org/lgh/Termi/src/commit/79615f74281789a1f2967b57bad0c67c356cef1f/termiNotes.livemd

## Testing
I just changed the file extension from `.livemd`to `.md`and the document
already renders perfectly on codeberg. Check you can it out
[here](https://codeberg.org/lgh/Termi/src/branch/livemd2md/termiNotes.md)

---------

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
17 months agoDisplay when a repo was archived (#22664)
JakobDev [Wed, 26 Apr 2023 14:46:26 +0000 (16:46 +0200)]
Display when a repo was archived (#22664)

This adds the date a repo is archived to Gitea and shows it in the UI
and API. A feature, that GitHub has been [introduced
recently](https://github.blog/changelog/2022-11-23-repository-archive-date-now-shown-in-ui/).

I currently don't know how to correctly deal with the Date in the
template, as different languages have different ways of writing a date.

![grafik](https://user-images.githubusercontent.com/15185051/234315187-7db5763e-d96e-4080-b894-9be178bfb6e1.png)

---------

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
17 months agoFix wrong error info in RepoRefForAPI (#24344)
yp05327 [Wed, 26 Apr 2023 08:14:35 +0000 (17:14 +0900)]
Fix wrong error info in RepoRefForAPI (#24344)

Co-authored-by: Giteabot <teabot@gitea.io>
17 months agoAdd missed column title in runner management page (#24328)
yp05327 [Wed, 26 Apr 2023 07:46:25 +0000 (16:46 +0900)]
Add missed column title in runner management page (#24328)

![image](https://user-images.githubusercontent.com/18380374/234214706-315a8465-8931-4693-8015-e50279db53ab.png)

17 months agoRemove unnecessary helper function `DateFmtLong` (#24343)
Yarden Shoham [Wed, 26 Apr 2023 06:52:50 +0000 (09:52 +0300)]
Remove unnecessary helper function `DateFmtLong` (#24343)

After #24317 this function is only used in one place where it is not
needed. I confirmed the timestamp still renders correctly

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
17 months agoAdd API for License templates (#23009)
JakobDev [Wed, 26 Apr 2023 06:08:28 +0000 (08:08 +0200)]
Add API for License templates (#23009)

This adds a API for getting License templates. This tries to be as close
to the [GitHub
API](https://docs.github.com/en/rest/licenses?apiVersion=2022-11-28) as
possible, but Gitea does not support all features that GitHub has. I
think they should been added, but this out f the scope of this PR. You
should merge #23006 before this PR for security reasons.

17 months agoFix Monaco IOS keyboard button (#24341)
silverwind [Wed, 26 Apr 2023 05:31:50 +0000 (07:31 +0200)]
Fix Monaco IOS keyboard button (#24341)

Fix https://github.com/go-gitea/gitea/issues/16188. Turns out the
element was completely misaligned by fomantic styles. Add most of the
original styles in `!important` form to fix.

Tapping the button doesn't do anything useful in Simulator.app, but I
guess it's still better to not outright hide it in case it has a
possiblity to work.

<img width="121" alt="image"
src="https://user-images.githubusercontent.com/115237/234379685-4e67f8cd-7e91-4bcc-8e17-9d5b2ebed6cd.png">

Co-authored-by: Giteabot <teabot@gitea.io>
17 months agoDon't set meta `theme-color` by default (#24340)
silverwind [Wed, 26 Apr 2023 04:56:42 +0000 (06:56 +0200)]
Don't set meta `theme-color` by default (#24340)

Fixes https://github.com/go-gitea/gitea/issues/24321. By not setting
this meta tag, Safari will use body color for chrome and out-of-viewport
areas, which looks much better then static mismatching green.

As per
[MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta/name/theme-color)
it's really only Apple browsers who still support this tag, most others
have dropped support.

17 months agoFix runner button height (#24338)
silverwind [Wed, 26 Apr 2023 04:09:29 +0000 (06:09 +0200)]
Fix runner button height (#24338)

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

Set size class and downsize any such buttons that have a dropdown icon
because the dropdown icon increases button height artificially.

[`:has()`](https://developer.mozilla.org/en-US/docs/Web/CSS/:has) is not
supported in Firefox yet, but works fine with the experimental pref
enabled. I see this as a graceful degradation in unsupporting browsers.

17 months agoFix broken clone script on an empty archived repo (#24339)
Yarden Shoham [Wed, 26 Apr 2023 03:28:37 +0000 (06:28 +0300)]
Fix broken clone script on an empty archived repo (#24339)

I made it render the script even if the repo is archived

- Fixes #24324

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
17 months agoImprove RSS (#24335)
wxiaoguang [Wed, 26 Apr 2023 02:53:44 +0000 (10:53 +0800)]
Improve RSS (#24335)

Follow  #22719

### Major changes

1. `ServerError` doesn't do format, so remove the `%s`
2. Simplify `RenderBranchFeed` (slightly)
3. Remove unused `BranchFeedRSS`
4. Make `feed.RenderBranchFeed` respect `EnableFeed` config
5. Make `RepoBranchTagSelector.vue` respect `EnableFeed` setting,
otherwise there is always RSS icon
6. The `(branchURLPrefix + item.url).replace('src', 'rss')` doesn't seem
right for all cases, for example, the string `src` could appear in
`branchURLPrefix`, so we need a separate `rssURLPrefix`
7. The `<a>` in Vue menu needs `@click.stop`, otherwise the menu itself
would be triggered at the same time
8. Change `<a><button></button></a>` to `<a role=button>`
9. Use `{{PathEscapeSegments .TreePath}}` instead of `{{range $i, $v :=
.TreeNames}}/{{$v}}{{end}}`

Screenshot of changed parts:

<details>

![image](https://user-images.githubusercontent.com/2114189/234315538-66603694-9093-48a8-af33-83575fd7a018.png)

![image](https://user-images.githubusercontent.com/2114189/234315786-f1efa60b-012e-490b-8ce2-d448dc6fe5c9.png)

![image](https://user-images.githubusercontent.com/2114189/234334941-446941bc-1baa-4256-8850-ccc439476cda.png)

</details>

### Other thoughts

Should we remove the RSS icon from the branch dropdown list? It seems
too complex for a list UI, and users already have the chance to get the
RSS feed URL from "branches" page.

---------

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: silverwind <me@silverwind.io>
17 months agoAutomatically select the org when click create repo from org dashboard (#24325)
yp05327 [Wed, 26 Apr 2023 02:25:29 +0000 (11:25 +0900)]
Automatically select the org when click create repo from org dashboard (#24325)

![image](https://user-images.githubusercontent.com/18380374/234209941-d661b07f-e963-427b-a673-78c46043a792.png)

In org dashboard, the create repo link will be `repo/create?org={orgId}`

17 months agoon schedule
techknowlogick [Wed, 26 Apr 2023 01:38:49 +0000 (21:38 -0400)]
on schedule

17 months agoon schedule
techknowlogick [Wed, 26 Apr 2023 01:38:33 +0000 (21:38 -0400)]
on schedule

17 months agoswitch to use Actions from drone for cron (#24314)
techknowlogick [Wed, 26 Apr 2023 01:32:49 +0000 (21:32 -0400)]
switch to use Actions from drone for cron (#24314)

Move drone cron pipelines to (GitHub) Actions. As these are mostly
compatible with Gitea Actions, when we start to dogfood, these will
already be migrated.

17 months ago[skip ci] Updated translations via Crowdin
GiteaBot [Wed, 26 Apr 2023 00:07:58 +0000 (00:07 +0000)]
[skip ci] Updated translations via Crowdin

17 months agoRestore bold on repolist (#24337)
silverwind [Tue, 25 Apr 2023 21:19:22 +0000 (23:19 +0200)]
Restore bold on repolist (#24337)

Looking at it again, it does look a bit "odd" without bold, so revert
the repolist change done in
https://github.com/go-gitea/gitea/pull/24307.

<img width="141" alt="image"
src="https://user-images.githubusercontent.com/115237/234331813-c6e2402f-e099-43b3-aed6-46a0e24e3899.png">

17 months agoFix template function DateTime (#24317)
wxiaoguang [Tue, 25 Apr 2023 19:48:30 +0000 (03:48 +0800)]
Fix template function DateTime (#24317)

Before, 500 error

![image](https://user-images.githubusercontent.com/2114189/234170176-403ffd1b-ec27-42be-bff9-86184dc8d74d.png)

17 months agoFix incorrect CORS response in Http Git handler (#24303)
wxiaoguang [Tue, 25 Apr 2023 18:35:50 +0000 (02:35 +0800)]
Fix incorrect CORS response in Http Git handler (#24303)

Use the general `cors.Handler` for CORS

17 months agoUpdated upgrade script that is informing user that Gitea service has to be running...
TATHAGATA ROY [Tue, 25 Apr 2023 17:19:58 +0000 (22:49 +0530)]
Updated upgrade script that is informing user that Gitea service has to be running in order to upgrade it (#24260)

Hello sir,
This pull request solves issue #23949
I have updated the upgrade script such that it will check if the Gitea
service is running, if it's not running then it will exit the process
and if it's running then the process will move further ahead.
Thank You.

---------

Co-authored-by: Giteabot <teabot@gitea.io>
Co-authored-by: silverwind <me@silverwind.io>
17 months agoAdd tags list for repos whose release setting is disabled (#23465)
Zettat123 [Tue, 25 Apr 2023 16:29:00 +0000 (00:29 +0800)]
Add tags list for repos whose release setting is disabled (#23465)

Close #23427

Co-Author: @wxiaoguang

If a repo's release setting is enabled, the logic has't changed.
Clicking the "Tags" button will jump to `/{user}/{repo}/tags` and
`templates/repo/release/list.tmpl` template will be used.

<img
src="https://user-images.githubusercontent.com/15528715/224939362-bd8974fd-08b0-4f79-a114-3389d15847ca.png"
width="600px" />

If the release setting is disabled, clicking the "Tags" button will
still jump to `/{user}/{repo}/tags` but a new template
`templates/repo/tag/list.tmpl` will be used.

<img
src="https://user-images.githubusercontent.com/15528715/233834564-74741e49-f4e9-47c8-ac12-e306642798dc.png"
width="600px" />

Since both templates above need to render the tags list, I moved the
tags list to a shared template located in
`templates/repo/tag/table.tmpl`.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Giteabot <teabot@gitea.io>
17 months agoRefactor config provider (#24245)
Lunny Xiao [Tue, 25 Apr 2023 15:06:39 +0000 (23:06 +0800)]
Refactor config provider (#24245)

This PR introduces more abstract about `ConfigProvider` and hides more `ini` references.

---------

Co-authored-by: delvh <dev.lh@web.de>
17 months agoAdd RSS Feeds for branches and files (#22719)
jladbrook [Tue, 25 Apr 2023 14:08:29 +0000 (15:08 +0100)]
Add RSS Feeds for branches and files (#22719)

Fix #22228 adding RSS feeds for branches and files.

RSS feeds are accessed through:

* [gitea]/src/branch/{branch}.rss
* [gitea]/src/branch/{branch}/{file_name}.rss

No changes have been made to the UI to expose the feed urls for branches
and files.

17 months agoMake SVG in dropdown menu have the same margin-right as IMG (#24316)
wxiaoguang [Tue, 25 Apr 2023 11:34:37 +0000 (19:34 +0800)]
Make SVG in dropdown menu have the same margin-right as IMG (#24316)

Fix #24226

![image](https://user-images.githubusercontent.com/2114189/234167393-0fe36a0d-29c9-46b6-b71d-52436f2b27f3.png)

Co-authored-by: silverwind <me@silverwind.io>
17 months agoRespect the REGISTER_MANUAL_CONFIRM setting when registering via OIDC (#24035)
Gary Moon [Tue, 25 Apr 2023 06:40:48 +0000 (02:40 -0400)]
Respect the REGISTER_MANUAL_CONFIRM setting when registering via OIDC (#24035)

This change prevents Gitea from bypassing the manual approval process
for newly registered users when OIDC is used.

- Resolves https://github.com/go-gitea/gitea/issues/23392

Signed-off-by: Gary Moon <gary@garymoon.net>
17 months agodefault show closed actions list if all actions was closed (#24234)
a1012112796 [Tue, 25 Apr 2023 03:34:16 +0000 (11:34 +0800)]
default show closed actions list if all actions was closed (#24234)

that's the same with issues and pull list

17 months ago[skip ci] Updated translations via Crowdin
GiteaBot [Tue, 25 Apr 2023 00:07:53 +0000 (00:07 +0000)]
[skip ci] Updated translations via Crowdin

17 months agoupdate nightly drone docker tag (#24311)
techknowlogick [Mon, 24 Apr 2023 21:59:57 +0000 (17:59 -0400)]
update nightly drone docker tag (#24311)

17 months agoRemove org users who belong to no teams (#24247)
yp05327 [Mon, 24 Apr 2023 19:52:38 +0000 (04:52 +0900)]
Remove org users who belong to no teams (#24247)

Fix #24128

---------

Co-authored-by: silverwind <me@silverwind.io>
17 months agoFix typo in API route (#24310)
silverwind [Mon, 24 Apr 2023 18:44:27 +0000 (20:44 +0200)]
Fix typo in API route (#24310)

Continuation of https://github.com/go-gitea/gitea/pull/23995

---------

Co-authored-by: bilogic <946010+bilogic@users.noreply.github.com>
17 months agoAdd --font-weight-bold and set previous bold to 601 (#24307) 23995/head
wxiaoguang [Mon, 24 Apr 2023 17:46:00 +0000 (01:46 +0800)]
Add --font-weight-bold and set previous bold to 601 (#24307)

Fix #24305

According to MDN, "bold" starts from 700, some fonts do not provide
"bolding" for weight 600

https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight

---------

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Giteabot <teabot@gitea.io>
17 months agoMark `/templates/swagger/v1_json.tmpl` as generated file (#24306)
JakobDev [Mon, 24 Apr 2023 17:18:24 +0000 (19:18 +0200)]
Mark `/templates/swagger/v1_json.tmpl` as generated file (#24306)

17 months agoImprove External Wiki in Repo Header (#24304)
JakobDev [Mon, 24 Apr 2023 16:28:37 +0000 (18:28 +0200)]
Improve External Wiki in Repo Header (#24304)

If you use a External Wiki, with Gitea, it brings currently 2 Problems
in the Header:

1. It always uses the Wiki Icon. When you use e.g. a External Issue
Tracker, it shows the External Link icon to Indicate, that the User will
send to a External Side. This helps preventing fishing.
2. If you use a External Wiki, the Link in the Header still goes to
`{repo}/wiki` which will redirect the user to the External Wiki. That
means, that if the users hovers with the Cursor over the link, it shows
`{repo}/wiki`, so the User does not know, where he will land.

This PR fixes both.

![grafik](https://user-images.githubusercontent.com/15185051/233964455-dbca9bbe-a224-44c5-b351-5649fd9b15fc.png)

17 months agoUnify nightly naming across binaries and docker images (#24116)
techknowlogick [Mon, 24 Apr 2023 15:43:19 +0000 (11:43 -0400)]
Unify nightly naming across binaries and docker images (#24116)

Proposal found here: https://github.com/go-gitea/gitea/issues/23654

TODO: make non-breaking (can we publish docker image using dev and
nightly prefix? at same time). if anyone has advice please comment :)

If this PR is merged, then I can add redirects to the downloads site.

17 months agoWrap too long push mirror addresses (#21120)
JakobDev [Mon, 24 Apr 2023 14:29:16 +0000 (16:29 +0200)]
Wrap too long push mirror addresses (#21120)

I noticed that it is possible to break the push mirror list by entering
a too long URL. This should fix it.

| Before         | After     |
|--------------|-----------|

|![Before](https://user-images.githubusercontent.com/15185051/189294585-333965d1-0f0f-48e2-96d5-e04b84b55ae3.png)|![After](https://user-images.githubusercontent.com/15185051/189294619-301e271c-b89b-4bc0-9c11-9536bd0302be.png)|

17 months agoImprove some modal action buttons (#24289)
wxiaoguang [Mon, 24 Apr 2023 11:08:59 +0000 (19:08 +0800)]
Improve some modal action buttons (#24289)

Follow #24097 and #24285

And add a devtest page for modal action button testing.
http://localhost:3000/devtest/fomantic-modal

Now the `modal_actions_confirm.tmpl` could support: green / blue /
yellow positive buttons, the negative button is "secondary".

ps: this PR is only a small improvement, there are still a lot of
buttons not having proper colors. In the future these buttons could be
improved by this approach.

These buttons could also be improved according to the conclusion of
#24285 in the future.

![image](https://user-images.githubusercontent.com/2114189/233847773-a6d6b29b-7b5c-490e-8425-40dfd0ad2529.png)

And add GitHub-like single danger button (context:
https://github.com/go-gitea/gitea/issues/24285#issuecomment-1519100312)

![image](https://user-images.githubusercontent.com/2114189/233891566-055d7611-894d-4d5a-baf5-f6369180bf8d.png)

---------

Co-authored-by: silverwind <me@silverwind.io>
17 months agoEnable forbidigo linter (#24278)
silverwind [Mon, 24 Apr 2023 09:50:58 +0000 (11:50 +0200)]
Enable forbidigo linter (#24278)

Enable [forbidigo](https://github.com/ashanbrown/forbidigo) linter which
forbids print statements. Will check how to integrate this with the
smallest impact possible, so a few `nolint` comments will likely be
required. Plan is to just go through the issues and either:

- Remove the print if it is nonsensical
- Add a `//nolint` directive if it makes sense

I don't plan on investigating the individual issues any further.

<details>
<summary>Initial Lint Results</summary>

```
modules/log/event.go:348:6: use of `fmt.Println` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Println(err)

^

modules/log/event.go:382:6: use of `fmt.Println` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Println(err)

^

modules/queue/unique_queue_disk_channel_test.go:20:2: use of `fmt.Printf` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Printf("TempDir %s\n", tmpDir)

^

contrib/backport/backport.go:168:2: use of `fmt.Printf` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Printf("* Backporting %s to %s as %s\n", pr, localReleaseBranch, backportBranch)

^

contrib/backport/backport.go:216:4: use of `fmt.Printf` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Printf("* Navigate to %s to open PR\n", url)

^

contrib/backport/backport.go:223:2: use of `fmt.Printf` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Printf("* `xdg-open %s`\n", url)

^

contrib/backport/backport.go:233:2: use of `fmt.Printf` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Printf("* `git push -u %s %s`\n", remote, backportBranch)

^

contrib/backport/backport.go:243:2: use of `fmt.Printf` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Printf("* Amending commit to prepend `Backport #%s` to body\n", pr)

^

contrib/backport/backport.go:272:3: use of `fmt.Println` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Println("* Attempting git cherry-pick --continue")

^

contrib/backport/backport.go:281:2: use of `fmt.Printf` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Printf("* Attempting git cherry-pick %s\n", sha)

^

contrib/backport/backport.go:297:2: use of `fmt.Printf` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Printf("* Current branch is %s\n", currentBranch)

^

contrib/backport/backport.go:299:3: use of `fmt.Printf` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Printf("* Current branch is %s - not checking out\n", currentBranch)

^

contrib/backport/backport.go:304:3: use of `fmt.Printf` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Printf("* Branch %s already exists. Checking it out...\n", backportBranch)

^

contrib/backport/backport.go:308:2: use of `fmt.Printf` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Printf("* `git checkout -b %s %s`\n", backportBranch, releaseBranch)

^

contrib/backport/backport.go:313:2: use of `fmt.Printf` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Printf("* `git fetch %s main`\n", remote)

^

contrib/backport/backport.go:316:3: use of `fmt.Println` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Println(string(out))

^

contrib/backport/backport.go:319:2: use of `fmt.Println` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Println(string(out))

^

contrib/backport/backport.go:321:2: use of `fmt.Printf` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Printf("* `git fetch %s %s`\n", remote, releaseBranch)

^

contrib/backport/backport.go:324:3: use of `fmt.Println` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Println(string(out))

^

contrib/backport/backport.go:327:2: use of `fmt.Println` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Println(string(out))

^

models/unittest/fixtures.go:50:3: use of `fmt.Println` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Println("Unsupported RDBMS for integration tests")

^

models/unittest/fixtures.go:89:3: use of `fmt.Printf` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Printf("LoadFixtures failed after retries: %v\n", err)

^

models/unittest/fixtures.go:110:4: use of `fmt.Printf` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Printf("Failed to generate sequence update: %v\n", err)

^

models/unittest/fixtures.go:117:6: use of `fmt.Printf` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Printf("Failed to update sequence: %s Error: %v\n", value, err)

^

models/migrations/base/tests.go:118:3: use of `fmt.Println` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Println("Environment variable $GITEA_ROOT not set")

^

models/migrations/base/tests.go:127:3: use of `fmt.Printf` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Printf("Could not find gitea binary at %s\n", setting.AppPath)

^

models/migrations/base/tests.go:134:3: use of `fmt.Printf` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Printf("Environment variable $GITEA_CONF not set - defaulting to %s\n", giteaConf)

^

models/migrations/base/tests.go:145:3: use of `fmt.Printf` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Printf("Unable to create temporary data path %v\n", err)

^

models/migrations/base/tests.go:154:3: use of `fmt.Printf` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Printf("Unable to InitFull: %v\n", err)

^

models/migrations/v1_11/v112.go:34:5: use of `fmt.Printf` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Printf("Error: %v", err)

^

contrib/fixtures/fixture_generation.go:36:3: use of `fmt.Printf` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Printf("CreateTestEngine: %+v", err)

^

contrib/fixtures/fixture_generation.go:40:3: use of `fmt.Printf` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Printf("PrepareTestDatabase: %+v\n", err)

^

contrib/fixtures/fixture_generation.go:46:5: use of `fmt.Printf` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Printf("generate '%s': %+v\n", r, err)

^

contrib/fixtures/fixture_generation.go:53:5: use of `fmt.Printf` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Printf("generate '%s': %+v\n", g.name, err)

^

contrib/fixtures/fixture_generation.go:71:4: use of `fmt.Printf` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Printf("%s created.\n", path)

^

services/gitdiff/gitdiff_test.go:543:2: use of `println` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

println(result)

^

services/gitdiff/gitdiff_test.go:560:2: use of `println` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

println(result)

^

services/gitdiff/gitdiff_test.go:577:2: use of `println` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

println(result)

^

modules/web/routing/logger_manager.go:34:2: use of `print` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

print Printer

^

modules/doctor/paths.go:109:3: use of `fmt.Printf` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Printf("Warning: can't remove temporary file: '%s'\n", tmpFile.Name())

^

tests/test_utils.go:33:2: use of `fmt.Printf` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Printf(format+"\n", args...)

^

tests/test_utils.go:61:3: use of `fmt.Printf` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Printf("Environment variable $GITEA_CONF not set, use default: %s\n", giteaConf)

^

cmd/actions.go:54:9: use of `fmt.Printf` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

_, _ = fmt.Printf("%s\n", respText)

       ^

cmd/admin_user_change_password.go:74:2: use of `fmt.Printf` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Printf("%s's password has been successfully updated!\n", user.Name)

^

cmd/admin_user_create.go:109:3: use of `fmt.Printf` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Printf("generated random password is '%s'\n", password)

^

cmd/admin_user_create.go:164:3: use of `fmt.Printf` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Printf("Access token was successfully created... %s\n", t.Token)

^

cmd/admin_user_create.go:167:2: use of `fmt.Printf` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Printf("New user '%s' has been successfully created!\n", username)

^

cmd/admin_user_generate_access_token.go:74:3: use of `fmt.Printf` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Printf("%s\n", t.Token)

^

cmd/admin_user_generate_access_token.go:76:3: use of `fmt.Printf` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Printf("Access token was successfully created: %s\n", t.Token)

^

cmd/admin_user_must_change_password.go:56:2: use of `fmt.Printf` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Printf("Updated %d users setting MustChangePassword to %t\n", n, mustChangePassword)

^

cmd/convert.go:44:3: use of `fmt.Println` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Println("Converted successfully, please confirm your database's character set is now utf8mb4")

^

cmd/convert.go:50:3: use of `fmt.Println` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Println("Converted successfully, please confirm your database's all columns character is NVARCHAR now")

^

cmd/convert.go:52:3: use of `fmt.Println` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Println("This command can only be used with a MySQL or MSSQL database")

^

cmd/doctor.go:104:3: use of `fmt.Println` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Println(err)

^

cmd/doctor.go:105:3: use of `fmt.Println` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Println("Check if you are using the right config file. You can use a --config directive to specify one.")

^

cmd/doctor.go:243:3: use of `fmt.Println` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Println(err)

^

cmd/embedded.go:154:3: use of `fmt.Println` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Println(a.path)

^

cmd/embedded.go:198:3: use of `fmt.Println` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Println("Using app.ini at", setting.CustomConf)

^

cmd/embedded.go:217:2: use of `fmt.Printf` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Printf("Extracting to %s:\n", destdir)

^

cmd/embedded.go:253:3: use of `fmt.Printf` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Printf("%s already exists; skipped.\n", dest)

^

cmd/embedded.go:275:2: use of `fmt.Println` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Println(dest)

^

cmd/generate.go:63:2: use of `fmt.Printf` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Printf("%s", internalToken)

^

cmd/generate.go:66:3: use of `fmt.Printf` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Printf("\n")

^

cmd/generate.go:78:2: use of `fmt.Printf` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Printf("%s", JWTSecretBase64)

^

cmd/generate.go:81:3: use of `fmt.Printf` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Printf("\n")

^

cmd/generate.go:93:2: use of `fmt.Printf` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Printf("%s", secretKey)

^

cmd/generate.go:96:3: use of `fmt.Printf` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Printf("\n")

^

cmd/keys.go:74:2: use of `fmt.Println` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Println(strings.TrimSpace(authorizedString))

^

cmd/mailer.go:32:4: use of `fmt.Print` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Print("warning: Content is empty")

^

cmd/mailer.go:35:3: use of `fmt.Print` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Print("Proceed with sending email? [Y/n] ")

^

cmd/mailer.go:40:4: use of `fmt.Println` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Println("The mail was not sent")

^

cmd/mailer.go:49:9: use of `fmt.Printf` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

_, _ = fmt.Printf("Sent %s email(s) to all users\n", respText)

       ^

cmd/serv.go:147:3: use of `println` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

println("Gitea: SSH has been disabled")

^

cmd/serv.go:153:4: use of `fmt.Printf` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Printf("error showing subcommand help: %v\n", err)

^

cmd/serv.go:175:4: use of `println` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

println("Hi there! You've successfully authenticated with the deploy key named " + key.Name + ", but Gitea does not provide shell access.")

^

cmd/serv.go:177:4: use of `println` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

println("Hi there! You've successfully authenticated with the principal " + key.Content + ", but Gitea does not provide shell access.")

^

cmd/serv.go:179:4: use of `println` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

println("Hi there, " + user.Name + "! You've successfully authenticated with the key named " + key.Name + ", but Gitea does not provide shell access.")

^

cmd/serv.go:181:3: use of `println` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

println("If this is unexpected, please log in with password and setup Gitea under another user.")

^

cmd/serv.go:196:5: use of `fmt.Print` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Print(`{"type":"gitea","version":1}`)

^

tests/e2e/e2e_test.go:54:3: use of `fmt.Printf` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Printf("Error initializing test database: %v\n", err)

^

tests/e2e/e2e_test.go:63:3: use of `fmt.Printf` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Printf("util.RemoveAll: %v\n", err)

^

tests/e2e/e2e_test.go:67:3: use of `fmt.Printf` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Printf("Unable to remove repo indexer: %v\n", err)

^

tests/e2e/e2e_test.go:109:6: use of `fmt.Printf` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Printf("%v", stdout.String())

^

tests/e2e/e2e_test.go:110:6: use of `fmt.Printf` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Printf("%v", stderr.String())

^

tests/e2e/e2e_test.go:113:6: use of `fmt.Printf` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Printf("%v", stdout.String())

^

tests/integration/integration_test.go:124:3: use of `fmt.Printf` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Printf("Error initializing test database: %v\n", err)

^

tests/integration/integration_test.go:135:3: use of `fmt.Printf` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Printf("util.RemoveAll: %v\n", err)

^

tests/integration/integration_test.go:139:3: use of `fmt.Printf` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Printf("Unable to remove repo indexer: %v\n", err)

^

tests/integration/repo_test.go:357:4: use of `fmt.Printf` forbidden by pattern `^(fmt\.Print(|f|ln)|print|println)$` (forbidigo)

fmt.Printf("%s", resp.Body)

^
```

</details>

---------

Co-authored-by: Giteabot <teabot@gitea.io>
17 months agoFix no edit/close/delete button in org repo project view page (#24301)
yp05327 [Mon, 24 Apr 2023 08:51:44 +0000 (17:51 +0900)]
Fix no edit/close/delete button in org repo project view page  (#24301)

Part of #23318.

17 months agoReplace whitespace inside template parens during make fmt (#24293)
silverwind [Mon, 24 Apr 2023 06:48:43 +0000 (08:48 +0200)]
Replace whitespace inside template parens during make fmt (#24293)

Remove space/tab after `(` and before `)` in templates. Only two
violations it seems.