Commit graph

18623 commits

Author SHA1 Message Date
Earl Warren
f83e55b1ca Merge pull request '[v7.0/forgejo] Some NuGet package enhancements' (#3256) from bp-v7.0/forgejo-2e613ad into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3256
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-04-16 08:41:03 +00:00
Michael Kriese
a1716fcdfc Some NuGet package enhancements
- https://github.com/go-gitea/gitea/pull/30280

(cherry picked from commit 2e613ad5e7)
2024-04-16 06:54:35 +00:00
0ko
2879c15858 Merge pull request '[v7.0/forgejo] Improve English locale' (#3241) from bp-v7.0/forgejo-3b23633 into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3241
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2024-04-16 04:49:37 +00:00
0ko
a0a6eb6c5c Merge pull request '[v7.0/forgejo] Translations update from Weblate' (#3240) from 0ko/forgejo:v7-backport-weblate-240415 into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3240
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-04-16 04:47:56 +00:00
Earl Warren
ee749c7916 Merge pull request '[v7.0/forgejo] fix(actions): call automerge service on successful commit state' (#3238) from bp-v7.0/forgejo-36f4732 into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3238
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-04-15 17:52:36 +00:00
0ko
74bc9e666f [I18N] Improve English locale
- user settings/profile: renamed Description fild of biography to Biography

(cherry picked from commit 3b23633721)
2024-04-15 17:50:01 +00:00
Codeberg Translate
487242e043 [I18N] Translations update from Weblate (#3138)
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: 0ko <0ko@users.noreply.translate.codeberg.org>
Co-authored-by: Wuzzy <Wuzzy@users.noreply.translate.codeberg.org>
Co-authored-by: hankskyjames777 <hankskyjames777@users.noreply.translate.codeberg.org>
Co-authored-by: Kita Ikuyo <searinminecraft@courvix.com>
Co-authored-by: yeziruo <yeziruo@users.noreply.translate.codeberg.org>
Co-authored-by: WithLithum <WithLithum@users.noreply.translate.codeberg.org>
Co-authored-by: EssGeeEich <EssGeeEich@users.noreply.translate.codeberg.org>
Co-authored-by: rguards <rguards@users.noreply.translate.codeberg.org>
Co-authored-by: kecrily <kecrily@users.noreply.translate.codeberg.org>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3138
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Codeberg Translate <translate@noreply.codeberg.org>
Co-committed-by: Codeberg Translate <translate@noreply.codeberg.org>
2024-04-15 22:30:11 +05:00
Earl Warren
e982f5f63b Merge pull request '[v7.0/forgejo] [PORT] gitea#30430: Fix rename branch 500 when the target branch is deleted but exist in database' (#3236) from bp-v7.0/forgejo-db39b8f into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3236
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-04-15 17:23:51 +00:00
Michael Kriese
f49402273f fix(actions): call automerge service on successful commit state
- Backport of https://github.com/go-gitea/gitea/pull/30225

(cherry picked from commit 36f4732e6a)
2024-04-15 16:51:22 +00:00
Gusted
fe09c8860a [PORT] gitea#30430: Fix rename branch 500 when the target branch is deleted but exist in database
Fix https://github.com/go-gitea/gitea/issues/30428

---

Conflict resolution: trivial and move test to own subtest run directly
after `Normal`.

(cherrypicked commit 9466fec879f4f2c88c7c1e7a5cffba319282ab66)

(cherry picked from commit db39b8f4a7)
2024-04-15 15:52:24 +00:00
Earl Warren
78944bb709 Merge pull request '[v7.0/forgejo] fix(actions): the trigger user of a schedule is the action user' (#3216) from bp-v7.0/forgejo-c3e2c25 into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3216
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-04-14 18:34:20 +00:00
Earl Warren
35b129e984 fix(actions): the trigger user of a schedule is the action user
The user that caused the notification to re-evaluates the
schedules is not the one that will trigger the workflows. They are
background tasks that are authored by the action user (id -2).

Such a mis-assignment is problematic when the user that caused the
notification is deleted.

Fixes: https://codeberg.org/forgejo/forgejo/issues/3211
(cherry picked from commit c3e2c25359)
2024-04-14 17:36:48 +00:00
forgejo-backport-action
1b8fd7b17b [v7.0/forgejo] [BUG] Fix code search in explore reporting as git grep even with indexer enabled (#3204)
**Backport:** https://codeberg.org/forgejo/forgejo/pulls/3173

regression caused in porting #2813 🫣

see https://codeberg.org/forgejo/forgejo/pulls/2688#issuecomment-1692750

Co-authored-by: Shiny Nematoda <snematoda.751k2@aleeas.com>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3204
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-14 14:21:31 +00:00
0ko
ef0ab3cdaf Merge pull request 'Fix box rounding on dashboard (F7.0)' (#3202) from 0ko/forgejo:box-dash-v7 into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3202
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-04-13 07:17:33 +00:00
0ko
5420b630f5 Fix box rounding on dashboard (F7.0)
Regression of 4711d3311b (diff-1daf5eae3896bddcde764fc8a88dc3fd0c0ea21a).
2024-04-13 10:44:19 +05:00
Earl Warren
f075579c95 Merge pull request '[v7.0/forgejo] Fix inline permalinks across repo; closes #2965' (#3198) from bp-v7.0/forgejo-1d1c013 into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3198
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-04-12 23:40:43 +00:00
Earl Warren
88b6164f84 Merge pull request '[v7.0/forgejo] [BUG] Fix for PyPi Registry PEP 503 Compliance' (#3197) from bp-v7.0/forgejo-14badb3-303b95a into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3197
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-04-12 23:07:36 +00:00
Mai-Lapyst
dbf1d06ff6 Fix inline permalinks across repo; closes #2965 (#3042)
This PR fixes the possible ambiguity of rendered inline permalinks across repos by adding it as a suffix to the title element if the permalink refers to a file not inside the current repository. Closes #2965

![grafik](/attachments/e70e37b8-24c7-4f7b-ab52-92f1e8dfb009)

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3042
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Mai-Lapyst <mai-lapyst@noreply.codeberg.org>
Co-committed-by: Mai-Lapyst <mai-lapyst@noreply.codeberg.org>
(cherry picked from commit 1d1c0131bb)
2024-04-12 22:38:57 +00:00
Zottelchen
bb7b211c0c Update tests/integration/api_packages_pypi_test.go
(cherry picked from commit 14badb37fe)
2024-04-12 22:23:58 +00:00
Zottelchen
aad193c4a6 Update templates/api/packages/pypi/simple.tmpl
(cherry picked from commit 303b95a1c1)
2024-04-12 22:23:58 +00:00
Earl Warren
caa6b4a34d Merge pull request '[v7.0/forgejo] Fix the settings tab highlighting' (#3195) from bp-v7.0/forgejo-65ed86e into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3195
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-04-12 22:19:16 +00:00
Earl Warren
9656408102 Merge pull request '[v7.0/forgejo] [BUG] Render correct label link' (#3196) from bp-v7.0/forgejo-7a97c05 into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3196
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-04-12 22:18:59 +00:00
Gusted
0c71afea31 [BUG] Render correct label link
- Render the correct label for pull requests, it should link to the pull
requests list and not the issue list.
- Add unit test.
- Resolves https://codeberg.org/forgejo/forgejo/issues/3183

(cherry picked from commit 7a97c05206)
2024-04-12 20:47:23 +00:00
Gergely Nagy
fd5abfd244 Fix the settings tab highlighting
When visiting a repos `/settings/units` page, highlight the active tab
properly: "Add more..." if the tab is displayed, or "Settings"
otherwise.

Fixes #3188.

Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
(cherry picked from commit 65ed86e396)
2024-04-12 20:46:24 +00:00
Earl Warren
89d751ef1b Merge pull request '[v7.0/forgejo] Update forgejo/forgejo-build-publish action to v5' (#3186) from bp-v7.0/forgejo-d7ae60a into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3186
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-04-12 13:55:47 +00:00
Renovate Bot
ce2b1643f9 Update forgejo/forgejo-build-publish action to v5
(cherry picked from commit d7ae60ae91)
2024-04-12 12:23:15 +00:00
Earl Warren
e4f160eed2 Merge pull request '[v7.0/forgejo] Do not update PRs based on events that happened before they existed' (#3164) from earl-warren/forgejo:wip-v7.0-superfluous into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3164
Reviewed-by: oliverpool <oliverpool@noreply.codeberg.org>
2024-04-12 09:14:02 +00:00
Earl Warren
50822f361e
Do not update PRs based on events that happened before they existed
* Split TestPullRequest out of AddTestPullRequestTask
* A Created field is added to the Issue table
* The Created field is set to the time (with nano resolution) on creation
* Record the nano time repo_module.PushUpdateOptions is created by the hook
* The decision to update a pull request created before a commit was
  pushed is based on the time (with nano resolution) the git hook
  was run and the Created field

It ensures the following happens:

* commit C is pushed
* the git hook queues AddTestPullRequestTask for processing and returns with success
* TestPullRequest is not called yet
* a pull request P with commit C as the head is created
* TestPullRequest runs and ignores P because it was created after the commit was received

When the "created" column is NULL, no verification is done, pull
requests that were created before the column was created in the
database cannot be newer than the latest call to a git hook.

Fixes: https://codeberg.org/forgejo/forgejo/issues/2009
(cherry picked from commit 998a431747)

Conflicts:
	models/forgejo_migrations/migrate.go
	see https://codeberg.org/forgejo/forgejo/pulls/3165#issuecomment-1755941
	services/pull/pull.go
	trivial conflicts
2024-04-12 10:41:19 +02:00
Earl Warren
ce8bfa25fb Merge pull request '[v7.0/forgejo] [BUG] Handle bigger files in git grep' (#3168) from bp-v7.0/forgejo-668709a into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3168
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-04-11 19:48:58 +00:00
0ko
5ab76ec570 Merge pull request '[v7.0/forgejo] Remove unused translation' (#3174) from bp-v7.0/forgejo-f7aca6e into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3174
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2024-04-11 16:12:59 +00:00
Gusted
62a925b758 Remove unused translation
- Remove `enable_update_checker_helper` translation key which became
obsolete with #278

(cherry picked from commit f7aca6ed21)
2024-04-11 15:07:08 +00:00
0ko
fa06bf5e81 Merge pull request 'Backport Translations update from Weblate (#3064)' (#3169) from 0ko/forgejo:backport-translations-2024-04-v7 into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3169
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-04-11 14:53:53 +00:00
Gusted
b203e535e5 [BUG] Handle bigger files in git grep
- The parser of `git grep`'s output uses `bufio.Scanner`, which is a good
choice overall, however it does have a limit that's usually not noticed,
it will not read more than `64 * 1024` bytes at once which can be hit in
practical scenarios.
- Use `bufio.Reader` instead which doesn't have this limitation, but is
a bit harder to work with as it's a more lower level primitive.
- Adds unit test.
- Resolves https://codeberg.org/forgejo/forgejo/issues/3149

(cherry picked from commit 668709a33f)
2024-04-11 13:32:01 +00:00
Codeberg Translate
fbaba7ed54 [I18N] Translations update from Weblate (#3064)
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: Fjuro <fjuro@alius.cz>
Co-authored-by: Dirk <Dirk@users.noreply.translate.codeberg.org>
Co-authored-by: earl-warren <earl-warren@users.noreply.translate.codeberg.org>
Co-authored-by: WithLithum <WithLithum@users.noreply.translate.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-authored-by: adaaa <adaaa@users.noreply.translate.codeberg.org>
Co-authored-by: Salif Mehmed <mail@salif.eu>
Co-authored-by: Panagiotis \"Ivory\" Vasilopoulos <git@n0toose.net>
Co-authored-by: Kita Ikuyo <searinminecraft@courvix.com>
Co-authored-by: 0ko <0ko@users.noreply.translate.codeberg.org>
Co-authored-by: hankskyjames777 <hankskyjames777@users.noreply.translate.codeberg.org>
Co-authored-by: Wuzzy <Wuzzy@users.noreply.translate.codeberg.org>
Co-authored-by: Anonymous <anonymous@users.noreply.translate.codeberg.org>
Co-authored-by: emansije <emansije@users.noreply.translate.codeberg.org>
Co-authored-by: Xinayder <Xinayder@users.noreply.translate.codeberg.org>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3064
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Codeberg Translate <translate@noreply.codeberg.org>
Co-committed-by: Codeberg Translate <translate@noreply.codeberg.org>
2024-04-11 18:31:56 +05:00
Gusted
db56ccf993 Merge pull request '[v7.0/forgejo] [BUG] Store JSON in contributors commit cache' (#3161) from bp-v7.0/forgejo-4c8b67c into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3161
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-04-11 13:12:11 +00:00
Gusted
d60152587c [BUG] Store JSON in contributors commit cache
- The code that gets contributor stats tried to store an
`map[string]*ContributorData` type in the cache, this works for the
memory cache but not for other caches such as Redis.
- The cache implementation for Redis would convert this map via
`fmt.Sprintf` to an string, which would simply print the pointer and not
the value of the pointer. Storing pointers is a no-go as this will get
GC-ed eventually within a few minutes. Therefore store everything with
json, that does properly store the value of the pointers.
- Adds unit test that verifies JSON is being used.
- Resolves https://codeberg.org/forgejo/forgejo/issues/3158

(cherry picked from commit 4c8b67c4b2)
2024-04-11 12:06:19 +00:00
Earl Warren
b519ae39d7 Merge pull request '[v7.0/forgejo] [BUG] Fix tooltip for 1000+ stars/forks' (#3148) from bp-v7.0/forgejo-3e9a97b into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3148
Reviewed-by: Otto <otto@codeberg.org>
2024-04-11 05:11:12 +00:00
Gusted
3344ef3511 [BUG] Fix tooltip for 1000+ stars/forks
- The tooltip attribute should be inside the `<a>` element not outside of it.
- Regression of 854164f40b

(cherry picked from commit 3e9a97b9ce)
2024-04-10 22:35:21 +00:00
Earl Warren
60e28c9dda Merge pull request '[v7.0/forgejo] Update checker setting updates' (#3146) from bp-v7.0/forgejo-e498069 into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3146
2024-04-10 21:44:39 +00:00
0ko
71efe9b8fc Update checker setting updates
- revert c53f802778
- enable by default on install page
- save checkbox state between form submissions

Resolves https://codeberg.org/forgejo/forgejo/issues/2859

(cherry picked from commit e498069fd5)
2024-04-10 20:55:35 +00:00
Earl Warren
f1016e8ddd Merge pull request '[v7.0/forgejo] Remove redundant / deadcode error check' (#3145) from bp-v7.0/forgejo-9862f28 into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3145
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-04-10 18:51:08 +00:00
Gusted
711838a4df Remove error check
- This error check was made redudant by 375fd15fbf

(cherry picked from commit 9862f28ac5)
2024-04-10 17:43:57 +00:00
Earl Warren
666432d15b Merge pull request '[v1.22/gitea] week 15 cherry pick to v7.0' (#3113) from earl-warren/forgejo:wip-v7.0-gitea-cherry-pick into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3113
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-04-10 05:00:07 +00:00
Earl Warren
c63b347a0b Merge pull request '[v7.0/forgejo] [BUG] webhook: fix admin-hooks and add more tests' (#3131) from bp-v7.0/forgejo-9a94019-e0b5f2d-c1f7c49-7d95cf6 into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3131
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-04-09 23:01:34 +00:00
oliverpool
01dc275a19 webhook: add admin-hooks tests
(cherry picked from commit 9a94019db4)
2024-04-09 21:57:34 +00:00
oliverpool
660e450e6d webhook: fix admin-hooks new dropdowns
(cherry picked from commit e0b5f2d59b)
2024-04-09 21:57:34 +00:00
oliverpool
457370bfce webhook: add admin-hooks new list test
(cherry picked from commit c1f7c49804)
2024-04-09 21:57:34 +00:00
oliverpool
373200e986 webhook: add org tests
(cherry picked from commit 7d95cf6472)
2024-04-09 21:57:34 +00:00
Earl Warren
f3a4134049 Merge pull request '[v7.0/forgejo] Made "no key to sign this commit with" error clearer' (#3117) from bp-v7.0/forgejo-53dadee into v7.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3117
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2024-04-08 20:29:48 +00:00
Laxystem
a752d000ff Made "no key to sign this commit with" error more clear
(cherry picked from commit 53dadee350)
2024-04-08 19:08:39 +00:00