Commit graph

20511 commits

Author SHA1 Message Date
Earl Warren
8e91cf1b26 Merge pull request 'Add .mailmap with aliases for Unknwon (github.com/Unknwon)' (#4956) from yarikoptic/forgejo:enh-mailmap into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4956
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-16 09:04:41 +00:00
Earl Warren
c7fe944357 Merge pull request 'Update dependency @stylistic/eslint-plugin-js to v2.6.4 (forgejo)' (#4972) from renovate/forgejo-eslint-stylistic-monorepo into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4972
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-08-16 08:58:42 +00:00
Earl Warren
b2b83dfb94 Merge pull request 'Update dependency stylelint to v16.8.2 (forgejo)' (#4973) from renovate/forgejo-linters into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4973
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-08-16 08:57:59 +00:00
Earl Warren
95dc22370e Merge pull request 'Update dependency @eslint-community/eslint-plugin-eslint-comments to v4.4.0 (forgejo)' (#4975) from renovate/forgejo-eslint-community-eslint-plugin-eslint-comments-4.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4975
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-08-16 08:57:19 +00:00
forgejo-renovate-action
f7f6c78913 Merge pull request 'Update dependency vue to v3.4.38 (forgejo)' (#4974) from renovate/forgejo-patch-vue-monorepo into forgejo 2024-08-16 08:56:36 +00:00
Renovate Bot
5bb7fc2a39 Update dependency vue to v3.4.38 2024-08-16 08:03:23 +00:00
Codeberg Translate
17fa75074d i18n: update of translations from Codeberg Translate (#4889)
Translations update from [Codeberg Translate](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 <earl-warren@users.noreply.translate.codeberg.org>
Co-authored-by: Outbreak2096 <Outbreak2096@users.noreply.translate.codeberg.org>
Co-authored-by: Panagiotis \"Ivory\" Vasilopoulos <git@n0toose.net>
Co-authored-by: dragon <dragon@users.noreply.translate.codeberg.org>
Co-authored-by: hoovad <hoovad@users.noreply.translate.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-authored-by: hankskyjames777 <hankskyjames777@users.noreply.translate.codeberg.org>
Co-authored-by: emansije <emansije@users.noreply.translate.codeberg.org>
Co-authored-by: hugoalh <hugoalh@users.noreply.translate.codeberg.org>
Co-authored-by: zub <zub@users.noreply.translate.codeberg.org>
Co-authored-by: Fjuro <fjuro@alius.cz>
Co-authored-by: 0ko <0ko@users.noreply.translate.codeberg.org>
Co-authored-by: Kita Ikuyo <searinminecraft@courvix.com>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4889
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Codeberg Translate <translate@noreply.codeberg.org>
Co-committed-by: Codeberg Translate <translate@noreply.codeberg.org>
2024-08-16 07:19:03 +00:00
Renovate Bot
07d6557804 Update dependency @eslint-community/eslint-plugin-eslint-comments to v4.4.0 2024-08-16 02:03:27 +00:00
Renovate Bot
c4a5da969a Update dependency @stylistic/eslint-plugin-js to v2.6.4 2024-08-16 02:03:01 +00:00
Renovate Bot
4fa2b8f70e Update dependency stylelint to v16.8.2 2024-08-16 00:03:27 +00:00
Gusted
0924e6626d Merge pull request 'fix: enlargen gap between avatar and name' (#4958) from n0toose/latest-commit-gap into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4958
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: Caesar Schinas <caesar@caesarschinas.com>
2024-08-15 19:18:22 +00:00
Otto
d26ad8dbe5 Merge pull request 'git-grep: set timeout to 2s by default and allow configuring it' (#4966) from yoctozepto/git-grep-timeout into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4966
Reviewed-by: Otto <otto@codeberg.org>
2024-08-15 12:15:16 +00:00
Panagiotis "Ivory" Vasilopoulos
98bb6c1c59 fix: enlargen gap between avatar and name
Changes tw-mr-1 to tw-mr-2. Not that big of a change, mostly
cosmetic.
2024-08-14 17:19:23 +02:00
Yaroslav Halchenko
82fcc6768a Add .mailmap with aliases for Unknwon (github.com/Unknwon)
without it looks like this:

    ❯ git shortlog -sn | head
      1674	Unknwon
      1643	Lunny Xiao
      1499	GiteaBot
      1186	zeripath
      1147	Earl Warren
      1093	silverwind
       752	wxiaoguang
       573	Unknown
       537	6543
       524	Gusted

with:

    ❯ git shortlog -sn | head
      2635	Unknwon
      1643	Lunny Xiao
      1499	GiteaBot
      1186	zeripath
      1147	Earl Warren
      1093	silverwind
       752	wxiaoguang
       537	6543
       524	Gusted
       385	techknowlogick
2024-08-14 08:26:16 -04:00
Michael Kriese
ad92ede00a Merge pull request 'ci: use mirror or bitnami images' (#4954) from viceice/forgejo:ci/use-mirror-images into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4954
Reviewed-by: Otto <otto@codeberg.org>
2024-08-14 11:41:12 +00:00
Michael Kriese
696e0ff27e
ci: use mirror or bitnami images
This reduces chances of docker hub rate limiting.
Bitnami images are excluded from rate limiting.
2024-08-14 12:10:53 +02:00
Gusted
40ed2efcb6 Merge pull request 'Update dependency tailwindcss to v3.4.10 (forgejo)' (#4952) from renovate/forgejo-tailwindcss-3.x into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4952
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-14 09:08:54 +00:00
Radosław Piliszek
824dd6bc5d git-grep: set timeout to 2s by default and allow configuring it
We need to shorten the timeout to bound effectively for
computation size. This protects against "too big" repos.
This also protects to some extent against too long lines
if kept to very low values (basically so that grep cannot run out
of memory beforehand).

Docs-PR: forgejo/docs#812
2024-08-14 07:55:05 +02:00
Renovate Bot
da96281acb Update dependency tailwindcss to v3.4.10 2024-08-14 00:03:05 +00:00
Otto
b77f45f46b Merge pull request 'Revert "Prevent allow/reject reviews on merged/closed PRs"' (#4907) from caesar/forgejo:revert-no-closed-pr-review into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4907
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: Otto <otto@codeberg.org>
2024-08-13 23:25:54 +00:00
Caesar Schinas
24418da690
add release notes 2024-08-13 22:14:46 +01:00
Otto
01affa0908 Merge pull request 'fix: Run full PR checks on agit push' (#4885) from viceice/forgejo:fix/agit/force-push into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4885
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: Otto <otto@codeberg.org>
2024-08-13 18:23:40 +00:00
Otto
69eb8f32cb Merge pull request 'fix(api): Clarify and correct descriptions for quota calls' (#4945) from fnetx/quota-api-language into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4945
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-13 15:37:53 +00:00
Earl Warren
5a66691607 Merge pull request '[gitea] week 2024-33 cherry pick (gitea/main -> forgejo)' (#4924) from earl-warren/wcp/2024-33 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4924
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-08-13 07:51:31 +00:00
Earl Warren
03b9d50c67
fix: enable LOG_COMPRESSION by default
Refs: https://codeberg.org/forgejo/forgejo/pulls/4924#issuecomment-2165839
2024-08-13 09:05:50 +02:00
Earl Warren
d42f28de4e
chore: update .deadcode.out 2024-08-13 09:05:50 +02:00
Earl Warren
5c8ccce785
chore(release-notes): weekly cherry-pick week 2024-33 2024-08-13 09:05:50 +02:00
Jason Song
c2310c1d6c
Fix typo for LOG_COMPRESSION in ini (#31809)
Follow #31761

---------

Co-authored-by: silverwind <me@silverwind.io>
(cherry picked from commit 42841aab59640262ed3b873d86980b0bb5d869ae)
2024-08-13 09:05:50 +02:00
Jason Song
83565de2c0
Fix IsObjectExist with gogit (#31790) (tests only)
Fix #31271.

When gogit is enabled, `IsObjectExist` calls
`repo.gogitRepo.ResolveRevision`, which is not correct. It's for
checking references not objects, it could work with commit hash since
it's both a valid reference and a commit object, but it doesn't work
with blob objects.

So it causes #31271 because it reports that all blob objects do not
exist.

(cherry picked from commit f4d3120f9d1de6a260a5e625b3ffa6b35a069e9b)

Conflicts:
  trivial resolution because go-git support was dropped https://codeberg.org/forgejo/forgejo/pulls/4941
2024-08-13 09:05:43 +02:00
Jason Song
a627b885c7
Support compression for Actions logs (#31761)
Support compression for Actions logs to save storage space and
bandwidth. Inspired by
https://github.com/go-gitea/gitea/issues/24256#issuecomment-1521153015

The biggest challenge is that the compression format should support
[seekable](https://github.com/facebook/zstd/blob/dev/contrib/seekable_format/zstd_seekable_compression_format.md).
So when users are viewing a part of the log lines, Gitea doesn't need to
download the whole compressed file and decompress it.

That means gzip cannot help here. And I did research, there aren't too
many choices, like bgzip and xz, but I think zstd is the most popular
one. It has an implementation in Golang with
[zstd](https://github.com/klauspost/compress/tree/master/zstd) and
[zstd-seekable-format-go](https://github.com/SaveTheRbtz/zstd-seekable-format-go),
and what is better is that it has good compatibility: a seekable format
zstd file can be read by a regular zstd reader.

This PR introduces a new package `zstd` to combine and wrap the two
packages, to provide a unified and easy-to-use API.

And a new setting `LOG_COMPRESSION` is added to the config, although I
don't see any reason why not to use compression, I think's it's a good
idea to keep the default with `none` to be consistent with old versions.

`LOG_COMPRESSION` takes effect for only new log files, it adds `.zst` as
an extension to the file name, so Gitea can determine if it needs
decompression according to the file name when reading. Old files will
keep the format since it's not worth converting them, as they will be
cleared after #31735.

<img width="541" alt="image"
src="https://github.com/user-attachments/assets/e9598764-a4e0-4b68-8c2b-f769265183c9">

(cherry picked from commit 33cc5837a655ad544b936d4d040ca36d74092588)

Conflicts:
	assets/go-licenses.json
	go.mod
	go.sum
  resolved with make tidy
2024-08-13 06:51:49 +02:00
Edip Emre Bodur
8b6747173a
Fix null requested_reviewer from API (#31773)
If the assign the pull request review to a team, it did not show the
members of the team in the "requested_reviewers" field, so the field was
null. As a solution, I added the team members to the array.

fix #31764

(cherry picked from commit 94cca8846e7d62c8a295d70c8199d706dfa60e5c)
2024-08-13 06:51:49 +02:00
Earl Warren
439c8fb246 Merge pull request '[CHORE] Drop go-git support' (#4941) from gusted/drop-gogit into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4941
Reviewed-by: Otto <otto@codeberg.org>
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-08-13 04:47:54 +00:00
Otto Richter
e330c88411 fix(api): Correct descriptions for quota calls 2024-08-12 22:05:56 +02:00
Gusted
a21128a734
[CHORE] Drop go-git support
See https://codeberg.org/forgejo/discussions/issues/164 for the
rationale and discussion of this change.

Everything related to the `go-git` dependency is dropped (Only a single
instance is left in a test file to test for an XSS, it requires crafting
an commit that Git itself refuses to craft). `_gogit` files have
been removed entirely, `go:build: !gogit` is removed, `XXX_nogogit.go` files
either have been renamed or had their code being merged into the
`XXX.go` file.
2024-08-12 19:11:09 +02:00
Otto
4132b18e59 Merge pull request 'git-grep: ensure bounded default for MatchesPerFile' (#4928) from yoctozepto/forgejo:git-grep-limit-matches-per-file into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4928
Reviewed-by: Shiny Nematoda <snematoda@noreply.codeberg.org>
Reviewed-by: Otto <otto@codeberg.org>
2024-08-12 14:37:43 +00:00
Otto
5e6bc07610 Merge branch 'forgejo' into revert-no-closed-pr-review 2024-08-12 14:30:03 +00:00
Otto
b7fcc5e29d Merge pull request 'chore(ci): Use forgejo mirror for common docker images' (#4939) from fnetx/mirror-ci-images into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4939
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-08-12 14:28:15 +00:00
Otto Richter
395c10596e chore(ci): use postgres image from mirror 2024-08-12 16:19:20 +02:00
Otto Richter
c3f2b60b3b chore(renovate): Add mirrored node image to renovate.json 2024-08-12 16:19:20 +02:00
Otto Richter
53ca3d4e6c chore(ci): Use mirrored container images for node 2024-08-12 16:11:35 +02:00
Gusted
fdabcf5d44 Merge pull request 'Lock file maintenance (forgejo)' (#4936) from renovate/forgejo-lock-file-maintenance into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4936
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-08-12 12:26:19 +00:00
Caesar Schinas
65c2595f26
Revert "Prevent allow/reject reviews on merged/closed PRs"
This reverts commit 4ed372af13.
This change from Gitea was not considered by the Forgejo UI team and there is a consensus that it feels like a regression.

The test which was added in that commit is kept and modified to test that reviews can successfully be submitted on closed and merged PRs.

Closes forgejo/design#11
2024-08-12 12:24:52 +01:00
Michael Kriese
2d05e922a2
fix(agit): run full pr checks on force-push 2024-08-12 09:00:41 +02:00
forgejo-renovate-action
0d2efa2c4a Merge pull request 'Update renovate to v38.25.0 (forgejo)' (#4933) from renovate/forgejo-renovate into forgejo 2024-08-12 04:50:22 +00:00
Renovate Bot
88169e74ed Lock file maintenance 2024-08-12 02:06:15 +00:00
Renovate Bot
eb6afae1c0 Update renovate to v38.25.0 2024-08-12 00:04:22 +00:00
Earl Warren
8359b26d3f Merge pull request '[PORT] Add warning message in merge instructions when AutodetectManualMerge was not enabled (gitea#31805)' (#4930) from gusted/forgejo-gt-bp-31805 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4930
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-08-11 22:15:40 +00:00
Gusted
d2184dd931 Merge pull request 'git-grep: skip binary files' (#4927) from yoctozepto/forgejo:git-grep-skip-binary into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4927
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: Shiny Nematoda <snematoda@noreply.codeberg.org>
2024-08-11 18:58:48 +00:00
a1012112796
e5f8d144f2
[PORT] Add warning message in merge instructions when AutodetectManualMerge was not enabled (gitea#31805)
---

Conflict resolution: trivial
Things done differently: Improve localization message, use the paragraph
element instead of the div element, fix passing this variable to the
template and add a integration test

(cherry picked from commit 9633f336c87947dc7d2a5e76077a10699ba5e50d)
2024-08-11 19:15:37 +02:00
Radosław Piliszek
f4a7bf6d2a git-grep: skip binary files
It is a waste of resources to scan them looking for matches
because they are never returned back - they appear as empty
lines in the current format.

Notably, even if they were returned, it is unlikely that matching
in binary files makes sense when the goal is "code search".
2024-08-11 19:10:23 +02:00