repligit.mirror.from-github ​
Mirror a GitHub repository into a Repligit appliance repository
Mirror a GitHub repository into a Repligit appliance repository (one pass).
GitHub-primary: apply GitHub's tip when the appliance is behind or the ref is new. Appliance-ahead and diverged refs are flagged, never force-reset, and never pushed back to GitHub.
Inputs:
- repository_uuid: Repligit repository UUID on the appliance (required)
- source_repository: GitHub "owner/repo" (required)
- appliance_base_url: appliance Git HTTP base, e.g. https://git.example (required)
- admin_base_url: admin HTTPS base used to write the replica snapshot (optional)
- audience: JWT audience the appliance enforces (default repligit)
- source_token: GitHub credential for private sources (optional)
- source_username: username paired with source_token (default x-access-token)
- replica_uuid: persisted pair UUID echoed onto the snapshot (optional)
Outputs (terminal state_data):
- refs_updated: number of refs the push changed (0 = already in sync)
- needs_sync_to_github: flagged refs (ahead / diverged / tag_immutable)
- heads_verified / heads_total: heads that match GitHub after this pass
- source_repository / repository_uuid / appliance_base_url: echoes
- grant_uuid: audit id of the internally minted sync credential
- completed_at: ISO-8601 timestamp
Overview ​
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | App-repligit |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
repository_uuid | uuid | Yes | — | Repligit repository UUID on the appliance |
source_repository | string | Yes | — | GitHub source as owner/repo |
appliance_base_url | string | Yes | — | Appliance Git HTTP base URL, e.g. https://git.example |
admin_base_url | string | No | — | Admin HTTPS base for writing the replica snapshot |
audience | string | No | — | JWT audience the appliance enforces |
source_token | string | No | — | GitHub credential for private sources (optional) |
source_username | string | No | — | Username paired with source_token (default x-access-token) |
replica_uuid | uuid | No | — | Persisted replica-pair UUID |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
refs_updated | integer | No | — | Refs changed by the push (0 = already in sync) |
needs_sync_to_github | json | No | — | Refs the appliance holds that were not applied from GitHub |
heads_verified | integer | No | — | Branch tips matching the source after push |
heads_total | integer | No | — | Branch tips on the source |
source_repository | string | No | — | Echo of the GitHub source |
repository_uuid | uuid | No | — | Echo of the appliance repository |
appliance_base_url | string | No | — | Echo of the appliance base URL |
grant_uuid | uuid | No | — | Audit id of the internally minted sync credential |
completed_at | string | No | — | ISO-8601 completion timestamp |
last_error | string | No | — | — |
admin_base_url | string | No | — | — |
audience | string | No | — | — |
replica_uuid | uuid | No | — | — |
source_token | string | No | — | — |
source_username | string | No | — | — |
failure_reason | string | No | — | — |
failure_type | string | No | — | — |
failed_action | string | No | — | — |
failed_at_state | string | No | — | — |
failed_step | string | No | — | — |
failed_layer | string | No | — | — |
error | string | No | — | — |
error_type | string | No | — | — |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
pending | Yes | No | — | execute | — |
completed | No | Yes | Yes | — | — |
failed | No | Yes | No | — | — |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
pending | execute | completed | — |
* (any state) | fail | failed | — |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "repligit.mirror.from-github",
"initial_data": {
"repository_uuid": "value",
"source_repository": "value",
"appliance_base_url": "value"
}
}