Skip to content

feat: Add generic webhook for image pulling - #193

Merged
timokoessler merged 5 commits into
mainfrom
feature/image-webhooks
Jun 13, 2026
Merged

timokoessler merged 5 commits into
mainfrom
feature/image-webhooks

Conversation

@timokoessler

@timokoessler timokoessler commented Jun 13, 2026 •

Copy link
Copy Markdown
Member

Type of change

  • 🐛 Bug fix
  • 🚀 New feature
  • ❓ Other (please specify)

Description

Add generic incoming webhook for image pulling.

Additional context

Supports GitHub, Harbor, empty POST request with auth header.

image image

Supports GitHub, Harbor, empty POST request with Auth header
@timokoessler timokoessler self-assigned this Jun 13, 2026
Copilot AI review requested due to automatic review settings June 13, 2026 14:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/:id handler 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/:id and 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.

Comment thread backend/internal/hub/routes/webhooks_test.go
Comment thread backend/internal/hub/routes/applications.go Outdated
Comment thread backend/internal/hub/routes/image_pull_webhook.go Outdated
@timokoessler
timokoessler enabled auto-merge (squash) June 13, 2026 14:22
Comment thread backend/internal/hub/routes/application_webhook.go Outdated
Comment thread frontend/src/routes/_authenticated/applications/$id.index.tsx Outdated
Comment thread frontend/src/routes/_authenticated/applications/$id.index.tsx Outdated
@codecov

codecov Bot commented Jun 13, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.84906% with 15 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
backend/internal/hub/routes/application_webhook.go 78.04% 6 Missing and 3 partials ⚠️
backend/internal/hub/routes/image_pull_webhook.go 88.88% 4 Missing and 2 partials ⚠️

📢 Thoughts on this report? Let us know!

Comment thread frontend/src/routes/_authenticated/applications/$id.index.tsx Outdated
@timokoessler
timokoessler merged commit d689679 into main Jun 13, 2026
11 checks passed
@timokoessler
timokoessler deleted the feature/image-webhooks branch June 13, 2026 16:44
@orcacd-bot orcacd-bot Bot mentioned this pull request Jun 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants