Commit graph

17555 commits

Author SHA1 Message Date
GiteaBot
22fd29d3b7
[gitea] [skip ci] Updated translations via Crowdin
(cherry picked from commit c1f7249056d4aa38927aebcbddc6459ee714c801)
2024-02-11 13:47:36 +01:00
Earl Warren
40b9f3996b Merge pull request '[FEAT]: New route to view latest run of specific workflows' (#2304) from algernon/forgejo:f/web/actions/workflow-latest-run-routes into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2304
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-02-11 07:34:08 +00:00
Earl Warren
91f2f02f09 Merge pull request '[gitea] cherry-pick' (#2320) from earl-warren/forgejo:wip-gitea-cherry-pick into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2320
2024-02-10 10:37:00 +00:00
silverwind
22c694a9e9
[gitea] add lint-spell-fix to lint-fix (#29111)
Followup to https://github.com/go-gitea/gitea/pull/29106, fix this
oversight.

(cherry picked from commit c7a21cbb0c5f8302495fa24baf218dc3462de2c5)
2024-02-10 10:53:43 +01:00
silverwind
6fcb8e652b
[gitea] Rework spellchecking, add lint-spell (#29106)
- Use maintained fork https://github.com/golangci/misspell
- Rename `mispell-check` to `lint-spell`, add `lint-spell-fix`
- Run `lint-spell` in separate actions step
- Lint more files, fix discovered issues
- Remove inaccurate and outdated info in docs (we do not need GOPATH for
tools anymore)

Maybe later we can add more spellchecking tools, but I have not found
any good ones yet.

(cherry picked from commit 9c39f8515fa88d644736c6773d7a05d070a02e82)

Conflicts:
	.github/workflows/pull-compliance.yml
	Makefile
2024-02-10 10:53:43 +01:00
wxiaoguang
83bb3cf86a
[gitea] Refactor parseSignatureFromCommitLine (#29054)
Replace #28849. Thanks to @yp05327 for the looking into the problem.
Fix #28840

The old behavior of newSignatureFromCommitline is not right. The new
parseSignatureFromCommitLine:

1. never fails
2. only accept one format (if there is any other, it could be easily added)

And add some tests.

(cherry picked from commit a24e1da7e9e38fc5f5c84c083d122c0cc3da4b74)
2024-02-10 10:53:43 +01:00
KN4CK3R
045bd097c6
[gitea] Display friendly error message (#29105)
`ctx.Error` only displays the text but `ctx.ServerError` renders the
usual error page.

(cherry picked from commit da2f03750f9672c5aac48209539874f2af2673f1)
2024-02-10 10:53:43 +01:00
silverwind
0d62b52f4f
[gitea] Use defaults browserslist (#29098)
IE usage has dropped enough to not be included in the defaults
browserslist anymore as per https://browsersl.ist/#q=defaults, so we can
use the defaults now.

(cherry picked from commit ce9978bfd4e035ed065b02b28e02905674320b6a)
2024-02-10 10:53:43 +01:00
Lunny Xiao
b9f48332c7
[gitea] Fix push to create with capitalize repo name (#29090)
Fix #29073

(cherry picked from commit 96ad1d6340038c0c841d9cad9a440daee3241aac)
2024-02-10 10:53:43 +01:00
Lunny Xiao
1fdd8341d6
[gitea] Remove unnecessary parameter (#29092)
The parameter extraConfigs has never been used anywhere. This PR just
removed it. It can be taken back once it's needed.

(cherry picked from commit 8c6ffdac378654f9d2171ebdbc46becf1571f7fe)
2024-02-10 10:53:43 +01:00
silverwind
02b03247de
[gitea] Move vitest setup file to root (#29097)
I'm using this convention in other projects and I think it makes sense
for gitea too because the vitest setup file is loaded globally for all
tests, not just ones in web_src, so it makes sense to be in the root.

(cherry picked from commit 98e7e3a5f07b8bc620e26bc1ab6f7a86bccbb7cb)
2024-02-10 10:53:43 +01:00
CEnnis91
4b1b774ccd
[gitea] Fix incorrect link to swift doc and swift package-registry login command (#29096)
Fixes a few mistakes in the Swift package registry documentation.

Syntax for the `package-registry login` command can be found
[here](https://github.com/apple/swift-package-manager/blob/main/Documentation/PackageRegistry/PackageRegistryUsage.md#registry-authentication).
I was not sure the best way to compress all of that information, so I
just focused on making sure the incorrect `package-registry set` command
was fixed.

(cherry picked from commit eb5ddc0a78ecfe007a6e279a3c59711cdfb3f701)
2024-02-10 10:53:43 +01:00
CEnnis91
e87ab053e7
[gitea] Fix swift packages not resolving (#29095)
Fixes #29094

(cherry picked from commit 6be3fda6fc746b1285e6dee72de1118177ba429e)
2024-02-10 10:53:43 +01:00
Wiktor Kwapisiewicz
34450f7d35
[gitea] Fix missing link on outgoing new release notifications (#29079)
Outgoing new release e-mail notifications were missing links to the
actual release. An example from Codeberg.org e-mail:

    <a href=3D"">View it on Codeberg.org</a>.<br/>

This PR adds `"Link"` context property pointing to the release on the
web interface.

The change was tested using `[mailer] PROTOCOL=dummy`.

Signed-off-by: Wiktor Kwapisiewicz <wiktor@metacode.biz>
(cherry picked from commit 37191dcfbdbd007266a4d15a3c85cdf94cec1a7a)
2024-02-10 10:53:43 +01:00
wxiaoguang
51c6103195
[gitea] Avoid showing unnecessary JS errors when there are elements with different origin on the page (#29081)
Try to fix #29080

(cherry picked from commit f290c24d286b996ac6b512f49a30aa5aef1a2dbe)
2024-02-10 10:53:43 +01:00
silverwind
73e32eae5b
[gitea] Fix gitea-origin-url with default ports (#29085)
When setting `url.host` on a URL object with no port specified (like is
the case of default port), the resulting URL's port will not change.
Workaround this quirk in the URL standard by explicitely setting port
for the http and https protocols.

Extracted the logic to a function for the purpose of testing. Initially
I wanted to have the function in utils.js, but it turns out esbuild can
not treeshake the unused functions which would result in the
webcomponents chunk having all 2kB utils.js inlined, so it seemed not
worth.

Fixes: https://github.com/go-gitea/gitea/issues/29084
(cherry picked from commit b6bf8041d8e8ee845728687b1f358f1d482afff2)
2024-02-10 10:53:43 +01:00
dark-angel
00370f17a4
[gitea] fix: Elasticsearch: Request Entity Too Large #28117 (#29062)
Fix for gitea putting everything into one request without batching and
sending it to Elasticsearch for indexing as issued in #28117

This issue occured in large repositories while Gitea tries to
index the code using ElasticSearch.

I've applied necessary changes that takes batch length from below config
(app.ini)
```
[queue.code_indexer]
BATCH_LENGTH=<length_int>
```
and batches all requests to Elasticsearch in chunks as configured in the
above config

(cherry picked from commit 5c0fc9087211f01375f208d679a1e6de0685320c)
2024-02-10 10:53:43 +01:00
silverwind
75937b5784
[gitea] Remove lightningcss (#29070)
Remove lightningcss and minify with esbuild again. The size of output
CSS will increase by around 1.4%, but I think it's worth it to allow
building gitea in more cases like the one in the linked issue. We can
reconsider once lightningcss becomes more stable.

Fixes: https://github.com/go-gitea/gitea/issues/29058
(cherry picked from commit 5849d4fde347cd1e47f2243b3239724c73b1261d)
2024-02-10 10:53:43 +01:00
Jason Song
a01777fd21
[gitea] Hide code links on release page if user cannot read code (#29064)
On the release list page, if the user doesn't have the permission to
read code, the code links will lead to 404 pages or api errors:

<img width="1297" alt="image"
src="https://github.com/go-gitea/gitea/assets/9418365/a74fbc63-6dd6-43c6-853c-28acdbfdcb4e">

After this PR:

<img width="1297" alt="image"
src="https://github.com/go-gitea/gitea/assets/9418365/a626373d-c2df-40a9-8fed-1b12ff6bc56f">

And this PR also removed some dead code. After #23465, the tag list page
has an independent template, and all `IsTag` in the release list
template are always false.

(cherry picked from commit f9072dbf3c558ba5d4365b551d95936a52e4c94d)
2024-02-10 10:53:42 +01:00
GiteaBot
7c1bb0626b
[gitea] [skip ci] Updated translations via Crowdin
(cherry picked from commit f69914dd0b5607861f36f89c362f4b2cc3f60403)
2024-02-10 10:53:42 +01:00
Earl Warren
a4ca473d33
[CI] cascade end-to-end must not try to merge feature branches
they no longer exist as of the hard fork
2024-02-10 10:53:04 +01:00
Gergely Nagy
5f2d8be38e
[FEAT]: New route to view lates run of specific workflows
This adds a new route at `/actions/workflows/{workflow}/runs/latest`,
which will redirect to the latest run of the given workflow. It can be
further restricted by specifying an optional `?branch={branch}` query
parameter. If no branch is specified, the route defaults to using the
repo's default branch.

This route is meant to go hand in hand with the Badge route that returns
the result of the same workflow as a badge. This route can be used to
link to the run that produced that result.

Fixes #2303.

Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
2024-02-10 09:15:58 +01:00
Gergely Nagy
f8da672307
[FEAT]: Allow forking without a repo ID
Forking a repository via the web UI currently requires visiting a
`/repo/fork/{{repoid}}` URL. This makes it cumbersome to create a link
that starts a fork, because the repository ID is only available via the
API. While it *is* possible to create a link, doing so requires extra
steps.

To make it easier to have a "Fork me!"-style links, introduce the
`/{username}/{repo}/fork` route, which will start the forking process
based on the repository in context instead.

The old `/repo/fork/{repoid}` route (with a `GET` request) will remain
there for the sake of backwards compatibility, but will redirect to the
new URL instead. It's `POST` handler is removed.

Tests that used the old route are updated to use the new one, and new
tests are introduced to exercise the redirect.

Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
2024-02-10 09:14:14 +01:00
Earl Warren
cf1c57b681 Merge pull request 'Forgejo hard fork' (#2319) from earl-warren/forgejo:wip-forgejo into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2319
2024-02-10 06:33:59 +00:00
Earl Warren
beff445741
Merge remote-tracking branch 'forgejo/forgejo-development' into wip-forgejo 2024-02-09 23:22:12 +01:00
Earl Warren
1c183c8031 Merge pull request '[TESTS] add manual testing instructions as a sub-module' (#2265) from earl-warren/forgejo:wip-manual-testing into forgejo-development
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2265
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-02-09 22:21:25 +00:00
Earl Warren
7cbf05fafb
Merge remote-tracking branch 'forgejo/forgejo-dependency' into wip-forgejo
Conflicts:
	.forgejo/workflows/testing.yml
	trivial conflict
2024-02-09 19:00:54 +01:00
Earl Warren
36fc9a9f72
Merge remote-tracking branch 'forgejo/forgejo-branding' into wip-forgejo 2024-02-09 18:59:07 +01:00
Earl Warren
16794897bc
Merge remote-tracking branch 'forgejo/forgejo-development' into wip-forgejo 2024-02-09 18:58:05 +01:00
Codeberg Translate
3c31c92efb [I18N] Translations update from Weblate (#2317)
Translations update from [Weblate](https://translate.codeberg.org) for [Forgejo/forgejo](https://translate.codeberg.org/projects/forgejo/forgejo/).

Current translation status:

![Weblate translation status](https://translate.codeberg.org/widget/forgejo/forgejo/horizontal-auto.svg)

Co-authored-by: earl-warren <contact@earl-warren.org>
Co-authored-by: 0que <0que@users.noreply.translate.codeberg.org>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2317
Co-authored-by: Codeberg Translate <translate@noreply.codeberg.org>
Co-committed-by: Codeberg Translate <translate@noreply.codeberg.org>
2024-02-09 14:53:38 +00:00
Earl Warren
12e289f6f9 Merge pull request 'CI: merge checks-backend and lint-backend' (#2315) from oliverpool/forgejo:ci_merge_steps into forgejo-dependency
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2315
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-02-09 14:17:35 +00:00
Codeberg Translate
e71cdd05d8 [I18N] Translations update from Weblate (#2316)
Translations update from [Weblate](https://translate.codeberg.org) for [Forgejo/forgejo](https://translate.codeberg.org/projects/forgejo/forgejo/).

Current translation status:

![Weblate translation status](https://translate.codeberg.org/widget/forgejo/forgejo/horizontal-auto.svg)

Co-authored-by: Mormegil <mormegil@centrum.cz>
Co-authored-by: nightm4re <matthiasf.wilke@yahoo.de>
Co-authored-by: fnetX <otto@codeberg.org>
Co-authored-by: 0que <0que@users.noreply.translate.codeberg.org>
Co-authored-by: kikocorreoso <kachine@protonmail.com>
Co-authored-by: earl-warren <contact@earl-warren.org>
Co-authored-by: bart <bart@bartmathijssen.com>
Co-authored-by: tranzystorekk <tranzystorek.io@protonmail.com>
Co-authored-by: Xinayder <me+codeberg@aoalmeida.com>
Co-authored-by: rmorettibr <rafael.moretti@protonmail.com>
Co-authored-by: Werenter <abelokopytov149@gmail.com>
Co-authored-by: dobrvlskyi <dobrovolskyi@peremozhemo.org>
Co-authored-by: ika <ika@thewizardbay.cc>
Co-authored-by: noureddin <noureddin@protonmail.com>
Co-authored-by: esensar <dev@ensarsarajcic.com>
Co-authored-by: mondstern <mondstern@monocles.de>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2316
Co-authored-by: Codeberg Translate <translate@noreply.codeberg.org>
Co-committed-by: Codeberg Translate <translate@noreply.codeberg.org>
2024-02-09 12:43:51 +00:00
oliverpool
ffc94d9463 remove debug print 2024-02-09 11:27:58 +01:00
oliverpool
cab17d7a72 DEBUG: -j 2024-02-09 11:20:15 +01:00
oliverpool
01539730c0 CI: merge checks-backend and lint-backend 2024-02-09 11:08:19 +01:00
Earl Warren
da12d2001c Merge pull request '[I18N] Translations update from Weblate' (#2305) from translate/forgejo:weblate-forgejo-forgejo into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2305
2024-02-09 08:30:00 +00:00
Earl Warren
95188d497d
[CI] pin go 1.21 2024-02-08 12:39:38 +01:00
Earl Warren
a058770914
[TESTS] add manual testing instructions as a sub-module
Refs: https://codeberg.org/forgejo/discussions/issues/100
2024-02-08 11:43:43 +01:00
Earl Warren
f7ca64d028 Merge pull request '[FEAT] support .forgejo dir for issue and PR templates' (#2290) from algernon/forgejo:pr/template-dirs into forgejo-dependency
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2290
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-02-08 10:42:23 +00:00
mondstern
4d62c5df14
Added translation using Weblate (Slovenian) 2024-02-07 19:04:37 +00:00
esensar
06842cb536
Added translation using Weblate (Bosnian) 2024-02-07 13:12:38 +00:00
Earl Warren
859020409e
[CI] pin go 1.21 2024-02-07 12:54:05 +01:00
Earl Warren
b33877db5a
[CI] pin go 1.21 2024-02-07 12:53:39 +01:00
Earl Warren
548224ff47 Merge pull request '[CI] pin go 1.21' (#2311) from earl-warren/forgejo:wip-go into forgejo-dependency
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2311
2024-02-07 11:52:11 +00:00
Earl Warren
a89cb638a0
[CI] pin go 1.21 2024-02-07 12:19:56 +01:00
Earl Warren
ea7344e39f Merge pull request 'Improve English locale' (#2307) from 0ko/forgejo:english240206 into forgejo-development
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2307
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-02-06 20:57:00 +00:00
0ko
09e271497b Improve English locale 2024-02-06 23:45:48 +05:00
oatbiscuits
e677192f5b
Translated using Weblate (Arabic)
Currently translated at 44.1% (1516 of 3437 strings)

Translation: Forgejo/forgejo
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo/ar/
2024-02-06 15:48:02 +00:00
0que
50c101c5f1
Translated using Weblate (Russian)
Currently translated at 98.2% (3378 of 3437 strings)

Translation: Forgejo/forgejo
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo/ru/
2024-02-06 15:48:02 +00:00
Werenter
54536cfc9a
Translated using Weblate (Russian)
Currently translated at 98.2% (3378 of 3437 strings)

Translation: Forgejo/forgejo
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo/ru/
2024-02-06 15:48:02 +00:00