Quickstart: Running your first recipe
In this guide, we will:
The first time you sign in to Moderne through GitHub, you will be presented with an authorization prompt for a few permissions to help enhance your experience.
GitHub permission request
If you went to run a recipe right now, you would find that some repositories are already selected to run against. In public Moderne, the
Defaultorganization is selected (a diverse selection of open-source repositories). In an enterprise instance of Moderne, the
Allorganization is typically selected instead (meaning a recipe would run against every repository in your organization).
Once you've decided what repositories you want to run recipes against, click on
Marketplaceon the left side of the screen:
Moderne home page
This will take you to a page that lists all of the recipe categories:
Moderne recipe marketplace
Let's find a good recipe to start from to help illustrate how to search across multiple repositories.
Click Dry Run to start the recipe. You might be asked for additional GitHub permissions after you click this button.
On the results page, you will see a summary of your recipe criteria and an indication of progress.
Each result shows the number of files searched and how many changes were detected.
To see the proposed changes, click on either the
Actionsor the name of the repository (e.g. openrewrite/rewrite).
The resulting diff allows you to preview the changes from the recipe before you decide what you want to do.
If you're unsure why something changed, you can click on the three dots (
...) at the top right of any file and select
Why did this change?
Once you've confirmed you want to make the changes, the next course of action is to commit everything.
In the results view, select the repositories you want to commit and then click Commit Selected.
This will open a prompt that allows you to select different actions such as committing directly, opening a pull request, etc.
From this prompt, you can customize either the Branch Name or the Commit Message to match the contributing guidelines of a particular repository.
You've now run and committed your first recipe. Way to go!!