Skip to main content

git Integration

Omni’s git integration allows you to sync an Omni model to a git repository (GitHub, GitLab, and Azure DevOps Server are currently supported). This is done on the model level.

Using a git integration provides added development benefits of storing backups of model files and using pull requests to create collaborative and peer reviewed changes. Additionally, it's possible to require pull requests, for those that want a more structured development lifecycle.

Enabling the git integration requires the use of Branch Mode for modifications to the Shared model, ensuring a structured and organized development process.

Tips:

  • By default, pull requests are optional, enable the Require Pull Requests setting.
  • Editing model files directly within external platforms is not yet supported.

Set up Git Integration

This requires some back and forth to gather the right information, the first two setps are the same for all three

  1. In Your Git Repository: Create a repository where you want to connect your Omni model.

  2. In Omni:

  • Navigate to the IDE for the model you want to connect to a git repo. This examples takes us to our sample e-commerce model.
  • Under Model, you'll find the option for Git Settings
  • Copy the SSH URL from your git repository.
  • Paste the URL into the settings page in the Omni app.
  • Click on ‘Configure Git’ to generate a new Git Settings page with the additional parameters needed. This is also where you can 'Test git connection' and enable 'Require Pull Requests'.
  1. In Both Set Up Deploy Keys:
  • Navigate to the deploy keys page for your git repository (located under the Settings header).
  • Copy the public key from Omni’s git settings page.
  • Add this key as a new deploy key in your git repository, ensuring it has write access.
  • Click the Add key button.
  • Back in the Omni app, click Ensure Git Synced to confirm.
  1. In Both Configure Webhooks for Pull Requests:
  • Go to the webhooks page for your git repository (under the Settings header).
  • Add a new webhook.
  • Copy the Webhook URL from Omni’s settings page and paste it into the Payload URL field in git.
  • Copy the Webhook secret from Omni’s settings page and paste it into the *Secret field in your git repository.
  • Set the content type to application/json.
  • Choose Let me select individual events.
  • Select only the Pull Requests option.
  • Click Add webhook.
  • To confirm your webhook is setup correctly, navigate to the Deliveries tab in your git repository and confirm there is 200 response for the ping event.
  1. Disconnect your git Integration: If you want to disconnect your integration, navigate to the same git settings page from step 1 above and select unlink git.
tip

The above instructions are based on GitHub, they will be very similar for GitLab with the execption that they call Pull Requests Merge Requests so need to choose Merge Request webhook. However Azure DevOps is significantly different. Step by step instructions are coming soon, but if you run into problems please don't hesitate to contact support@omni.co