Repository navigation
feat: Add generic webhook for image pulling - #193
Merged
Merged
Conversation
Supports GitHub, Harbor, empty POST request with Auth header
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an application-scoped “image pull” webhook feature so external registries (e.g., Harbor/GitHub packages) can trigger an on-demand image pull via an authenticated incoming webhook, with UI support to generate/revoke secrets and copy values.
Changes:
- Backend: adds
/api/v1/webhooks/images/:idhandler plus protected endpoints to generate/revoke an application webhook secret, with DB migration and tests. - Frontend: adds an “Image Pull Webhook” section on the application details page to generate/revoke and copy webhook URL/secret.
- Backend: adjusts repository webhook endpoint path to
/api/v1/webhooks/repositories/:idand updates related tests.
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| frontend/src/routes/_authenticated/applications/$id.index.tsx | Adds UI to generate/revoke image pull webhook and display/copy webhook URL/secret. |
| frontend/src/lib/applications.ts | Extends Application shape and adds API helpers for webhook generation/revocation. |
| frontend/messages/en.json | Adds UI strings for the new webhook section and dialogs. |
| frontend/messages/de.json | Adds German translations for the new webhook section and dialogs. |
| backend/internal/hub/routes/webhooks.go | Removes GitHub container package handling from repo webhook path (moved to app-scoped webhook). |
| backend/internal/hub/routes/webhooks_test.go | Updates webhook request path construction and removes container package tests. |
| backend/internal/hub/routes/repositories.go | Updates repository webhook URL to new /webhooks/repositories/:id path. |
| backend/internal/hub/routes/image_pull_webhook.go | New public webhook handler to authenticate and trigger image pulls (GitHub package + generic/Harbor-style). |
| backend/internal/hub/routes/image_pull_webhook_test.go | New test coverage for image pull webhook behaviors and secret lifecycle endpoints. |
| backend/internal/hub/routes/applications.go | Includes webhook-enabled flag and webhook URL in application responses. |
| backend/internal/hub/routes/application_webhook.go | Adds protected endpoints to generate/revoke per-application webhook secrets. |
| backend/internal/hub/models/applications.go | Adds ImageWebhookSecret field to application model. |
| backend/internal/hub/middleware/csrf_test.go | Updates CSRF test to new repository webhook path. |
| backend/internal/hub/handlers.go | Registers new webhook and secret-management routes. |
| backend/internal/hub/db/migrations/000019_add_application_image_pull_webhook_secret.up.sql | Adds image_webhook_secret column to applications. |
| backend/internal/hub/db/migrations/000019_add_application_image_pull_webhook_secret.down.sql | Drops image_webhook_secret column from applications. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
timokoessler
enabled auto-merge (squash)
June 13, 2026 14:22
alex289
reviewed
Jun 13, 2026
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
alex289
reviewed
Jun 13, 2026
alex289
approved these changes
Jun 13, 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.
Type of change
Description
Add generic incoming webhook for image pulling.
Additional context
Supports GitHub, Harbor, empty POST request with auth header.