Beta

Blog

GitOps: keep MockHive collections in sync with GitHub

Connect a fine-scoped PAT, point at an OpenAPI or Postman JSON path, and upsert mocks on push — Pro+.

ProductMockHive Team

Specs live in Git. Mocks used to drift the moment someone edited a field in the portal. GitOps sync closes that gap for Pro and Team plans.

Connect owner/repo/branch and a spec path under Settings → Developer → GitOps. On Sync now or a signed GitHub push webhook, MockHive upserts collections by public route.

What gets updated

Missing routes are created. Existing routes update fields, response templates, and scenarios from examples in the file. Routes absent from the file are not deleted in the MVP — safer for shared tenants.

Copy the webhook URL and one-time secret immediately after connect. Use Push events and application/json. Other branches and unrelated paths are ignored.

Local development tip

GitHub cannot reach localhost. Tunnel your API (ngrok or Cloudflare Tunnel) or run GitOps against a deployed environment. Sync now still works with a PAT without a public webhook.

← All posts · Docs · Features · Start free