Clean up images and directories

* Fixes a ton of UI snapshots that were incorrect
* Rewrites some incorrect documentation such as organizations and repository groups
* Fixes the location of some files to be in the appropriate directory
* Adds some new images as needed for clarification purposes
This commit is contained in:
Mike Sol
2023-03-08 12:12:07 -08:00
parent 6991cc4eae
commit 319e2b66de
27 changed files with 43 additions and 34 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 KiB

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 162 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 136 KiB

After

Width:  |  Height:  |  Size: 177 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 89 KiB

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 89 KiB

After

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 KiB

After

Width:  |  Height:  |  Size: 99 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 166 KiB

After

Width:  |  Height:  |  Size: 160 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

After

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 192 KiB

After

Width:  |  Height:  |  Size: 192 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

View File

@@ -8,8 +8,8 @@
* [Introduction to type-aware code search](user-documentation/introduction-to-type-aware-code-search.md)
* [Achieve and maintain high code quality](user-documentation/code-quality.md)
* [Create custom recipes with the recipe builder](user-documentation/recipe-builder.md)
* [Accessing the Moderne API](how-to/accessing-the-moderne-api.md)
* [Recipe execution and commits with the Moderne API](how-to/recipe-execution-and-commits-with-graphql.md)
* [Accessing the Moderne API](user-documentation/accessing-the-moderne-api.md)
* [Recipe execution and commits with the Moderne API](user-documentation/recipe-execution-and-commits-with-graphql.md)
## Administrator documentation <a href="#how-to" id="how-to"></a>

View File

