Learning Center

Learning Center

Learn Menu

Remote Gen

This feature makes the distribution of models a piece of cake. It essentially generates model code and immediately creates a new pull request in your connected repository. Imagine we have a Notes app that supports: Web, iPhone and Android. Using remote gen, we could instantly create pull requests in all three app repositories, so every change in your models gets propagated to all the supported platforms. Check out the diagram below.

Remote Gen Diagram

Setup

We need to connect an engine to a GitHub repository. OneGen currently supports only GitHub, but that's likely to change in the future.

If you're adding a new engine, you should see Connect to a remote repository section. If you want to connect an existing engine, navigate to engine config.

Connect to a remote repository
  1. Select Remote Repository: OneGen automatically retrieves a list of your GitHub repositories, you can just the right one
  2. Select Remote Branch: Select one of the branches of the given repository.
  3. Model Path: Enter the model path, for example /src/models
  4. Finally, save the dialog

Unset a remote repository

You probably noticed the red button in the picture above. It lets you unset (reset) the current remote repository. If you decide to unset a repository, make sure to save the dialog, otherwise, it won't take effect.

Usage

You can open the remote gen dialog by clicking on the purple cloud icon in the action bar as highlighted in the picture below.

Remote Gen Icon

The remote gen dialog requires you to enter a pull request title and description. Just describe the changes, for instance, Added User model.

When you click on the Generate button, the dialog will show you a link to the newly created pull request(s).

Design Gen

If you're currently in the design module (the design tab on top is active), remote gen will generate code for every engine that's connected to a remote repository. Thus, if you have 2 engines, each connected to a remote repository, a new pull request would be generated for both.

Engine Gen

If you're currently in an engine (an engine tab on top is active), remote gen will generate code only for this engine.

Note: Don't forget to delete the pull request branch after you merge it.

We use cookies to track activity using Google Analytics & reCAPTCHA. It helps us understand what our visitors like about our product and how they interact with our website. For more information, check out our Privacy Policy.