Skip to main content
This feature is currently in beta. Reach out to Omni support to have it enabled for your organization.
This page describes how Omni moves a document that requires a pull request to publish into your git repository, and how the repository stays current after the pull request is merged.

Before you begin

Omni only commits a document to git when the document requires a pull request to publish. To set this up:
  1. Enable Require pull requests to publish under Settings > Content Permissions. You need Organization Admin permissions.
  2. Open the document and enable Require pull requests to publish under File > Document settings. You need the Manager role on the document.
The document’s model must be connected to git. For the full list of requirements, refer to Content in git.

Publishing documents through pull requests

  1. Open the document and click Edit. Omni will ask you to make the change on a branch. Pick an existing branch or create a new one.
  2. Make your changes. The branch header shows that the document needs a pull request before the draft can be published.
  3. When you’re ready, click Create pull request in the branch header, then commit the branch or open the pull request. Either action writes the document files to the branch.
  4. Omni fetches the content changes and writes the diffs into omni/content/ on the branch. Model changes on the same branch are committed alongside them.
  5. In your git provider, the pull request diff shows the changed model and document files together. See Repository structure for content in git for more information about the files’ contents and overall structure.
  6. When the pull request is merged, Omni publishes the draft and the base branch reflects the published version that document.
Documents that don’t require a pull request are published on merge as before, but their files are not committed.

Discarding and moving drafts

  • If you discard a draft on an active branch, Omni will discard the diffs in git to reflect the published state of the document.
  • A document that doesn’t have a draft on the branch keeps the folder it has on the base branch.

How Omni keeps the base branch current

Omni runs background syncs to the base branch to check that what’s stored in git matches with Omni’s current state. For documents, it checks that every document that requires a pull request has up-to-date files in omni/content/. It then:
  • Adds files for documents that are missing from the repository
  • Refreshes files for documents whose published version has changed
  • Moves files for documents that moved to a different Omni folder
  • Removes files for documents that no longer require a pull request
If Require for system syncs is enabled for the model, Omni doesn’t directly commit document file changes to the base branch. A pull request is required to merge the changes.

Next steps