Quick Start: Running your first recipe
To help orient you to Moderne, let's run a couple of recipes on some open source projects that we have imported into Moderne.
In this guide, we will
  • Login with GitHub
  • Find a recipe to search across multiple repositories
  • Examine the results of our recipe
  • Narrow our focus and run a recipe to transform a repository based on the search
  • Verify the results and issue a Pull Request to transform the code

Step 1: Go to public.moderne.io and login


Step 2: Sign in with GitHub

The first time you sign in to Moderne through GitHub, you are presented with an authorization prompt for a few permissions to help enhance your experience.
For a better understanding of the permissions requested, please see GitHub Permissions.

Step 3: Exploring the recipe catalog

Let's start by exploring recipes organized by language. As you navigate down into the catalog, you'll find different topical categories of recipes.

Step 4: Selecting a recipe

Let's find a good recipe to start from to help illustrate how to search across multiple repositories.
  1. 1.
    Select Browse __from the left-hand menu
  2. 2.
    Then select Java __ from the list of languages
  3. 3.
    Select the Cleanup category
  4. 4.
    Click on Common static analysis issues and then click More Details __ to go to the recipe details

Step 5: Selecting repositories

To narrow our scope a little bit, from the Recipe details page for SpringBoot 2.x Best Practices:
  • Click the Select Repositories button
  • In the search dropdown field, add an organization filter.
  • Use the transfer list buttons to add and remove repositories from your filter.
Now we should see a number in the Select Repositories button indicating how many repositories we to search.

Step 6: Running a recipe

Click Dry Run to start the recipe.
On the results page, you see a summary of your recipe criteria and an indication of progress.
Each result for a repository shows files searched and changes detected.
Click on either
button or the name of the repository (e.g. spring-cloud/spring-cloud-aws) to view the proposed changes.

Step 7: Viewing results

The resulting diff allows you to preview the changes from the recipe and then decide what to do.
As an example, the screenshot above illustrates how this recipe converts @RequestMapping(…) to the more specific HTTP Verb @GetMapping(…).

Step 8: Creating a Branch & Pull Request

The next course of action is to commit the changes.
  • In the results view, select the repositories you want to commit.
  • Click Commit Selected __. This will open a prompt allowing you to select different actions like committing directly, opening a pull request, etc.
From this prompt, you can customize either the Branch Name or Commit Message to match the contributing guidelines of a particular repository.
If you have committer access to the repository, create a branch directly on the project.

Step 9: πŸŽ‰ Profit