Earl Warren
cb656c3309
fix(ci): use 512MB for elasticsearch instead of 32GB
...
It can be observed that when elasticsearch runs in the CI the process
uses 32GB of resident memory.
Set Xmx and Xms to no more than the threshold that the JVM uses for
compressed object pointers (compressed oops); the exact threshold
varies but is near 32 GB. You can verify that you are under the
threshold by looking for a line in the logs like the following:
Refs: https://www.elastic.co/guide/en/elasticsearch/reference/7.5/docker.html
Refs: https://www.elastic.co/guide/en/elasticsearch/reference/7.5/heap-size.html
(cherry picked from commit d1dadf4e06
)
2024-07-16 11:01:31 +00:00
Earl Warren
75808d5ba9
Merge pull request '[v8.0/forgejo] [port] Use old behavior for telegram webhook (gitea#31588)' ( #4505 ) from bp-v8.0/forgejo-38dce65 into v8.0/forgejo
...
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4505
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-14 22:50:02 +00:00
wxiaoguang
c12857d5dd
Use old behavior for telegram webhook ( #31588 )
...
Fix #31182
(cherry picked from commit 43c63c33aea1b0725ed1fe7b4a55dd85050f0beb)
(cherry picked from commit 38dce65dc1
)
2024-07-14 20:26:54 +00:00
Otto
4f97baaec3
Merge pull request '[v8.0/forgejo] Fix CI status link in dashboard' ( #4501 ) from bp-v8.0/forgejo-1088c05 into v8.0/forgejo
...
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4501
Reviewed-by: Beowulf <beowulf@noreply.codeberg.org>
Reviewed-by: Otto <otto@codeberg.org>
2024-07-14 19:34:44 +00:00
Beowulf
d95ce0b6fb
Fixed link to commit status and tooltip on dashboard
...
Regression introduced by 5a18b74632
(cherry picked from commit 1088c057e0
)
2024-07-14 17:39:35 +00:00
Earl Warren
96d09860bd
Merge pull request '[v8.0/forgejo] tests(e2e): only run one test, not all of them each time' ( #4498 ) from bp-v8.0/forgejo-e3665c3 into v8.0/forgejo
...
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4498
Reviewed-by: Otto <otto@codeberg.org>
2024-07-14 17:10:56 +00:00
Otto
9f7d1051a4
Merge pull request '[v8.0/forgejo] [UI] Remove unnecessary vertical space in empty labels list' ( #4495 ) from bp-v8.0/forgejo-013b89e into v8.0/forgejo
...
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4495
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Reviewed-by: Otto <otto@codeberg.org>
2024-07-14 16:17:09 +00:00
Earl Warren
f3c22b5be1
tests(e2e): only run one test, not all of them each time
...
(cherry picked from commit e3665c3042
)
2024-07-14 15:32:18 +00:00
Gusted
5709359d55
[UI] Remove unnecessary vertical space in empty labels list
...
- Don't show the labels-list element, if no labels are selected.
- The labels-list was taking up vertical space, even if no labels were
selected which caused an inconsistency in how the sidebar looked.
- Adds integration test
(cherry picked from commit 013b89eb13
)
2024-07-14 14:41:03 +00:00
Earl Warren
c5f84e4a93
Merge pull request '[v8.0/forgejo] Fix AGit pull request instructions' ( #4479 ) from bp-v8.0/forgejo-0a5fa31 into v8.0/forgejo
...
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4479
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-13 22:09:56 +00:00
Beowulf
cb297a6f6f
Fix AGit checkout instruction
...
The checkout instruction for pull requests created with the AGit
workflow where incorrect.
(cherry picked from commit 0a5fa31edb
)
2024-07-13 18:28:14 +00:00
Earl Warren
c304a16cf8
Merge pull request '[v8.0/forgejo] Fix: Name conan remote forgejo' ( #4465 ) from bp-v8.0/forgejo-6efaf15 into v8.0/forgejo
...
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4465
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2024-07-12 14:44:04 +00:00
Kwonunn
47d6edab16
Fix: Name conan remote forgejo
...
(cherry picked from commit 6efaf155d9
)
2024-07-12 13:28:33 +00:00
forgejo-backport-action
ab23e0159b
[v8.0/forgejo] Improvements to English locale ( #4460 )
...
**Backport:** https://codeberg.org/forgejo/forgejo/pulls/4453
A few fixes and improvements.
Notable changes:
- `issues.ref_closing_from` now makes sense.
https://codeberg.org/attachments/c091cc42-f0bf-4a14-8e43-8c66ead5ef06
- `pulls.cmd_instruction_hint`: removed full stop.
https://codeberg.org/attachments/41fcf979-3a5b-48f8-9e60-bde0b06dd522
- `settings.wiki_rename_branch_main_desc`: fix based on change in stalled 3546 so the sentence makes sense.
- `find_file.go_to_file`: better describe what the button does
https://codeberg.org/attachments/e181e486-3376-446d-a994-bfe65c125a70
- `repos.unadopted.no_more`: it's also shown when there are no results, not when the server "ran out of results"
https://codeberg.org/attachments/9077cbc4-f9e7-4ee5-ad86-6cfff41fec37
- `security.txt`: rephrase to decrease brokenness of English.
- `translation_meta`: added a special string, can be used to trigger Weblate to create a PR, which is usable for debugging
Co-authors:
- https://codeberg.org/Cyborus
- https://codeberg.org/toolforger
- https://codeberg.org/woutput
Co-authored-by: 0ko <0ko@noreply.codeberg.org>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4460
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-07-12 13:09:13 +00:00
Earl Warren
93e6b7c3f9
Merge pull request 'Lock file maintenance (v8.0/forgejo)' ( #4446 ) from renovate/v8.0/forgejo-lock-file-maintenance into v8.0/forgejo
...
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4446
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-11 08:48:36 +00:00
Renovate Bot
e4c640a275
Lock file maintenance
2024-07-11 08:08:39 +00:00
Earl Warren
15606b1e1a
Merge pull request '[v8.0/forgejo] i18n: update of translations from Weblate' ( #4445 ) from bp-v8.0/forgejo-78c5e0b into v8.0/forgejo
...
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4445
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2024-07-11 07:53:52 +00:00
Codeberg Translate
6f7c191c70
i18n: update of translations from Weblate ( #4330 )
...
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: leana8959 <leana8959@users.noreply.translate.codeberg.org>
Co-authored-by: emansije <emansije@users.noreply.translate.codeberg.org>
Co-authored-by: Salif Mehmed <mail@salif.eu>
Co-authored-by: Zughy <Zughy@users.noreply.translate.codeberg.org>
Co-authored-by: EssGeeEich <EssGeeEich@users.noreply.translate.codeberg.org>
Co-authored-by: Fjuro <fjuro@alius.cz>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4330
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 78c5e0b56c
)
2024-07-11 06:38:53 +00:00
Earl Warren
b755fe8473
Merge pull request '[v8.0/forgejo] Improve button gap consistency in repos' ( #4397 ) from bp-v8.0/forgejo-c19222b into v8.0/forgejo
...
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4397
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-10 05:22:24 +00:00
Earl Warren
4493d0dbb4
Merge pull request '[v8.0/forgejo] [accessibility] Anchor elements' missing href added' ( #4423 ) from bp-v8.0/forgejo-0996828 into v8.0/forgejo
...
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4423
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-09 12:25:05 +00:00
Earl Warren
2339bfa0a0
Merge pull request '[v8.0/forgejo] Fix branch selector in commit graph' ( #4413 ) from bp-v8.0/forgejo-11ff38d into v8.0/forgejo
...
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4413
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: Beowulf <beowulf@noreply.codeberg.org>
2024-07-09 12:08:49 +00:00
Earl Warren
ea9d80ed36
Merge pull request '[v8.0/forgejo] tests: run JavaScript tests when web_src/js is modified' ( #4426 ) from bp-v8.0/forgejo-a6a64f1 into v8.0/forgejo
...
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4426
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-08 19:35:10 +00:00
Earl Warren
562b6b605e
tests: run JavaScript tests when web_src/js is modified
...
otherwise they are not useful
(cherry picked from commit a6a64f1fdc
)
2024-07-08 18:58:33 +00:00
0ko
c521e46d24
Merge pull request '[v8.0/forgejo] [BUG] Fix mobile UI for organisation creation' ( #4402 ) from bp-v8.0/forgejo-610487e into v8.0/forgejo
...
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4402
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2024-07-08 18:40:57 +00:00
banaanihillo
9024b98b3f
accessibility: anchor elements' missing href added ( #4375 )
...
Add an empty hash `href="#"` attribute to anchors that did not yet have any `href` attribute, as a quick work-around to make those elements possible to interact with via keyboard. See discussion on linked issue (https://codeberg.org/forgejo/forgejo/issues/4273 ) for more information on how the button-like elements like this could eventually be improved even more.
Fixes https://codeberg.org/forgejo/forgejo/issues/4273 .
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4375
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: banaanihillo <banaanihillo@noreply.codeberg.org>
Co-committed-by: banaanihillo <banaanihillo@noreply.codeberg.org>
(cherry picked from commit 099682892b
)
2024-07-08 17:37:42 +00:00
Beowulf
3fdf2e691c
fix branch selector in commit graph
...
Regression from 5ef80ceb64
(cherry picked from commit 11ff38dd40
)
2024-07-08 11:22:31 +00:00
Gusted
0700dde04e
[BUG] Fix mobile UI for organisation creation
...
- Don't make checkpoints or radio inputs full width on a small screen,
these obviously shouldn't try to take up the whole width of a container.
- Wrap the label for organisation permission box inside a `<span
class="inline field">`, so it gets a left-margin from the `.inline.field
> :first-child` selector. This make the checkboxes and radio buttons
groups look indented from the left.
- Resolves #4361
(cherry picked from commit 610487eb83
)
2024-07-07 19:32:50 +00:00
0ko
64462a6980
ui: improve button gap consistency in repos ( #4365 )
...
Improve UI in a few areas in a similar way to dc0d3a40ab
. Ensure consistent 0.5em gaps in button rows, make buttons have more consistent horizontal paddings for better clickability.
Preview:
https://codeberg.org/attachments/cfca200a-3b68-4ba8-9876-75cea7822a00
https://codeberg.org/attachments/aaa5d387-919b-45af-8854-6d0f5273125f
https://codeberg.org/attachments/989225b7-b1dd-491d-bf76-7e4a962ea54e
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4365
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
(cherry picked from commit c19222b22f
)
2024-07-07 15:29:50 +00:00
Earl Warren
be45927559
Merge pull request '[v8.0/forgejo] [BUG] Use correct SHA in GetCommitPullRequest
' ( #4380 ) from bp-v8.0/forgejo-a8460bb into v8.0/forgejo
...
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4380
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-06 21:56:18 +00:00
Gusted
4f3726ed13
[BUG] Use correct SHA in GetCommitPullRequest
...
- The param wasn't `sha`, it was `ref`. Use this instead.
- Adds new integration tests.
- Resolves #4190
- Resolves #4025
(cherry picked from commit a8460bb132
)
2024-07-06 21:00:38 +00:00
Earl Warren
e269d405d0
Merge pull request '[v8.0/forgejo] Fixes an visual bug where the info box to dispatch a workflow is shown even for users that lack permissions to actualy run the workflow.' ( #4364 ) from bp-v8.0/forgejo-98c8d45 into v8.0/forgejo
...
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4364
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-06 06:21:56 +00:00
Mai-Lapyst
57c6c9ca9c
Fixes an visual bug where the info box to dispatch a workflow is shown even for users that lack permissions to actualy run the workflow. ( #4305 )
...
Example: Visit https://v8.next.forgejo.org/Mai-Lapyst/test/actions?workflow=dispatch.yaml&actor=0&status=0 without being logged in.
![image](/attachments/98e74104-4d60-4f7f-b17c-7e76467cd397)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4305
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 98c8d45f0b
)
2024-07-06 05:36:21 +00:00
Earl Warren
4a019ce450
Merge pull request 'Lock file maintenance (v8.0/forgejo)' ( #4346 ) from renovate/v8.0/forgejo-lock-file-maintenance into v8.0/forgejo
...
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4346
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-07-05 13:58:32 +00:00
Renovate Bot
d9b6adffc5
Lock file maintenance
2024-07-05 11:01:38 +00:00
Earl Warren
e4d1b465ea
Merge pull request '[v8.0/forgejo] test: issue sidebar testing using playwright' ( #4336 ) from bp-v8.0/forgejo-fafc4f6 into v8.0/forgejo
...
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4336
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-05 06:16:39 +00:00
forgejo-backport-action
41763bbb06
[v8.0/forgejo] ui(blame): remove broken padding
...
Backport: https://codeberg.org/forgejo/forgejo/pulls/4318 .
This padding causes visual bug, because it only applies to the first line and not to the rest in case the line is broken into multiple.
I don't think it's actually needed here for good look, so I decided to remove it. In case decreased padding looks worse, the padding can be grown back via other element so it wouldn't cause this bug.
Preview: https://codeberg.org/attachments/56fd2ee8-4955-409d-998f-1feba987b9af .
Co-authored-by: 0ko <0ko@noreply.codeberg.org>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4321
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-07-05 05:49:10 +00:00
Otto Richter
31ad8ea2da
test: issue sidebar testing using playwright ( #4319 )
...
Conclusion of https://codeberg.org/forgejo/forgejo/issues/3499
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4319
Co-authored-by: Otto Richter <git@otto.splvs.net>
Co-committed-by: Otto Richter <git@otto.splvs.net>
(cherry picked from commit fafc4f6ad9
)
2024-07-05 05:06:15 +00:00
Earl Warren
c19a9a4eda
Merge pull request '[v8.0/forgejo] build(go-licenses): support go toolchain mismatch' ( #4325 ) from bp-v8.0/forgejo-b31e21d into v8.0/forgejo
...
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4325
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-04 15:39:09 +00:00
Michael Kriese
dfef354f77
build(go-licenses): support go toolchain mismatch
...
(cherry picked from commit b31e21d80e
)
2024-07-04 14:16:27 +00:00
Earl Warren
ad66926396
Merge pull request '[v8.0/forgejo] fix(hook): ignore unknown push options instead of failing' ( #4288 ) from bp-v8.0/forgejo-5561e80 into v8.0/forgejo
...
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4288
2024-07-04 10:23:41 +00:00
Earl Warren
a6b789b2b1
Merge pull request '[v8.0/forgejo] [I18N] Translations update from Weblate' ( #4316 ) from bp-v8.0/forgejo-2a643d2 into v8.0/forgejo
...
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4316
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-04 08:05:35 +00:00
Codeberg Translate
33aff7f085
[I18N] Translations update from Weblate ( #4251 )
...
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: Panagiotis \"Ivory\" Vasilopoulos <git@n0toose.net>
Co-authored-by: ZDev <ZDev@users.noreply.translate.codeberg.org>
Co-authored-by: Fjuro <fjuro@alius.cz>
Co-authored-by: Wuzzy <Wuzzy@users.noreply.translate.codeberg.org>
Co-authored-by: fnetX <otto@codeberg.org>
Co-authored-by: hankskyjames777 <hankskyjames777@users.noreply.translate.codeberg.org>
Co-authored-by: Kita Ikuyo <searinminecraft@courvix.com>
Co-authored-by: Marco Ciampa <ciampix@users.noreply.translate.codeberg.org>
Co-authored-by: kdh8219 <kdh8219@monamo.dev>
Co-authored-by: emansije <emansije@users.noreply.translate.codeberg.org>
Co-authored-by: b1nar10 <b1nar10@users.noreply.translate.codeberg.org>
Co-authored-by: Eryk Michalak <gnu.ewm@protonmail.com>
Co-authored-by: revi <revi@omglol.email>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4251
Co-authored-by: Codeberg Translate <translate@noreply.codeberg.org>
Co-committed-by: Codeberg Translate <translate@noreply.codeberg.org>
(cherry picked from commit 2a643d2136
)
2024-07-04 06:45:11 +00:00
Earl Warren
51363f383d
Merge pull request '[v8.0/forgejo] test(js): false negative in sleep test' ( #4307 ) from bp-v8.0/forgejo-a0d9d8d into v8.0/forgejo
...
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4307
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-03 18:36:22 +00:00
Earl Warren
15118b7141
Merge pull request '[v8.0/forgejo] fix(ci): do not block pull request CI when go-versions lags behind' ( #4306 ) from bp-v8.0/forgejo-ee7f568 into v8.0/forgejo
...
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4306
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-03 18:23:30 +00:00
Earl Warren
9230d787ff
test(js): false negative in sleep test
...
It is entirely possible that the difference between the specified
sleep time and the actual sleep time is greater than 15 seconds.
https://developer.mozilla.org/en-US/docs/Web/API/setTimeout#Notes
> Note that in either case, the actual delay may be longer than
> intended; see Reasons for delays longer than specified below.
It is however an error for the delay to be shorter.
⎯⎯⎯⎯⎯⎯⎯ Failed Tests 1 ⎯⎯⎯⎯⎯⎯⎯
FAIL web_src/js/utils.test.js > sleep
AssertionError: expected false to be truthy
❯ testSleep web_src/js/utils.test.js:192:48
190| const endTime = Date.now(); // Record the end time
191| const actualSleepTime = endTime - startTime;
192| expect(Math.abs(actualSleepTime - ms) <= 15).toBeTruthy();
| ^
193| }
194|
❯ web_src/js/utils.test.js:184:3
(cherry picked from commit a0d9d8d576
)
2024-07-03 17:16:54 +00:00
Earl Warren
9128268f29
fix(ci): do not block pull request CI when go-versions lags behind
...
When a new go version is published, it takes about 24h for
https://github.com/actions/go-versions to be updated (see
https://github.com/actions/go-versions/pull/102 for example).
In the meantime the setup-go action that depends on it will install a
version of go that fails golang.org/x/vuln/cmd/govulncheck.
Move the security check to be the last step of the test job instead of
the first. It will still block the PRs from being merged but it will
allow the PR authors to keep working and look at the test results in
the meantime.
Fixes: https://codeberg.org/forgejo/forgejo/issues/4294
(cherry picked from commit ee7f568aed
)
2024-07-03 17:13:54 +00:00
Earl Warren
8fec0822e4
Merge pull request '[v8.0/forgejo] Update dependency go to v1.22.5' ( #4304 ) from bp-v8.0/forgejo-fa1a853 into v8.0/forgejo
...
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4304
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-03 16:31:23 +00:00
Renovate Bot
0a31d942a5
Update dependency go to v1.22.5
...
(cherry picked from commit fa1a853db0
)
2024-07-03 14:58:30 +00:00
Twenty Panda
0d09acf669
fix(hook): ignore unknown push options instead of failing
...
If a repository has
git config --add push.pushOption submit=".sourcehut/*.yml"
it failed when pushed because of the unknown submit push
option. It will be ignored instead.
Filtering out the push options is done in an earlier stage, when the
hook command runs, before it submits the options map to the private
endpoint.
* move all the push options logic to modules/git/pushoptions
* add 100% test coverage for modules/git/pushoptions
Test coverage for the code paths from which code was moved to the
modules/git/pushoptions package:
* cmd/hook.go:runHookPreReceive
* routers/private/hook_pre_receive.go:validatePushOptions
tests/integration/git_push_test.go:TestOptionsGitPush runs through
both. The test verifying the option is rejected was removed and, if
added again, will fail because the option is now ignored instead of
being rejected.
* cmd/hook.go:runHookProcReceive
* services/agit/agit.go:ProcReceive
tests/integration/git_test.go: doCreateAgitFlowPull runs through
both. It uses variations of AGit related push options.
* cmd/hook.go:runHookPostReceive
* routers/private/hook_post_receive.go:HookPostReceive
tests/integration/git_test.go:doPushCreate called by TestGit/HTTP/sha1/PushCreate
runs through both.
Note that although it provides coverage for this code path it does not use push options.
Fixes: https://codeberg.org/forgejo/forgejo/issues/3651
(cherry picked from commit 5561e80b04
)
2024-07-02 20:18:33 +00:00
Earl Warren
c290a40063
Merge pull request '[v8.0/forgejo] [gitea] week 2024-27 cherry pick (gitea/main -> forgejo)' ( #4283 ) from bp-v8.0/forgejo-a2426e2-45181ee-9d1c72a into v8.0/forgejo
...
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4283
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-07-02 09:38:39 +00:00