@@ -3,7 +3,7 @@
In order to use the [Moderne GraphQL API](https://api.public.moderne.io/), you will need to create a Personal Access Token.
{% hint style="info" %}
If you want to learn how to use an access token, please go to [Accessing the Moderne API](../how-to/accessing-the-moderne-api.md)
If you want to learn how to use an access token, please go to [Accessing the Moderne API](../user-documentation/accessing-the-moderne-api.md)
{% endhint %}
In this doc, you can find out:

View File

@@ -1,6 +1,6 @@
# Creating SCM access tokens
In order to perform [commits](../how-to/recipe-execution-and-commits-with-graphql.md#creating-a-pull-request) using the [Moderne GraphQL API](https://api.public.moderne.io/), you will need to create an SCM Access Token.
In order to perform [commits](../user-documentation/recipe-execution-and-commits-with-graphql.md#creating-a-pull-request) using the [Moderne GraphQL API](https://api.public.moderne.io/), you will need to create an SCM Access Token.
Commit tasks like `pullRequest` now support optionally defining a Personal Access Token that you create through your SCM and provide as a GraphQL Mutation input.

View File

@@ -13,10 +13,10 @@ To help you get started with repository groups, in this guide you will learn:
1. In the top right corner of the Moderne home page, you will see some text to the left of your avatar that says `Default`:
![](../.gitbook/assets/repo-group-1.png)
2. If you click on that, the repository group menu will appear:
2. If you click on that, the organization and repository group menu will appear:
![](../.gitbook/assets/repo-group-2.png)
3. Press `Create a repository group`. You will be taken to the repository group creation page:
3. Press the `Create` link listed below the organizations. You will be taken to the repository group creation page:
![](../.gitbook/assets/repo-group-3.png)
4. At the top, you should enter a descriptive name for the group. This will be the identifier you'll see when you go to select which group you want to run a recipe on.
@@ -40,35 +40,35 @@ To help you get started with repository groups, in this guide you will learn:
1. From any page, click on the text to the left of your avatar:
![](../.gitbook/assets/repo-group-1.png)
2. This will make the repository group menu appear:
2. This will make the organization and repository group menu appear:
![](../.gitbook/assets/repo-group-8.png)
3. Click on `Manage Repository Groups`. You will be redirected to the repository group page:
3. Click on the `Manage` link below the organizations. You will be redirected to the repository group page:
![](../.gitbook/assets/repo-group-7.png)
4. To modify a repository group, press the wrench icon under actions.
5. To remove a repository group, press the trash can icon under actions.
5. To remove a repository group, press the `...` icon and select `Delete repository group`.
## How to export repository groups JSON
1. From any page, click on the text to the left of your avatar:\
\\
1. From any page, click on the text to the left of your avatar:
<figure><img src="../.gitbook/assets/image (15).png" alt=""><figcaption></figcaption></figure>
2. This will make the repository group menu appear:
![](../.gitbook/assets/repo-group-1.png)
<figure><img src="../.gitbook/assets/image (5) (1).png" alt=""><figcaption></figcaption></figure>
2. This will make the organization and repository group menu appear:
3\. Click on `Manage Repository Groups`. You will be redirected to the repository group page:\\
![](../.gitbook/assets/repo-group-2.png)
<figure><img src="../.gitbook/assets/image (20).png" alt=""><figcaption></figcaption></figure>
3. Click on the `Manage` link below the organizations. You will be redirected to the repository group page:
![](../.gitbook/assets/repo-group-7.png)
4\. You can then export them individually or you can export all of the repository groups defined.
4. You can then export them individually or you can export all of the repository groups defined.
* To export an individual group, click the triple dots on the group you wish to export and then click on `Export repository group` from the menu. A `.json` file will be downloaded containing this single group.
* To export all of the repository groups, click the `Export ALL` link. A `.json` file of all your groups will be downloaded.
<figure><img src="../.gitbook/assets/Screenshot 2023-01-10 at 3.02.42 PM.png" alt=""><figcaption></figcaption></figure>
![](../.gitbook/assets/export-all.png)
## Additional information

View File

@@ -16,9 +16,9 @@ When a user logs in to the Moderne platform, a JWT is created for them by Keyclo
This token _is not_ used for accessing or viewing source code. That is done via the [SCM Token](moderne-tokens.md#source-code-manager-scm-token)
{% endhint %}
Users can find this token by clicking on the GraphQL icon in the top right corner of the Moderne platform once they are logged in:
Users can find this token by clicking on the GraphQL icon in the top middle of the Moderne platform once they are logged in:
![](../.gitbook/assets/graphql-icon-link.png)
![](../.gitbook/assets/graphql-link.png)
From there, at the bottom of the GraphQL Explorer, there is a `request headers` tag that includes this token:

View File

@@ -5,9 +5,9 @@ Moderne.io offers a GraphQL API at [https://api.public.moderne.io](https://api.p
Note: Personal access tokens do not retain roles that are granted to your user account. Actions that require roles (deploying recipes and uploading LSTs) will fail as forbidden if attempted with an access token.
{% hint style="info" %}
If you want to write and test GraphQL queries, you can use the GraphQL icon at the top right of the UI or go directly to [https://public.moderne.io/graphql](https://public.moderne.io/graphql).
If you want to write and test GraphQL queries, you can click on the GraphQL icon in the top middle of the UI or you go directly to [https://public.moderne.io/graphql](https://public.moderne.io/graphql).
<img src="../.gitbook/assets/image (3) (2).png" alt="" data-size="original">
![](../.gitbook/assets/graphql-link.png)
{% endhint %}
## Prerequisites

View File

@@ -30,6 +30,10 @@ As an example, let's say that you are wanting to find all of the places where yo
![](../.gitbook/assets/find-method-usage-results.png)
{% hint style="info" %}
As the code in the SaaS is constantly changing, your results will more than likely be different.
{% endhint %}
* If you click on one of the repository names such as `eclipse/rjkube`, you'll be taken into the code for that repository. Lines that match the search will be underlined and marked with a magnifying glass icon. These lines match the type that was specified in the search. This means that if any other `createFile` method was invoked, you wouldn't see those results here. Instead, you will see:
![](../.gitbook/assets/find-method-usage-result.png)

View File

@@ -20,13 +20,16 @@ This guide assumes that you:
### Recipe execution
1. Click the [Repository Group](../references/managing-repository-groups.md) selector on the right-hand side of the header and create a new group of your selected repositories.
1. To begin, you'll want to decide what repositories you want your recipe to run on. You have three options for selecting repositories: choosing an existing organization, creating a new repository group, or selecting an existing repository group. Once you've selected or created one, you can proceed to step 2.
<figure><img src="../.gitbook/assets/Screenshot 2022-12-02 at 9.28.28 AM (1).png" alt=""><figcaption></figcaption></figure>
2. Navigate to the recipe you wish to run and fill out the recipe options.\\
![](../.gitbook/assets/repository-selection-options.png)
2. Navigate to the recipe you wish to run and fill out the recipe options.
![](../.gitbook/assets/update-gradle-plugin.png)
3. Click the `See how to run against the API` link. This will provide you with the query that will be run when executing a recipe run. Additionally, the appropriate variables will be added to this query based on your repository selection from step 1.
<figure><img src="../.gitbook/assets/Screenshot 2022-12-01 at 2.05.59 PM.png" alt=""><figcaption></figcaption></figure>
3. Click the `See how to run against the API` link. This will provide you with the query that will be run when executing a recipe run and additionally the variables provided from your repository group in the query variables pane.
4. You can then execute a recipe with the following mutation:
{% tabs %}
@@ -41,6 +44,8 @@ mutation executeRecipe($input: RecipeRunInput!) {
{% endtab %}
{% tab title="Mutation Variables" %}
Please note that the `repositoryFilter` section will be null if you've selected an organization. Instead, an `organizationId` will be added with the Id of the organization you selected.
```json
{
"input": {
@@ -51,7 +56,7 @@ mutation executeRecipe($input: RecipeRunInput!) {
{ "name": "newVersion", "value": "1.1.0" }
]
},
"repositoryFilter": [
"repositoryFilter": [
{
"branch": "master",
"origin": "github.com",
@@ -81,7 +86,7 @@ curl --request POST
{% endtab %}
{% endtabs %}
5\. The mutation will return a response that contains the `id` of the recipe run which will be used in the next step to poll for the completion of the recipe. Example response:
5. The mutation will return a response that contains the `id` of the recipe run which will be used in the next step to poll for the completion of the recipe. Example response:
```graphql
{
@@ -205,7 +210,7 @@ curl --request POST
{% endtab %}
{% endtabs %}
2\. You can then use the `edges` array in the response, to build up the repository list used in the next step of creating a pull request. Example response:
2. You can then use the `edges` array in the response, to build up the repository list used in the next step of creating a pull request. Example response:
```json
{
@@ -320,7 +325,7 @@ curl --request POST
{% endtab %}
{% endtabs %}
2\. Once the mutation is executed we will receive a response with the commit `id` that we can then poll for the completion of the commit. Example response:
2. Once the mutation is executed we will receive a response with the commit `id` that we can then poll for the completion of the commit. Example response:
```json
{
@@ -435,7 +440,7 @@ curl --request POST \
{% endtab %}
{% endtabs %}
2\. Example response:
2. Example response:
```json
{

View File

@@ -33,7 +33,7 @@ For a better understanding of the permissions requested, please see [GitHub Perm
After you've logged in and granted the appropriate permissions, you'll arrive at the [Moderne home page](https://public.moderne.io/).
If you went to run a recipe right now, your recipes would run on a default grouping of repositories. In public Moderne, the default group is a diverse selection of open-source repositories. In an enterprise instance of Moderne, the default group is every repository in your instance.
If you went to run a recipe right now, your recipes would run on a default grouping of repositories. In public Moderne, the default group is a diverse selection of open-source repositories. In an enterprise instance of Moderne, the default group is every repository in your instance unless your company has configured an [Organizations service](/references/organizations-service.md). In that case, it will be all repositories in your organization.
If you'd prefer to run the recipes against a different group of repositories so that you can get relevant results more quickly, please follow [these instructions](../references/managing-repository-groups.md#how-to-create-a-repository-group) on how to make a repository group.
@@ -77,7 +77,7 @@ The resulting diff allows you to preview the changes from the recipe before you
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?`
For instance, in the above example, `= false` was removed due to the [Explicit initialization rule](https://public.moderne.io/recipes/org.openrewrite.java.cleanup.ExplicitInitialization).
For instance, in the above example, `= null` was removed due to the [Explicit initialization rule](https://public.moderne.io/recipes/org.openrewrite.java.cleanup.ExplicitInitialization).
## Step 8: Commit your changes