Auto-Push for Git Integration
Introduction
Auto-push automatically pushes data contract changes to Git whenever a data contract is saved — either through the UI or the API. This removes the need to manually push each change and keeps your Git repository continuously in sync with Entropy Data.
Auto-push builds on the existing Git Integration and supports all configured Git connection types (GitHub, GitLab, Azure DevOps, Bitbucket Cloud).
Auto-push is currently only available for self-hosting customers.
Auto-push is disabled by default and must be activated by setting the environment variable APPLICATION_AUTOPUSH_ENABLED to true. Once activated, the auto-push options become available in the organization Git settings and on individual Git connections.
Auto-Push Modes
| Mode | Description |
|---|---|
| Disabled | Auto-push is turned off. Changes must be pushed manually. |
| Auto push to MR/PR | Automatically creates or updates a pull request (GitHub, Azure DevOps, Bitbucket) or merge request (GitLab) when a data contract is saved. |
Configuring Auto-Push
Organization-Level Setting
The organization-level setting defines the default auto-push behavior for all Git connections in your organization.
- Navigate to Organization Settings → Git Connections
- In the Git Settings card, select the desired Auto Push mode
- Click Save
This setting applies to all Git connections that use the default auto-push mode.
Per-Connection Override
Each Git connection can override the organization-level auto-push setting. This allows you to enable auto-push for specific data contracts while keeping it disabled for others.
- Open a Git-connected data contract
- In the Git connection card in the sidebar, click Edit
- Select the desired Auto Push mode:
- Default (use organization setting) — Inherits the organization-level setting
- Disabled — Explicitly disables auto-push for this connection
- Auto push to MR/PR — Explicitly enables auto-push for this connection
- Click Save
When auto-push is active, the Git connection card displays a badge indicating the current mode.
How It Works
When a data contract is saved and auto-push is enabled:
- The system resolves the effective auto-push mode by checking the per-connection setting first, then falling back to the organization-level setting.
- Git credentials are resolved using the standard credential resolution hierarchy.
- The data contract YAML is pushed to Git.
- Commit messages, branch names, and PR/MR titles use the templates configured in your Git Settings.
Auto Push to MR/PR
In this mode, each save creates or updates a pull request (or merge request on GitLab):
- If an open PR/MR already exists for the connection, the existing PR/MR branch is updated with the new content.
- If no open PR/MR exists, a new branch and PR/MR are created.
Conflict Detection
Auto-push includes built-in conflict detection to prevent overwriting changes made directly in Git. Before pushing, the system compares the last known state with the current remote state:
- Remote is ahead: If the remote file has been modified since the last sync, the auto-push is skipped to avoid overwriting those changes. You can resolve the conflict manually and then push.
- Already up to date: If the content in Git already matches the data contract, the push is skipped to avoid unnecessary commits.
This ensures that auto-push never silently overwrites work done by other contributors directly in the repository.
API Support
Auto-push also works when data contracts are saved via the API. The commit message will include the API key's display name as the author. Credential resolution follows the same rules — an API key scoped to a user resolves credentials starting at the user level, a team-scoped key starts at the team level, and an organization-scoped key uses organization credentials.
Important Notes
The initial push for a newly connected data contract must be performed manually. Auto-push only takes effect for subsequent saves.
- If a push fails (e.g., due to credential issues or network errors), the data contract save still succeeds. The next sync status check will reflect the current state.
- Auto-push respects the same branch and repository settings configured on the Git connection.