Commit graph

18800 commits

Author SHA1 Message Date
Gusted
de440f8b93 Merge pull request '[v7.0/forgejo] [BUG] Fix admin layout' (#3088) from bp-v7.0/forgejo-c2d0f64 into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3088
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2024-04-07 10:42:05 +00:00
Gusted
7bbb93b3b1 [BUG] Fix admin layout
- Fix the layout of admin pages, it previously was full-width and had
the alert at the incorrect place and within an container.
- Make the placement of the alert consistent with other pages, inside
`flex-container-main` and not wrapped around a container.
- We have to revert 145bebc829, as this
expected that the page contain provided padding, this was provided by
the incorrect placement of the alert. As well isn't consistent with how
other pages are being shown, non-full width. The solution to the
described problem isn't optimal and should rather be fixed with the tables.
- Reverts 145bebc829
- Resolves #3082

(cherry picked from commit c2d0f64340)
2024-04-06 20:48:09 +00:00
Earl Warren
572019129e Merge pull request '[v7.0/forgejo] [FEAT] Support Include/Exclude Filters for Grep' (#3080) from bp-v7.0/forgejo-baac15f into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3080
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-04-06 20:44:26 +00:00
Earl Warren
da1810b12c Merge pull request '[v7.0/forgejo] Add unit tests for update git hook' (#3083) from bp-v7.0/forgejo-dad799f into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3083
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-04-06 20:40:15 +00:00
Gusted
d4a4b4b4e3 Add unit tests for update git hook
- Add unit tests.
- Handle the 'impossible' case of not enough arguments.
- Ref: https://codeberg.org/forgejo/forgejo/pulls/2834

(cherry picked from commit dad799fa46)
2024-04-06 17:39:03 +00:00
Shiny Nematoda
328f694a33 [FEAT] Support Include/Exclude Filters for Grep (#3058)
fixes `TestRepoSearch` failing occasionally

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3058
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Shiny Nematoda <snematoda.751k2@aleeas.com>
Co-committed-by: Shiny Nematoda <snematoda.751k2@aleeas.com>
(cherry picked from commit baac15f316)
2024-04-06 17:38:32 +00:00
Gusted
52d217ec50 Merge pull request '[v7.0/forgejo] Sort BuiltinApplicationsClientIDs() in test' (#3079) from bp-v7.0/forgejo-eea2590 into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3079
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: oliverpool <oliverpool@noreply.codeberg.org>
2024-04-06 14:09:20 +00:00
forgejo-backport-action
706a7ad41e [v7.0/forgejo] Fix "view file" button in diff compare view (#3077)
**Backport:** https://codeberg.org/forgejo/forgejo/pulls/3046

This PR fixes an issue in the diff compare view, where when working on a fork that has not the same name as the upstream repo, the "View file" button links to a wrong, often missing, location.

Demonstration of this issue:
- Visit https://next.forgejo.org/mai-lapyst-test-org/upstream/compare/main...Mai-Lapyst/downstream:mai-lapyst-patch-1.
- Click the "View file" button of the patch.
- Get taken to `4fe947d522/README.md` (which does not exist and returns a 404) instead of `4fe947d522/README.md`. Note the different repository name (`upstream` vs `downstream`).

Co-authored-by: Mai-Lapyst <mai-lapyst@noreply.codeberg.org>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3077
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org>
Co-committed-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org>
2024-04-06 13:24:55 +00:00
forgejo-backport-action
5bde9555b1 [v7.0/forgejo] Add optional pronoun field in user settings (#3076)
**Backport:** https://codeberg.org/forgejo/forgejo/pulls/1518

An attempt at adding an optional pronoun field for user profiles, as suggested here 3 years ago: https://github.com/go-gitea/gitea/issues/13990

![A Forgejo profile showing pronouns to the right of the user's username](/attachments/2e5ff300-d333-46db-9074-f030f199843c)

I made this for [my own instance](https://git.gay/h) and didn't initially think I'd make a PR because of the previous closed issue, but I thought I'd ask the Forgejo matrix chat to see if there was any support and there was!

I'm told I should make a database migration, some help as to how to do that would be appreciated.

Co-authored-by: hazycora <hazysu@riseup.net>
Co-authored-by: Gergely Nagy <forgejo@gergo.csillger.hu>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3076
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org>
Co-committed-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org>
2024-04-06 13:23:43 +00:00
Gusted
8d8dce747a Sort BuiltinApplicationsClientIDs() in test
- Ref https://codeberg.org/forgejo/forgejo/pulls/3069#issuecomment-1736290

(cherry picked from commit eea259055e)
2024-04-06 12:55:31 +00:00
Gusted
a070f28c81 Merge pull request '[v7.0/forgejo] [BUG] Don't remove builtin OAuth2 applications' (#3069) from bp-v7.0/forgejo-6af8f3a into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3069
Reviewed-by: oliverpool <oliverpool@noreply.codeberg.org>
2024-04-06 12:43:33 +00:00
Earl Warren
1065ee4a60 Merge pull request '[v7.0/forgejo] Fix #3030 add Cache-Control header for health-check' (#3074) from bp-v7.0/forgejo-323d7ad-84f5115-d2ff8f8-b210a3e into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3074
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-04-06 09:55:19 +00:00
Earl Warren
3da5ad9a00 Merge pull request '[v7.0/forgejo] feat: improve nuget nuspec api' (#3073) from bp-v7.0/forgejo-bc72fd7 into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3073
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-04-06 09:50:50 +00:00
Gusted
d2a7905d9d Merge pull request '[v7.0/forgejo] Refactor LFS GC functions' (#3072) from bp-v7.0/forgejo-7ffa7f5 into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3072
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-04-06 09:34:01 +00:00
Earl Warren
8e27c91df2 Merge pull request '[v7.0/forgejo] [BUG] fix webhook creation payload ref' (#3070) from bp-v7.0/forgejo-2c85a14-9d29192 into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3070
Reviewed-by: oliverpool <oliverpool@noreply.codeberg.org>
2024-04-06 09:01:19 +00:00
Ada
7aa0999c9f Remove useless t.run
(cherry picked from commit 323d7ad507)
2024-04-06 08:44:23 +00:00
Ada
8ddfd26d97 Add health-check test
(cherry picked from commit 84f5115bd1)
2024-04-06 08:44:23 +00:00
Ada
12c28641ab Remove old proxy backwards compatibility
(cherry picked from commit d2ff8f8720)
2024-04-06 08:44:23 +00:00
Ada
3eab81fdea Fix #3030 add Cache-Control header for health-check
(cherry picked from commit b210a3ebd5)
2024-04-06 08:44:23 +00:00
Michael Kriese
091400b656 feat: improve nuget nuspec api
(cherry picked from commit bc72fd7f46)
2024-04-06 08:32:53 +00:00
Gusted
aa7346c007 Refactor LFS GC functions
- Remove options that currently aren't set
on `GarbageCollectLFSMetaObjectsOptions` and
`IterateLFSMetaObjectsForRepoOptions`.
- Simplify `IterateRepositoryIDsWithLFSMetaObjects` and
`IterateLFSMetaObjectsForRepo`.
- `IterateLFSMetaObjectsForRepo` was previously able to get in a
loop (`gc-lfs` doctor check was able to reproduce this) because the code
expected that the records would be updated to not match the SQL query,
but that wasn't the case. Simply enforce that only records higher than
the latest `id` from the previous iteration are allowed.
- For `gc-lfs` doctor check this was because `UpdatedLessRecentlyThan`
option was not set, which caused that records just marked as active in
the iteration weren't being filtered.
- Add unit tests
- Most likely a regression from 2cc3a6381c.
- The bug with `gc-lfs` was found on Codeberg.

(cherry picked from commit 7ffa7f5bce)
2024-04-06 07:41:40 +00:00
oliverpool
a2a833c5ac [FIX] webhook creation payload ref
(cherry picked from commit 2c85a1417b)
2024-04-06 07:30:48 +00:00
oliverpool
4a8eb1caa1 [TEST] webhook creation payload ref
(cherry picked from commit 9d2919248b)
2024-04-06 07:30:48 +00:00
Gusted
2236574d50 [BUG] Don't remove builtin OAuth2 applications
- When the database consistency is being run it would check for any
OAuth2 applications that don't have an existing user. However there are
few special OAuth2 applications that don't have an user set, because
they are global applications.
- This was not taken into account by the database consistency checker
and were removed if the database consistency check was being run with
autofix enabled.
- Take into account to ignore these global OAuth2 applications when
running the database consistency check.
- Add unit tests.
- Ref: https://codeberg.org/Codeberg/Community/issues/1530

(cherry picked from commit 6af8f3a3f2)
2024-04-06 07:03:41 +00:00
Earl Warren
7e5fed7e29 Merge pull request '[v7.0/forgejo] [CHORE] Remove Gitea specific files' (#3066) from bp-v7.0/forgejo-396b539 into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3066
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-04-06 07:02:35 +00:00
Gusted
1db55b1754 [CHORE] Remove Gitea specific files
- Removal of `docs`, this contains Gitea documentation which is not used
by Forgejo.
- Removal of `CHANGELOG.md` this contains only Gitea commits of
releases, instead `RELEASE-NOTES.md` should be used instead which also
contains Forgejo commits.

(cherry picked from commit 396b539496)
2024-04-05 20:41:12 +00:00
Earl Warren
7df46a9b34 Merge pull request '[v7.0/forgejo] [FEAT] sourcehut webhooks' (#3065) from bp-v7.0/forgejo-ed9dd0e-04a398a into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3065
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-04-05 20:35:05 +00:00
oliverpool
82b92c3f2c [FEAT] sourcehut webhooks
(cherry picked from commit ed9dd0e62a)
2024-04-05 19:36:04 +00:00
oliverpool
4ad42a4e3f [REFACTOR] webhook shared code to prevent import cycles
(cherry picked from commit 04a398a1af)
2024-04-05 19:36:03 +00:00
Earl Warren
be41258d5c Merge pull request '[v7.0/forgejo] Provide plural support for followers/following in user profiles' (#3053) from bp-v7.0/forgejo-ddedcd4-df2a83e into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3053
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2024-04-05 09:35:25 +00:00
Earl Warren
fe8b34b8fc Merge pull request 'Mark deprecation of MSSQL' (#3041) from gusted/forgejo-deprecate-mssql into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3041
Reviewed-by: Otto <otto@codeberg.org>
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-04-05 06:46:08 +00:00
Earl Warren
f5cd6339a8 Merge pull request '[v7.0/forgejo] Revert "[CI] pin go v1.22.2 version"' (#3051) from bp-v7.0/forgejo-2625335 into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3051
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-04-05 06:43:22 +00:00
0ko
68476e2494 Use people icon instead of person on profiles
(cherry picked from commit ddedcd44b7)
2024-04-05 06:32:11 +00:00
0ko
04ea1aedc5 [I18N] Provide plural support for followers/following in user profiles
(cherry picked from commit df2a83ed20)
2024-04-05 06:32:11 +00:00
Earl Warren
2ed0a56dd4 Merge pull request '[v7.0/forgejo] [I18N] Translations update from Weblate' (#3052) from bp-v7.0/forgejo-2c69ca4 into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3052
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-04-05 06:20:40 +00:00
Codeberg Translate
1f0e36f7ae [I18N] Translations update from Weblate (#2982)
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: Dirk <Dirk@users.noreply.translate.codeberg.org>
Co-authored-by: Eriwi <Eriwi@users.noreply.translate.codeberg.org>
Co-authored-by: earl-warren <earl-warren@users.noreply.translate.codeberg.org>
Co-authored-by: 0ko <0ko@users.noreply.translate.codeberg.org>
Co-authored-by: Salif Mehmed <mail@salif.eu>
Co-authored-by: Fjuro <fjuro@alius.cz>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-authored-by: hankskyjames777 <hankskyjames777@users.noreply.translate.codeberg.org>
Co-authored-by: Kita Ikuyo <searinminecraft@courvix.com>
Co-authored-by: FedericoSchonborn <FedericoSchonborn@users.noreply.translate.codeberg.org>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2982
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>
(cherry picked from commit 2c69ca43f5)
2024-04-05 04:58:22 +00:00
Earl Warren
af797534f8 Merge pull request '[v7.0/forgejo] Fixes regression of issue edit not working' (#3047) from bp-v7.0/forgejo-8c31b78 into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3047
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-04-05 04:56:38 +00:00
Earl Warren
5374cb6608 Revert "[CI] pin go v1.22.2 version"
The golang action now knows about the latest Go version.

This reverts commit 3509242ee6.

(cherry picked from commit 262533570f)
2024-04-05 04:40:24 +00:00
Mai-Lapyst
84d8c8b777 Fixes regression of issue edit not working
(cherry picked from commit 8c31b78630)
2024-04-05 04:03:20 +00:00
Gusted
c65b9e0112
Mark depreciation of MSSQL
- Per https://codeberg.org/forgejo/discussions/issues/122
2024-04-04 22:27:56 +02:00
Earl Warren
2024519bb4 Merge pull request '[v7.0/forgejo] [FEAT] Add label filters in organization issues dashboard' (#3038) from bp-v7.0/forgejo-8d13ed4 into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3038
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-04-04 19:41:54 +00:00
Earl Warren
279d1a85f0 Merge pull request '[v7.0/forgejo] Plural support for release download count' (#3037) from bp-v7.0/forgejo-2fff6c2 into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3037
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2024-04-04 18:36:48 +00:00
Earl Warren
2c263b2732 Merge pull request '[v7.0/forgejo] feat: add optional storage init to doctor commands' (#3035) from bp-v7.0/forgejo-e226a27 into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3035
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-04-04 18:36:03 +00:00
Earl Warren
2bf3723939 Merge pull request '[v7.0/forgejo] [BUG] Fix crash in issue forms' (#3036) from bp-v7.0/forgejo-b0cd0eb into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3036
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-04-04 18:35:37 +00:00
iminfinity
cb0c6b52be add label filters in org/{org_name}/issues
(cherry picked from commit 8d13ed4a8d)
2024-04-04 17:37:56 +00:00
0ko
bf275ac92f [I18N] Provide plural support for release download count
Following https://codeberg.org/forgejo/forgejo/pulls/2899 and my review

See https://codeberg.org/forgejo/forgejo/pulls/3031#issuecomment-1733158 for why older strings were dropped

(cherry picked from commit 2fff6c255d)
2024-04-04 17:29:14 +00:00
Gusted
aefdf17a75 [BUG] Fix crash in issue forms
- Fix a crash in the issue forms, because `ctx.Ctx` was trying to be
accessed, however this is not set in all contexts thus could result to NPE.
- Adds integration test.
- Resolves #3011

(cherry picked from commit b0cd0ebb91)
2024-04-04 16:57:55 +00:00
Michael Kriese
5b7d454dd8 feat: add optional storage init to doctor commands
(cherry picked from commit e226a27233)
2024-04-04 16:56:55 +00:00
Earl Warren
fbaebbd644 Merge pull request '[v7.0/forgejo] [FEAT] Visual separation between types of attachments' (#3029) from bp-v7.0/forgejo-20a3597 into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3029
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2024-04-04 16:43:39 +00:00
Gusted
139979f25d Merge pull request '[v7.0/forgejo] [BUG] Center icon and callout text' (#3027) from bp-v7.0/forgejo-6ffae46 into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3027
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-04-04 14:59:10 +00:00