Sync
The sync endpoints let you pull the linked GitHub repo into Hubify on demand, check the last sync state, and provision the per-lab webhook secret. For automated push-driven sync, configure the GitHub webhook. Base URL:https://www.hubify.com/api/v1
Manual sync
Pull the current default-branch HEAD into Hubify. Useful for first-time sync after linking a repo, or for reconciling drift if a webhook event was missed.lab:<slug>:rw.
Response:
Sync status
lab:<slug>:r.
Provision webhook secret
Mint or fetch the per-lab GitHub webhook secret. The secret is returned on first call so you can paste it into GitHub’s webhook settings; subsequent calls return the same value (idempotent, we don’t rotate by accident).lab:<slug>:admin.
GitHub webhook
gitWebhookSecret (provisioned above), then runs syncFromGithub for the pushed commit.
pingevent: ack with 200 (no sync)pushevent on default branch: full syncpushevent on non-default branch: ignored- Other events (star, fork, issues, etc.): ignored
Errors
| Status | Meaning |
|---|---|
| 400 | Missing labId / invalid JSON / missing repository.full_name (webhook) |
| 401 | Invalid API key (REST) or signature mismatch (webhook) |
| 403 | Key lacks the required scope |
| 404 | Lab not found |
| 412 | Lab has no GitHub repo linked, or webhook secret not provisioned yet |
| 429 | Rate limit |
| 500 | Sync failed, see response body or activity feed |