From c7f4007d25907c2db4a5c64e0d1e87ac5bf7ad79 Mon Sep 17 00:00:00 2001 From: Scott Jungling Date: Thu, 26 Aug 2021 21:11:07 +0000 Subject: [PATCH] GitBook: [main] 9 pages modified --- README.md | 7 ++++--- SUMMARY.md | 17 ++++++++------- getting-started/running-your-first-recipe.md | 21 ++++++++++--------- .../creating-your-own-recipes-with-builder.md | 13 +++++++----- how-to/importing-external-recipes.md | 1 + how-to/importing-projects-from-github.md | 1 + references/create-api-access-tokens.md | 1 + references/github-permissions.md | 11 +++++----- references/repository-selection.md | 13 ++++++------ 9 files changed, 48 insertions(+), 37 deletions(-) diff --git a/README.md b/README.md index 4b44acbe..b437e8db 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Welcome to Moderne.io +# Welcome to Moderne You're about to do large-scale refactoring and code improvement without writing a single line of code. @@ -6,6 +6,7 @@ Pretty awesome, right? [Moderne.io ](https://moderne.io)provides customers with an intuitive view for searching, analyzing, and transforming code across their entire organization. -Recipes transform code at the Abstract Syntax Tree (AST) level. While the resulting code may look different, the meaning of the code remains the same. +Recipes transform code at the Abstract Syntax Tree \(AST\) level. While the resulting code may look different, the meaning of the code remains the same. + +{% embed url="https://youtu.be/uR9EPALJKjI" caption="" %} -{% embed url="https://youtu.be/uR9EPALJKjI" %} diff --git a/SUMMARY.md b/SUMMARY.md index 46acd594..835ffff8 100644 --- a/SUMMARY.md +++ b/SUMMARY.md @@ -1,19 +1,20 @@ # Table of contents -- [Welcome to Moderne](README.md) +* [Welcome to Moderne](README.md) ## Getting Started -- [Quick Start: Running your first recipe](getting-started/running-your-first-recipe.md) +* [Quick Start: Running your first recipe](getting-started/running-your-first-recipe.md) ## How-to Guides -- [Creating your own recipes with Builder](how-to/creating-your-own-recipes-with-builder.md) -- [Importing projects from GitHub](how-to/importing-projects-from-github.md) -- [Importing External Recipes](how-to/importing-external-recipes.md) +* [Creating your own recipes with Builder](how-to/creating-your-own-recipes-with-builder.md) +* [Importing projects from GitHub](how-to/importing-projects-from-github.md) +* [Importing External Recipes](how-to/importing-external-recipes.md) ## References -- [Repository Selection](references/repository-selection.md) -- [GitHub Permissions](references/github-permissions.md) -- [Token Management](references/create-api-access-tokens.md) +* [Repository Selection](references/repository-selection.md) +* [GitHub Permissions](references/github-permissions.md) +* [Token Management](references/create-api-access-tokens.md) + diff --git a/getting-started/running-your-first-recipe.md b/getting-started/running-your-first-recipe.md index a61d8f05..4d8cfcdc 100644 --- a/getting-started/running-your-first-recipe.md +++ b/getting-started/running-your-first-recipe.md @@ -4,11 +4,11 @@ To help orient you to Moderne, let's run a couple of recipes on some open source 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** +* [ ] **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 [app.moderne.io](https://app.moderne.io) and _Login_ @@ -44,9 +44,9 @@ Let's find a good recipe to start from to help illustrate how to search across m 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, enter _OpenRewrite_ -- Click ![](../.gitbook/assets/select-only.png) to select the search results +* Click the _Select Repositories_ button +* In the search dropdown field, enter _OpenRewrite_ +* Click ![](../.gitbook/assets/select-only.png) to select the search results Now we should see a number in the _Select Repositories_ button indicating how many repositories we to search. @@ -76,8 +76,8 @@ As an example, the screenshot above illustrates how this recipe converts `@Reque The next course of action is to commit the changes. There are a few options available: -- Download a patch ![](../.gitbook/assets/result-diff-download-patch.png) of the change to test locally. -- Create a branch and open a pull request ![](../.gitbook/assets/result-diff-create-branch.png). +* Download a patch ![](../.gitbook/assets/result-diff-download-patch.png) of the change to test locally. +* Create a branch and open a pull request ![](../.gitbook/assets/result-diff-create-branch.png). Clicking ![](../.gitbook/assets/result-diff-create-branch.png) present you with a prompt to select whether or not you wish to create a fork of the project into your personal GitHub. @@ -90,3 +90,4 @@ If you have committer access to the repository, create a branch directly on the {% endhint %} ## Step 9: 🎉 Profit + diff --git a/how-to/creating-your-own-recipes-with-builder.md b/how-to/creating-your-own-recipes-with-builder.md index b7aec658..962aaf30 100644 --- a/how-to/creating-your-own-recipes-with-builder.md +++ b/how-to/creating-your-own-recipes-with-builder.md @@ -1,4 +1,4 @@ -# Create custom recipes with Builder +# Creating your own recipes with Builder Moderne provides the ability to create custom recipes from our existing recipe catalog through _Recipe_ _Builder._ @@ -15,8 +15,7 @@ Let's build a custom recipe! Let's start with a simple recipe to import. {% code title="sample-recipe.yml" %} - -```yml +```text type: specs.openrewrite.org/v1beta/recipe name: org.your_user_name.MyCustomRecipe displayName: My custom recipe @@ -26,21 +25,24 @@ recipeList: fullyQualifiedTypeName: java.util.List checkAssignability: true ``` - {% endcode %} 1. Click _Import YAML_ to open form 2. Paste in the contents of the recipe above. + ![](../.gitbook/assets/builder-import-yaml.png) + 3. Click _import_ + ![](../.gitbook/assets/builder-meta-data.png) + 4. Observe the _Recipe List_ now contains our `FindTypes` recipe and configuration ## Step 2: Change options Once we have imported a recipe from YAML, we can make further modifications before running the recipe. -1. Click the _Settings_ button (Gear) next to `Find Types` to open the recipe editor. +1. Click the _Settings_ button \(Gear\) next to `Find Types` to open the recipe editor. 2. Change `java.util.List` to `java.util.Set` 3. Click _Update_ 4. Observe in the _Recipe Preview_ on the right side that the recipe configuration updated. @@ -52,3 +54,4 @@ In the _Recipe Meta Data_ form you can select which repositories to run the reci ## Step 4: Run Recipe Click _Dry Run_ to execute your custom recipe. + diff --git a/how-to/importing-external-recipes.md b/how-to/importing-external-recipes.md index f7d8fcfc..11074101 100644 --- a/how-to/importing-external-recipes.md +++ b/how-to/importing-external-recipes.md @@ -19,3 +19,4 @@ The artifact information will appear in the table if Moderne.io successfully loc ## Step 3: View recipes in the catalog Your custom recipes will appear in the Catalog and be discoverable through search once successfully deployed. + diff --git a/how-to/importing-projects-from-github.md b/how-to/importing-projects-from-github.md index 27f372f1..387fbe1c 100644 --- a/how-to/importing-projects-from-github.md +++ b/how-to/importing-projects-from-github.md @@ -36,3 +36,4 @@ Click \_Add `moderne-ingest.yml` button. This action automatically creates a new ![](../.gitbook/assets/configure-repos-no-repos-found.png) ![](../.gitbook/assets/configure-repos-filter.png) + diff --git a/references/create-api-access-tokens.md b/references/create-api-access-tokens.md index e723b00d..bb87f1a1 100644 --- a/references/create-api-access-tokens.md +++ b/references/create-api-access-tokens.md @@ -39,3 +39,4 @@ Use the name of the token to distinguish it from other tokens. From the _Access Token_ page, click _Delete_ next to the token you wish to revoke. ![](../.gitbook/assets/access-token-remove.png) + diff --git a/references/github-permissions.md b/references/github-permissions.md index d88716a5..ae6856e7 100644 --- a/references/github-permissions.md +++ b/references/github-permissions.md @@ -8,8 +8,9 @@ Moderne.io requires a select number of OAuth scopes necessary to help you transf ![](../.gitbook/assets/authentication-github-permissions.png) -| Permission | Scope | Why we need this | -| :---------------------- | :--------- | :----------------------------------------------------------------------------------------------------------------------------------------- | -| Repositories \(Public\) | Read/Write | We use this to create branches, create forks of public projects, and push changesets on your behalf. | -| Organizations and teams | Read-only | We use this to understand the organizations you belong to and your level of access within them. | -| Personal user data | Read-only | We use this to recognize your account as a new or returning user. Email and Profile included by default with OpenID Connect through OAuth. | +| Permission | Scope | Why we need this | +| :--- | :--- | :--- | +| Repositories \(Public\) | Read/Write | We use this to create branches, create forks of public projects, and push changesets on your behalf. | +| Organizations and teams | Read-only | We use this to understand the organizations you belong to and your level of access within them. | +| Personal user data | Read-only | We use this to recognize your account as a new or returning user. Email and Profile included by default with OpenID Connect through OAuth. | + diff --git a/references/repository-selection.md b/references/repository-selection.md index 8049d200..12983f54 100644 --- a/references/repository-selection.md +++ b/references/repository-selection.md @@ -2,10 +2,11 @@ Before running recipes, selecting repositories can help focus your efforts. Here are some shortcuts available from the repository selection widget: -| Icon | Description | -| :----------------------------------------------------------------------------------------------------- | :--------------------------------------- | -| ![Add all repositories to selection ](../.gitbook/assets/select-all.png) | Add all repositories to selection | -| ![Remove all repositories from selection](../.gitbook/assets/remove-all.png) | Remove all repositories from selection | -| ![Add all search results to current repository selection](../.gitbook/assets/add-selected.png) | Add all search results to selection | +| Icon | Description | +| :--- | :--- | +| ![Add all repositories to selection ](../.gitbook/assets/select-all.png) | Add all repositories to selection | +| ![Remove all repositories from selection](../.gitbook/assets/remove-all.png) | Remove all repositories from selection | +| ![Add all search results to current repository selection](../.gitbook/assets/add-selected.png) | Add all search results to selection | | ![Remove all search results from current repository selection](../.gitbook/assets/remove-selected.png) | Remove all search results from selection | -| ![Only select repositories from search results](../.gitbook/assets/select-only.png) | Select only search results | +| ![Only select repositories from search results](../.gitbook/assets/select-only.png) | Select only search results | +