Eliminate duplication in Forgejo adapter and tests#77
Merged
Conversation
Co-authored-by: Meldiron <19310830+Meldiron@users.noreply.github.com> Agent-Logs-Url: https://github.com/utopia-php/vcs/sessions/b7718762-2b6f-4dc1-8f0d-3561ae2b01e4
…same dir structure as Gitea) Co-authored-by: Meldiron <19310830+Meldiron@users.noreply.github.com> Agent-Logs-Url: https://github.com/utopia-php/vcs/sessions/b7718762-2b6f-4dc1-8f0d-3561ae2b01e4
Copilot created this pull request from a session on behalf of
Meldiron
March 23, 2026 15:58
View session
Contributor
|
@greptile |
Greptile SummaryThis PR cleanly eliminates duplication between the
Confidence Score: 4/5
Important Files Changed
Reviews (2): Last reviewed commit: "Fix test namespaces" | Re-trigger Greptile |
…perties Co-authored-by: Meldiron <19310830+Meldiron@users.noreply.github.com> Agent-Logs-Url: https://github.com/utopia-php/vcs/sessions/9018a712-0c46-43ff-9933-d768660aaebe
…d createWebhook() Co-authored-by: Meldiron <19310830+Meldiron@users.noreply.github.com> Agent-Logs-Url: https://github.com/utopia-php/vcs/sessions/9018a712-0c46-43ff-9933-d768660aaebe
Copilot
AI
changed the title
Supporting Forgejo adapter based on Gitea
Eliminate duplication in Forgejo adapter and tests
Mar 23, 2026
Meldiron
approved these changes
Mar 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Forgejo::createWebhook()was an exact copy ofGitea::createWebhook()with only the hook type string changed. Similarly,ForgejoTestduplicated two full webhook test methods only to swapX-Gitea-*headers forX-Forgejo-*.Source changes
getHookType(): stringintoGitea(returns'gitea');createWebhook()now calls$this->getHookType()Forgejooverrides onlygetHookType()returning'forgejo'— the fullcreateWebhook()override is removedTest changes
protected string $webhookEventHeaderand$webhookSignatureHeadertoGiteaTest(defaults:X-Gitea-Event,X-Gitea-Signature); webhook tests use these properties instead of hardcoded stringsForgejoTestoverrides only those two properties; the duplicatedtestWebhookPushEvent()andtestWebhookPullRequestEvent()methods are removedAutoload fix
"Utopia\\Tests\\VCS\\": "tests/VCS"toautoload-devincomposer.json. The existing"Utopia\\Tests\\"mapping resolvedUtopia\Tests\VCS\Adapter\GiteaTesttotests/VCS/VCS/Adapter/GiteaTest.php(incorrect double-VCS), causing a fatalClass "GiteaTest" not foundwhen PHPUnit loadedForgejoTest.phpfirst (alphabetical order).Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
codeberg.org/usr/libexec/docker/cli-plugins/docker-compose /usr/libexec/docker/cli-plugins/docker-compose compose run --rm tests sh -c cd /usr/local/src && php vendor/bin/phpstan analyse --level 8 --memory-limit 512M -c phpstan.neon src tests 2>&1(dns block)https://api.github.com/repos/Nevay/spi/zipball/e7078767866d0a9e0f91d3f9d42a832df5e39002/usr/local/bin/php php /usr/bin/composer install --ignore-platform-reqs --optimize-autoloader --no-plugins --no-scripts --prefer-dist b99b5529006b5cbechmod(http block)https://api.github.com/repos/Nyholm/psr7-server/zipball/4335801d851f554ca43fa6e7d2602141538854dc/usr/local/bin/php php /usr/bin/composer install --ignore-platform-reqs --optimize-autoloader --no-plugins --no-scripts --prefer-dist b99b5529006b5cbechmod(http block)https://api.github.com/repos/adhocore/php-jwt/zipball/ad417603d9d45578b6af2089ad5b78f101c82367/usr/local/bin/php php /usr/bin/composer install --ignore-platform-reqs --optimize-autoloader --no-plugins --no-scripts --prefer-dist b99b5529006b5cbechmod(http block)https://api.github.com/repos/composer/semver/zipball/198166618906cb2de69b95d7d47e5fa8aa1b2b95/usr/local/bin/php php /usr/bin/composer install --ignore-platform-reqs --optimize-autoloader --no-plugins --no-scripts --prefer-dist b99b5529006b5cbechmod(http block)https://api.github.com/repos/laravel/pint/zipball/bdec963f53172c5e36330f3a400604c69bf02d39/usr/local/bin/php php /usr/bin/composer install --ignore-platform-reqs --optimize-autoloader --no-plugins --no-scripts --prefer-dist b99b5529006b5cbechmod(http block)https://api.github.com/repos/opentelemetry-php/api/zipball/df5197c6fd0ddd8e9883b87de042d9341300e2ad/usr/local/bin/php php /usr/bin/composer install --ignore-platform-reqs --optimize-autoloader --no-plugins --no-scripts --prefer-dist b99b5529006b5cbechmod(http block)https://api.github.com/repos/opentelemetry-php/context/zipball/d4c4470b541ce72000d18c339cfee633e4c8e0cf/usr/local/bin/php php /usr/bin/composer install --ignore-platform-reqs --optimize-autoloader --no-plugins --no-scripts --prefer-dist b99b5529006b5cbechmod(http block)https://api.github.com/repos/opentelemetry-php/gen-otlp-protobuf/zipball/673af5b06545b513466081884b47ef15a536edde/usr/local/bin/php php /usr/bin/composer install --ignore-platform-reqs --optimize-autoloader --no-plugins --no-scripts --prefer-dist b99b5529006b5cbechmod(http block)https://api.github.com/repos/opentelemetry-php/sem-conv/zipball/e613bc640a407def4991b8a936a9b27edd9a3240/usr/local/bin/php php /usr/bin/composer install --ignore-platform-reqs --optimize-autoloader --no-plugins --no-scripts --prefer-dist b99b5529006b5cbechmod(http block)https://api.github.com/repos/php-fig/http-factory/zipball/2b4765fddfe3b508ac62f829e852b1501d3f6e8a/usr/local/bin/php php /usr/bin/composer install --ignore-platform-reqs --optimize-autoloader --no-plugins --no-scripts --prefer-dist b99b5529006b5cbechmod(http block)https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71/usr/local/bin/php php /usr/bin/composer install --ignore-platform-reqs --optimize-autoloader --no-plugins --no-scripts --prefer-dist b99b5529006b5cbechmod(http block)https://api.github.com/repos/php-fig/log/zipball/f16e1d5863e37f8d8c2a01719f5b34baa2b714d3/usr/local/bin/php php /usr/bin/composer install --ignore-platform-reqs --optimize-autoloader --no-plugins --no-scripts --prefer-dist b99b5529006b5cbechmod(http block)https://api.github.com/repos/php-http/discovery/zipball/82fe4c73ef3363caed49ff8dd1539ba06044910d/usr/local/bin/php php /usr/bin/composer install --ignore-platform-reqs --optimize-autoloader --no-plugins --no-scripts --prefer-dist b99b5529006b5cbechmod(http block)https://api.github.com/repos/phpstan/phpstan/zipball/37982d6fc7cbb746dda7773530cda557cdf119e1/usr/local/bin/php php /usr/bin/composer install --ignore-platform-reqs --optimize-autoloader --no-plugins --no-scripts --prefer-dist b99b5529006b5cbechmod(http block)https://api.github.com/repos/protocolbuffers/protobuf-php/zipball/ebe8010a61b2ae0cff0d246fe1c4d44e9f7dfa6d/usr/local/bin/php php /usr/bin/composer install --ignore-platform-reqs --optimize-autoloader --no-plugins --no-scripts --prefer-dist b99b5529006b5cbechmod(http block)https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5/usr/local/bin/php php /usr/bin/composer install --ignore-platform-reqs --optimize-autoloader --no-plugins --no-scripts --prefer-dist b99b5529006b5cbechmod(http block)https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120/usr/local/bin/php php /usr/bin/composer install --ignore-platform-reqs --optimize-autoloader --no-plugins --no-scripts --prefer-dist b99b5529006b5cbechmod(http block)https://api.github.com/repos/sebastianbergmann/comparator/zipball/e4df00b9b3571187db2831ae9aada2c6efbd715d/usr/local/bin/php php /usr/bin/composer install --ignore-platform-reqs --optimize-autoloader --no-plugins --no-scripts --prefer-dist b99b5529006b5cbechmod(http block)https://api.github.com/repos/sebastianbergmann/complexity/zipball/25f207c40d62b8b7aa32f5ab026c53561964053a/usr/local/bin/php php /usr/bin/composer install --ignore-platform-reqs --optimize-autoloader --no-plugins --no-scripts --prefer-dist b99b5529006b5cbechmod(http block)https://api.github.com/repos/sebastianbergmann/diff/zipball/ba01945089c3a293b01ba9badc29ad55b106b0bc/usr/local/bin/php php /usr/bin/composer install --ignore-platform-reqs --optimize-autoloader --no-plugins --no-scripts --prefer-dist b99b5529006b5cbechmod(http block)https://api.github.com/repos/sebastianbergmann/environment/zipball/830c43a844f1f8d5b7a1f6d6076b784454d8b7ed/usr/local/bin/php php /usr/bin/composer install --ignore-platform-reqs --optimize-autoloader --no-plugins --no-scripts --prefer-dist b99b5529006b5cbechmod(http block)https://api.github.com/repos/sebastianbergmann/exporter/zipball/14c6ba52f95a36c3d27c835d65efc7123c446e8c/usr/local/bin/php php /usr/bin/composer install --ignore-platform-reqs --optimize-autoloader --no-plugins --no-scripts --prefer-dist b99b5529006b5cbechmod(http block)https://api.github.com/repos/sebastianbergmann/global-state/zipball/b6781316bdcd28260904e7cc18ec983d0d2ef4f6/usr/local/bin/php php /usr/bin/composer install --ignore-platform-reqs --optimize-autoloader --no-plugins --no-scripts --prefer-dist b99b5529006b5cbechmod(http block)https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/e1e4a170560925c26d424b6a03aed157e7dcc5c5/usr/local/bin/php php /usr/bin/composer install --ignore-platform-reqs --optimize-autoloader --no-plugins --no-scripts --prefer-dist b99b5529006b5cbechmod(http block)https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71/usr/local/bin/php php /usr/bin/composer install --ignore-platform-reqs --optimize-autoloader --no-plugins --no-scripts --prefer-dist b99b5529006b5cbechmod(http block)https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7/usr/local/bin/php php /usr/bin/composer install --ignore-platform-reqs --optimize-autoloader --no-plugins --no-scripts --prefer-dist b99b5529006b5cbechmod(http block)https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf/usr/local/bin/php php /usr/bin/composer install --ignore-platform-reqs --optimize-autoloader --no-plugins --no-scripts --prefer-dist b99b5529006b5cbechmod(http block)https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67/usr/local/bin/php php /usr/bin/composer install --ignore-platform-reqs --optimize-autoloader --no-plugins --no-scripts --prefer-dist b99b5529006b5cbechmod(http block)https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28/usr/local/bin/php php /usr/bin/composer install --ignore-platform-reqs --optimize-autoloader --no-plugins --no-scripts --prefer-dist b99b5529006b5cbechmod(http block)https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/539c6691e0623af6dc6f9c20384c120f963465a0/usr/local/bin/php php /usr/bin/composer install --ignore-platform-reqs --optimize-autoloader --no-plugins --no-scripts --prefer-dist b99b5529006b5cbechmod(http block)https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/05d5692a7993ecccd56a03e40cd7e5b09b1d404e/usr/local/bin/php php /usr/bin/composer install --ignore-platform-reqs --optimize-autoloader --no-plugins --no-scripts --prefer-dist b99b5529006b5cbechmod(http block)https://api.github.com/repos/sebastianbergmann/type/zipball/75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7/usr/local/bin/php php /usr/bin/composer install --ignore-platform-reqs --optimize-autoloader --no-plugins --no-scripts --prefer-dist b99b5529006b5cbechmod(http block)https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c/usr/local/bin/php php /usr/bin/composer install --ignore-platform-reqs --optimize-autoloader --no-plugins --no-scripts --prefer-dist b99b5529006b5cbechmod(http block)https://api.github.com/repos/symfony/polyfill-mbstring/zipball/6d857f4d76bd4b343eac26d6b539585d2bc56493/usr/local/bin/php php /usr/bin/composer install --ignore-platform-reqs --optimize-autoloader --no-plugins --no-scripts --prefer-dist b99b5529006b5cbechmod(http block)https://api.github.com/repos/symfony/polyfill-php82/zipball/5d2ed36f7734637dacc025f179698031951b1692/usr/local/bin/php php /usr/bin/composer install --ignore-platform-reqs --optimize-autoloader --no-plugins --no-scripts --prefer-dist b99b5529006b5cbechmod(http block)If you need me to access, download, or install something from one of these locations, you can either:
⚡ Quickly spin up Copilot coding agent tasks from anywhere on your macOS or Windows machine with Raycast.