Remove the webhook feature (endpoints, git/recipes code, frontend UI, and tests)#359
Conversation
Remove the webhook-contract integration test (the only integration test covering webhook lifecycle) and the related performance analysis document that used it as its primary benchmark case study.
Greptile SummaryThis PR removes the webhook feature end-to-end — the GitHub/GitLab push-webhook HTTP endpoints, the use cases that processed them, the git repository webhook helpers, and the frontend "Webhook" tab. The async job pipeline (
Confidence Score: 5/5Safe to merge — the removal is thorough and consistent across all layers, and the retained async job pipeline compiles correctly with the relocated types. Every layer touched by the webhook feature (HTTP endpoints, use cases, repository methods, type contracts, frontend UI, and tests) is removed consistently. The only structural change other than deletion is the relocation of two file-shape types into IFetchFileContentUseCase.ts, which maintains the async pipeline's compile-time contract without altering its runtime behavior. Spec mocks for IGitRepo are correctly updated in all three affected test files. No dead imports, dangling references, or partial removals were found. No files require special attention. The type relocation in packages/types/src/git/contracts/IFetchFileContentUseCase.ts is the most structurally sensitive change, but it is straightforward and confirmed correct by the passing typecheck. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
subgraph REMOVED["❌ Removed"]
GH_EP["POST /:orgId/hooks/github"]
GL_EP["POST /:orgId/hooks/gitlab"]
LIST_EP["GET /:orgId/hooks"]
HC["HooksController / HooksModule"]
RS_GH["recipes.service.updateRecipesFromGitHub"]
RS_GL["recipes.service.updateRecipesFromGitLab"]
UC_GH["UpdateRecipesFromGitHubUseCase"]
UC_GL["UpdateRecipesFromGitLabUseCase"]
BASE_UC["BaseUpdateRecipesFromWebhookUseCase"]
HWH["HandleWebHookUseCase"]
HWHWC["HandleWebHookWithoutContentUseCase"]
PHP_GH["GithubRepository.handlePushHook"]
PHP_GL["GitlabRepository.handlePushHook"]
WH_UI["WebHookConfig (frontend)"]
end
subgraph KEPT["✅ Kept (async job pipeline)"]
FFC["FetchFileContent job\n(uses FetchFileContentFile[])"]
URGS["UpdateRecipesAndGenerateSummaries job\n(uses FetchedFileContent[])"]
DR["DeployRecipes job"]
end
subgraph TYPES["🔄 Type relocation"]
OLD["HandleWebHookWithoutContentResult\nHandleWebHookResult\n(deleted with webhook contracts)"]
NEW["FetchFileContentFile\nFetchedFileContent\n(now in IFetchFileContentUseCase.ts)"]
OLD -->|"relocated as"| NEW
end
NEW --> FFC
FFC --> URGS
URGS --> DR
Reviews (5): Last reviewed commit: "style(git): fix prettier formatting in r..." | Re-trigger Greptile |
Remove the Webhook tab from the Manage Git Provider dialog along with the WebHookConfig component and the git gateway/query/key plumbing that fetched webhook URLs from the now-removed GET /:orgId/hooks endpoint.
Delete the hooks controller/module exposing GET /:orgId/hooks and
POST /:orgId/hooks/{github,gitlab}, unregister HooksModule from AppModule,
and drop the recipes.service passthrough methods that fed them.
Delete BaseUpdateRecipesFromWebhookUseCase and the GitHub/GitLab webhook use cases, drop their wiring from RecipesAdapter, and remove the updateRecipesFromGitHub/GitLab methods and contracts from IRecipesPort. The delayed-job pipeline (build/factories) is kept as shared infrastructure.
Delete the handleWebHook/handleWebHookWithoutContent use cases, the handlePushHook implementations and their webhook-only helpers in the GitHub and GitLab repositories, the webhook payload types, and the webhook methods from IGitPort/IGitRepo. The shared file-shape types previously declared in the webhook contracts are relocated into IFetchFileContentUseCase so the kept FetchFileContent job pipeline still compiles. Webhook test suites are removed.
Update the addFetchFileContentJob doc comments and the IBaseAdapter example so they no longer reference the deleted handleWebHook/updateRecipesFromGitHub symbols.
|
@greptile |
|
@greptile update your review |
Remove trailing blank lines flagged by prettier -c in CI. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|



Explanation
This PR removes the webhook feature end to end — the GitHub/GitLab push-webhook endpoints and all the code that automatically updated recipes from Git push events. It started as a removal of the webhook integration tests and was extended to delete the entire feature across the stack.
The webhook entry points (
POST /:orgId/hooks/github,/gitlab,GET /:orgId/hooks) droveRecipesAdapter.updateRecipesFromGitHub/GitLab→BaseUpdateRecipesFromWebhookUseCase→gitPort.handleWebHookWithoutContent, plus a frontend "Webhook" tab that displayed the hook URLs. All of this is now gone.What was removed
Tests
webhook-contract.integration.spec.tsand the related performance analysis doc (integrations-tests-analysis.md).handlePushHookunit-test suites inGithubRepository.spec.ts/GitlabRepository.spec.ts.Frontend (
apps/frontend)WebHookConfigcomponent.listWebHooks,useGetGitWebhooksQuery,GET_GIT_WEBHOOKS_KEY) — the wholegitGatewaywas webhook-only.API (
apps/api)hookscontroller/module and itsHooksModuleregistration inAppModule.recipes.servicepassthrough methodsupdateRecipesFromGitHub/GitLab.Recipes (
@packmind/recipes,@packmind/types)BaseUpdateRecipesFromWebhookUseCaseand the GitHub/GitLab webhook use cases, theirRecipesAdapterwiring, and theupdateRecipesFromGitHub/GitLabmethods + contracts fromIRecipesPort.Git (
@packmind/git,@packmind/types)handleWebHook/handleWebHookWithoutContentuse cases, thehandlePushHookimplementations and webhook-only helpers (isValidBranch,extractMatchingFilesFromCommits,isPushEventFromWebhook), the webhook payload types, and the webhook methods fromIGitPort/IGitRepo.What was intentionally kept
FetchFileContent→UpdateRecipesAndGenerateSummaries→DeployRecipesdelayed jobs). It is now unused but retained as shared infrastructure. Because the keptFetchFileContentcontract reused the webhook result-type shapes, those shapes were relocated intoIFetchFileContentUseCase(FetchFileContentFile,FetchedFileContent) so the pipeline still compiles.hook_attributes.url(/api/v0/hooks/github-app) — that is manifest metadata for GitHub App registration, not one of the removed webhook endpoints.Type of Change
Affected Components
@packmind/recipes,@packmind/git,@packmind/typesapi,frontendPOST /:orgId/hooks/{github,gitlab}andGET /:orgId/hooksendpoints are removed; recipes are no longer auto-updated from Git push events.Commits
Ordered so the build stays green at each step:
test: remove webhook integration testsrefactor(frontend): remove webhook configuration UIrefactor(api): remove webhook endpointsrefactor(recipes): remove webhook-triggered recipe update use casesrefactor(git): remove webhook handling code (source + git tests together)docs: drop references to removed webhook methodsTesting
frontend,api,git,recipes,typesfrontend,git,recipes,typesgit(520),recipes(226)Reviewer Notes
The removal cascades by necessity: the webhook endpoints, the recipe webhook use cases, and the git webhook handlers were only consumed by each other, so they were removed together. The async job pipeline was left in place per request, with the shared file-shape types relocated to a non-webhook contract.
https://claude.ai/code/session_01DuK1cKc27SXmtAPPpvcxSS