Skip to main content

GitVerse integration

Connect GitVerse repositories to CodeGraph, import them, run synchronization, and manage pull-request review actions.

Integrations

GitVerse integration provides repository onboarding, operator-triggered synchronization, webhook reconciliation, workflow dispatch, and pull-request review actions. Use this page for provider-specific operations; use Project import for the shared repository lifecycle.

Integration capabilities

Integration capabilities
Capability Current support
Repository metadata through provider API Yes
Branch HEAD lookup Yes
Namespace repository listing Yes
Operator-triggered project synchronization Available
Webhook reconciliation action Available
Pull-request review and republish actions Available

The GitVerse operations section lists requests for project synchronization, workflow dispatch, pull-request review and review republication.

Connect and import

Run these commands in PowerShell from the CodeGraph source repository root. Install the project Python environment and configure the server first. Choose an existing access group: the connection and import will belong to that group. Replace OWNER/REPOSITORY with your value. Import creates or finds the repository project and prints its name.

The examples use the default group. To use another group, add --group "<group-name>" to every command. Import uses manual synchronization unless you select another mode. Use the sync-now operation below to start an operator-triggered update.

python -m src.cli repos connect-provider --name gitverse-main --provider gitverse --base-url https://api.gitverse.ru --host gitverse.ru
python -m src.cli repos provider-health --connection gitverse-main
python -m src.cli repos import --connection gitverse-main --repo 'OWNER/REPOSITORY'
python -m src.cli repos status

After creating the connection, the CLI prints Created provider connection: gitverse-main. For a successful import, find Imported repository … into project …, Binding id:, Mirror:, and Heads: repo=… cpg=…. Keep the binding ID to track repository synchronization.

For a private repository, pass the token through the connect-provider command’s --token parameter, using the value supplied by your organization’s protected secret channel. Do not place it in configuration committed to Git. Keep TLS verification enabled; provide --ca-bundle-path only when the deployment uses a private CA.

Manual synchronization and webhook state

To start a GitVerse update after import, call:

POST /api/v1/integrations/repositories/gitverse/projects/{project_name}/sync-now

The response includes status=accepted, correlation_id, and next_poll_url. Open next_poll_url to inspect the operation in the GitVerse overview.

CodeGraph’s receiver at POST /api/v1/webhooks/gitverse expects X-GitVerse-Signature and validates it with GITVERSE_WEBHOOK_SECRET. The GitVerse webhook guide and create-webhook API describe an Authorization header, but do not specify a matching signature format. This page therefore gives the operator-triggered sync-now path for confirmed updates. The reconcile-webhook action can align an existing hook with CodeGraph’s endpoint; its accepted response starts the reconciliation operation, not a delivery test.

Where to check the result

Authenticate requests as described in the REST API reference. Provider actions also need a GitVerse token in X-GitVerse-Token, unless GITVERSE_TOKEN is configured on the server. Get binding_id from GET /api/v1/integrations/repositories/bindings and use it in the binding routes below.

Where to check the result
What to check Request and result
Synchronization activity Follow the next_poll_url returned by sync-now; match the activity by correlation_id.
Synchronization job GET /api/v1/integrations/repositories/bindings/{binding_id}/sync-jobs: inspect the job’s status, commit_sha, result, and error for the expected repository revision.
Current graph revision GET /api/v1/integrations/repositories/bindings/{binding_id}: compare repository_head_sha and cpg_head_sha after the job completes.
Pull-request review Follow the next_poll_url returned by the review action, then check the review and publication status on the target pull request.

In job lists, check has_next. To read the next page, increase offset by the returned limit and repeat the request. Match the job ID rather than relying on the first list entry.

GitVerse operations

Shared bindings and jobs remain under:

/api/v1/integrations/repositories
POST /api/v1/integrations/repositories/review-snapshots/{snapshot_id}/rerun

The generic rerun path publishes only when publish_review is requested. The dedicated GitVerse routes below provide the provider-specific operator workflow and republish action.

GitVerse adds the following current route family:

GET  /api/v1/integrations/repositories/gitverse/overview
POST /api/v1/integrations/repositories/gitverse/projects/{project_name}/validate
POST /api/v1/integrations/repositories/gitverse/projects/{project_name}/reconcile-webhook
POST /api/v1/integrations/repositories/gitverse/projects/{project_name}/sync-now
POST /api/v1/integrations/repositories/gitverse/projects/{project_name}/dispatch-workflow
POST /api/v1/integrations/repositories/gitverse/projects/{project_name}/pull-requests/{pr_number}/review
POST /api/v1/integrations/repositories/gitverse/projects/{project_name}/pull-requests/{pr_number}/republish
DELETE /api/v1/integrations/repositories/gitverse/projects/{project_name}/binding

Review publication is an explicit action with its own recorded status. Follow the action’s next_poll_url, then confirm the result on the target pull request.

Recovery and rollback

Start with provider-health, then validate the project. Use sync-now for an operator-triggered update. Inspect failed sync or review operations before retrying them through the shared repository suite. Remove a GitVerse project binding with DELETE /api/v1/integrations/repositories/gitverse/projects/{project_name}/binding.

Security boundary

  • Scope the provider token and rotate it independently of the webhook secret.
  • Restrict validation, sync, dispatch, retry, review, and republish routes to authorized operators.
  • Keep signature headers out of logs and keep TLS verification enabled.
  • Treat pull-request payloads and provider responses as untrusted data.

Help and troubleshooting

  • Connection and import parameters: CLI guide.
  • Authentication, bindings and review jobs: REST API.
  • Project preparation and import verification: project import.