Skip to content

Commit 679b42a

Browse files
deerskindollibuziukthemr0cdkwon17
authored
editing writing style and punctuation (#1)
* editing writing style and punctuation Signed-off-by: Jana Vrbkova <jvrbkova@redhat.com> * Update _posts/2022-02-16-reviewing-pull-requests.adoc Co-authored-by: Ilya Buziuk <ilyabuziuk@gmail.com> * Update _posts/2022-02-16-reviewing-pull-requests.adoc Co-authored-by: Ilya Buziuk <ilyabuziuk@gmail.com> * Update _posts/2022-02-16-reviewing-pull-requests.adoc Co-authored-by: Ilya Buziuk <ilyabuziuk@gmail.com> * Update _posts/2022-02-16-reviewing-pull-requests.adoc Co-authored-by: Ilya Buziuk <ilyabuziuk@gmail.com> * Update _posts/2022-02-16-reviewing-pull-requests.adoc Co-authored-by: Fabrice Flore-Thébault <ffloreth@redhat.com> * Update _posts/2022-02-16-reviewing-pull-requests.adoc Co-authored-by: Fabrice Flore-Thébault <ffloreth@redhat.com> * Update _posts/2022-02-16-reviewing-pull-requests.adoc Co-authored-by: Fabrice Flore-Thébault <ffloreth@redhat.com> * Update _posts/2022-02-16-reviewing-pull-requests.adoc Co-authored-by: David Kwon <83611742+dkwon17@users.noreply.github.com> * Update _posts/2022-02-16-reviewing-pull-requests.adoc Co-authored-by: Fabrice Flore-Thébault <ffloreth@redhat.com> * Update _posts/2022-02-16-reviewing-pull-requests.adoc Co-authored-by: Fabrice Flore-Thébault <ffloreth@redhat.com> * Update _posts/2022-02-16-reviewing-pull-requests.adoc Co-authored-by: Fabrice Flore-Thébault <ffloreth@redhat.com> * Update _posts/2022-02-16-reviewing-pull-requests.adoc Co-authored-by: Fabrice Flore-Thébault <ffloreth@redhat.com> * Update _posts/2022-02-16-reviewing-pull-requests.adoc Co-authored-by: Fabrice Flore-Thébault <ffloreth@redhat.com> * Update _posts/2022-02-16-reviewing-pull-requests.adoc Co-authored-by: Fabrice Flore-Thébault <ffloreth@redhat.com> * Update _posts/2022-02-16-reviewing-pull-requests.adoc Co-authored-by: Fabrice Flore-Thébault <ffloreth@redhat.com> * Update _posts/2022-02-16-reviewing-pull-requests.adoc Co-authored-by: Fabrice Flore-Thébault <ffloreth@redhat.com> * Update 2022-02-16-reviewing-pull-requests.adoc quick typo fix Co-authored-by: Ilya Buziuk <ilyabuziuk@gmail.com> Co-authored-by: Fabrice Flore-Thébault <ffloreth@redhat.com> Co-authored-by: David Kwon <83611742+dkwon17@users.noreply.github.com>
1 parent 8304834 commit 679b42a

File tree

1 file changed

+44
-49
lines changed

1 file changed

+44
-49
lines changed

_posts/2022-02-16-reviewing-pull-requests.adoc

+44-49
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,22 @@ Reviewing pull requests for a GitHub project integrated with {prod}.
1313

1414
=== Using {prod} to review pull requests
1515

16-
As long as you're using a supported web browser like Google Chrome, {prod} can make it possible to review a pull request (PR) without setting up runtimes, build tools, or any additional software on the local machine.
16+
With Google Chrome, {prod} makes it possible to review a pull request (PR) without setting up runtimes, build tools, or any extra software on the local machine.
1717

18-
This blog post will showcase the typical workflow on how PRs can be reviewed using {prod} for a GitHub project that is well-integrated with {prod}.
19-
The GitHub project used in this blog post is located here: link:https://github.com/che-incubator/quarkus-api-example[www.github.com/che-incubator/quarkus-api-example].
18+
This blog post will showcase the typical workflow of reviewing PRs of a GitHub project that is well-integrated with Eclipse Che. Here is the GitHub project used in this blog post: link:https://github.com/che-incubator/quarkus-api-example[www.github.com/che-incubator/quarkus-api-example].
2019

21-
Please refer to these references on how to set up your project with {prod}:
20+
You can refer to these articles on how to set up your project with {prod}:
2221

2322
* <<../../01/11/@ilya.buziuk-contributing-for-the-first-time-to-a-project#set-up-project,How can maintainers set up their projects to use Eclipse Che?>>
2423
* link:https://www.eclipse.org/che/docs/che-7/end-user-guide/authoring-devfiles-version-2[Authoring a devfile v2]
2524

26-
NOTE: It is crucial that your project contains a well-defined devfile.yaml file to make the most out of your development experience with {prod}. The devfile should define your project's development environment such as development commands, containers, endpoints etc.
25+
NOTE: Your project must contain a well-defined `devfile.yaml` file to make the most out of your development experience with {prod}. Use the devfile to define your projects development environment such as development commands, containers, endpoints, and so on.
2726

28-
WARNING: In the following scenario devfile v2 is used and {prod} has been deployed alongside the {devworkspace} engine, which is currently not in use on link:https://workspaces.openshift.com/[Eclipse Che Hosted by Red Hat]. To open the example GitHub project on Eclipse Che Hosted by Red Hat, please use the link:https://github.com/che-incubator/quarkus-api-example/tree/devfilev1[devfilev1] branch which provides support for the deprecated devfile v1.
27+
WARNING: The following scenario uses devfile v2, and {prod} is deployed alongside the {devworkspace} engine which is currently not used on link:https://workspaces.openshift.com/[Eclipse Che Hosted by Red Hat]. To open the test GitHub project on Eclipse Che Hosted by Red Hat, please use the link:https://github.com/che-incubator/quarkus-api-example/tree/devfilev1[devfilev1] branch which supports the deprecated devfile v1.
2928

3029
=== The scenario
3130

32-
Let's imagine that we are developing a REST API with Quarkus that interacts with `Food` resources from a PostgreSQL database.
31+
Imagine that you're developing a REST API with Quarkus that interacts with `Food` resources from a PostgreSQL database.
3332
[source,java]
3433
----
3534
/* Food.java */
@@ -70,110 +69,106 @@ In the current state of the project, there are four endpoints:
7069
|Creates a Food resource
7170
|===
7271

73-
It looks like a "colleague" has opened a new PR that adds a new `GET` endpoint, `/food/restaurant/{restaurantName}` that retrieves a list of all `Food` resources served from a specified restaurant:
72+
It looks like your colleague has opened a new PR that adds a new `GET` endpoint, `/food/restaurant/{restaurantName}`. The endpoint retrieves a list of all `Food` resources served from a specified restaurant:
7473

7574
image::/assets/img/reviewing-pull-requests/pr.png[The pull request to review]
76-
Figure 1: The GitHub PR that we need to review.
75+
Figure 1: The GitHub PR you need to review.
7776

78-
Let's review this PR by launching a new {prod} workspace. From the {prod} workspace, we can verify the PR by running unit tests, running the application, accessing the endpoint, building the application, all without leaving our web browser.
77+
Review this PR by launching a new {prod} workspace. Here you can verify the PR by running unit tests, running the application, accessing the endpoint, and building the application, all within your web browser.
7978

80-
The workspace and IDE editor can be launched on link:https://www.eclipse.org/che/docs/che-7/hosted-che/hosted-che/[Eclipse Che Hosted by Red Hat] by clicking the {prod} badge from the base GitHub repository's `README`:
79+
Start the workspace and Web IDE editor on link:https://www.eclipse.org/che/docs/che-7/hosted-che/hosted-che/[Eclipse Che Hosted by Red Hat] by clicking the {prod} badge from the base GitHub repository's `README`:
8180

82-
image::/assets/img/reviewing-pull-requests/badge.png[Badge used to launch workspace]
83-
Figure 2: A badge from the base repository's `README.md` that launches a developer workspace when clicked.
81+
image::/assets/img/reviewing-pull-requests/badge.png[Badge used to start workspaces]
82+
Figure 2: Clicking on a badge from the base repository's `README.md` launches a developer workspace.
8483

8584
=== Launching a workspace and reviewing the PR
8685
image::/assets/img/reviewing-pull-requests/ide.png[The Che-theia editor]
8786
Figure 3: The Che-Theia editor.
8887

89-
Once the workspace has launched and the Web IDE has opened, you will see that the project has been cloned already (see the Explorer view on the bottom-right).
88+
After you start the workspace, the web IDE will open automatically and you'll see that the project has been cloned already (see the Explorer view on the left-hand side).
89+
90+
To use the link:https://github.com/Microsoft/vscode-pull-request-github[GitHub Pull Requests and Issues] extension, you must first authenticate with GitHub by clicking on the Accounts icon on the bottom left of the editor. The extension adds the GitHub view to the sidebar and provides integration with GitHub. As a result, you can make PR comments, in-editor comments, approve PRs, and much more, all from the web IDE.
9091

91-
To leverage the link:https://github.com/Microsoft/vscode-pull-request-github[GitHub Pull Requests and Issues] plugin, we must first authenticate with GitHub by clicking on the Accounts icon on the bottom left of the editor. The extension adds the GitHub view to the sidebar, and provides integration with GitHub.
92-
As a result, we can make PR comments, in-editor comments, approve PRs, and much more, all from the IDE.
9392

9493
Click on "Sign in to user GitHub Pull Requests and Issues (1)".
9594
You will be prompted to enter your GitHub credentials to sign in.
9695

97-
image::/assets/img/reviewing-pull-requests/sign-in.png[The context menu that appears after clicking the Accounts icon, 600]
98-
Figure 4: The context menu that appears after clicking the Accounts icon.
96+
image::/assets/img/reviewing-pull-requests/sign-in.png[The context menu appears after clicking the Accounts icon, 600]
97+
Figure 4: The menu appears after clicking the Accounts icon.
9998

100-
After signing in successfully, navigate to the GitHub view from the sidebar to see an overview of PRs against the base repository. Under the "Assigned To Me" drop-down, we can see the PR that we will review.
99+
After signing in, navigate to the GitHub view from the sidebar to see an overview of PRs against the base repository. Under the "Assigned To Me" drop-down, you can see the PR that you'll review.
101100

102-
image::/assets/img/reviewing-pull-requests/github-view.png[Viewing the PR within the IDE, 400]
101+
image::/assets/img/reviewing-pull-requests/github-view.png[Viewing the PR within the web IDE, 400]
103102
Figure 5: The GitHub view, opened by clicking on the fifth icon from the top.
104103

105-
WARNING: If the workspace was launched with a badge generated with the link:https://github.com/marketplace/actions/try-in-web-ide[Try in Web IDE] GitHub action on PR coming from a forked repository, git remotes must be manually set up in order to use the GitHub Pull Requests and Issues plugin. Please see link:https://github.com/redhat-actions/try-in-web-ide/issues/14[redhat-actions/try-in-web-ide#14].
104+
WARNING: If you start a workspace with a badge generated using the link:https://github.com/marketplace/actions/try-in-web-ide[Try in Web IDE] GitHub action on a PR from a forked repository, you must manually set up Git remotes to use the GitHub Pull Requests and Issues extension. Please see link:https://github.com/redhat-actions/try-in-web-ide/issues/14[redhat-actions/try-in-web-ide#14].
106105

107-
In the drop-down menu underneath the PR, we see a "Description" menu item, as well as a file hierarchy displaying all of the changed files in the PR.
108-
In this case, the files that were changed were: `FoodResource.java`, `FoodEndpointTest.java` and `README.md`. Clicking on these files will open a diff view within the IDE.
109-
Taking a look at these files, we can verify that the PR adds the new endpoint, as well as a unit test. Let's checkout the feature branch and take a closer look at the PR.
106+
The "Description" menu item, as well as a file hierarchy with all changed files, are in the drop-down menu below the PR. In this case, the changed files are `FoodResource.java`, `FoodEndpointTest.java`, and `README.md`. Click on the files to open a diff view within the web IDE. Examine these files and verify that the PR adds a new endpoint, as well as a unit test.
110107

111-
Clicking on the "Description" menu item opens a new webview displaying the PR in a similar UI as to what we would see on GitHub.
112-
Checkout the branch by clicking "Checkout" at the top right on Figure 6.
108+
Click on the "Description" menu item to open a new web view displaying the PR in a UI similar to GitHub. Check out the branch by clicking "Checkout" at the top right of Figure 6.
113109

114-
image::/assets/img/reviewing-pull-requests/pr-view.png[Viewing the PR within the IDE]
115-
Figure 6: A webview that displays details about the PR. This webview appears after clicking the "Description" menu item from Figure 5.
110+
image::/assets/img/reviewing-pull-requests/pr-view.png[Viewing the PR within the web IDE]
111+
Figure 6: A webview displaying details about the PR. This web view appears after clicking the "Description" menu item from Figure 5.
116112

117-
Since the link:https://github.com/redhat-developer/vscode-java[Language support for Java ™] plugin is already installed in our IDE (as defined for our project),once the plugin is running we can verify right away that it reports no compilation errors like syntax errors by referring to the Problems view.
113+
The test project includes a preinstalled link:https://github.com/redhat-developer/vscode-java[Language support for Java ™] extension in the web IDE. With this extension, you can check the Problem view to verify that there are no compilation problems such as syntax errors.
118114

119-
image::/assets/img/reviewing-pull-requests/no-problems.png[No problems reported by the Java plugin]
120-
Figure 7: No problems reported by the Java plugin in the Problems view.
115+
image::/assets/img/reviewing-pull-requests/no-problems.png[No problems reported by the Java extension]
116+
Figure 7: No problems reported by the Java extension in the Problems view.
121117

122118
=== Running unit tests and building
123-
The devfile also defines commands for testing, building, and launching the application.
124-
Let's run the unit tests by opening the Workspace view from the right-hand side and clicking `(User Runtimes -> tools -> runtests)`.
119+
The devfile also defines commands for testing, building, and launching the application. Run the unit tests by opening the Workspace view from the right side and clicking `(User Runtimes -> tools -> runtests)`.
125120

126-
This runs the test command (`./mvnw test`) within the `tools` container as specified in the devfile. The test output can be viewed in the output panel.
121+
This runs the test command (`./mvnw test`) within the `tools` container as specified in the devfile. You can view the test output in the output panel.
127122

128123
image::/assets/img/reviewing-pull-requests/run-tests.png[Running the unit tests]
129124
Figure 8: Unit testing by clicking `runtests` from the Workspace view on the right.
130125

131-
As we can see in the output from Figure 8, all of the tests pass!
126+
As you can see in the output from Figure 8, you passed the tests successfully.
132127

133128
You can also run other commands such as `(User Runtimes -> tools -> package)` to build the application.
134129

135130
image::/assets/img/reviewing-pull-requests/build.png[Successfully building the application]
136131
Figure 9: Successfully building the application.
137132

138-
NOTE: Please note, the `packagenative` command is used to build a native image with GraalVM. This command would fail for our example project on link:https://www.eclipse.org/che/docs/che-7/hosted-che/hosted-che/[Eclipse Che Hosted by Red Hat] due to the 7GB memory usage limit.
133+
NOTE: The `packagenative` command is used to build a native image with GraalVM. The command would fail for this test project on link:https://www.eclipse.org/che/docs/che-7/hosted-che/hosted-che/[Eclipse Che Hosted by Red Hat] due to the 7GB memory usage limit.
139134

140135
=== Running the application
141-
Let's run the Quarkus application in link:https://quarkus.io/guides/getting-started#development-mode[development mode] by running the `(User Runtimes -> tools -> startdev)` command to try accessing the endpoint ourselves.
136+
Run the Quarkus application in link:https://quarkus.io/guides/getting-started#development-mode[development mode] by running the `(User Runtimes -> tools -> startdev)` command to access the endpoint.
142137

143138
image::/assets/img/reviewing-pull-requests/start-dev.png[Starting the application in development mode]
144139
Figure 10: Starting the Quarkus project in development mode by clicking `startdev` from the Workspace view on the right.
145140

146-
Next, let's access the new `/food/restaurant/{restaurantName}` endpoint. Here, we access `/food/restaurant/Local Deli` to get all `Food` resources from the restaurant named `Local Deli`.
141+
Next, access the new `/food/restaurant/{restaurantName}` endpoint. Here, you access `/food/restaurant/Local Deli` to get all `Food` resources from the restaurant named `Local Deli`.
147142

148143
image::/assets/img/reviewing-pull-requests/access-endpoint.png[Accessing the new endpoint]
149144
Figure 11: Response from `/food/restaurant/Local Deli`.
150145

151-
There are two `Food` resources from the `Local Deli` restaurant from the response, which is what we would expect given that these are the only `Food` resources from the specified restaurant in our link:https://github.com/che-incubator/quarkus-api-example/blob/main/src/main/resources/import.sql[`import.sql`] file.
146+
The response contains two `Food` resources from the `Local Deli` restaurant. This is a match with the `Food` resources from this restaurant in the link:https://github.com/che-incubator/quarkus-api-example/blob/main/src/main/resources/import.sql[`import.sql`] file.
152147

153148
=== Providing feedback and merging the PR
154-
So far, we have successfully run tests, ran the build, as well as ran the application in development mode to verify that the PR is working correctly.
155-
Next, let's merge the PR from the IDE.
149+
So far, you have successfully run tests, ran the build, as well as ran the application in development mode to verify that the PR is working correctly.
150+
Next, merge the PR from the web IDE.
156151

157-
Going back to the GitHub PR view (see Figure 5), we can provide any additional comments, and approve the PR. Let's merge this PR to `main`.
152+
Go back to the GitHub PR view (see Figure 5) to provide more comments, and approve the PR. Merge the PR to `main`.
158153

159-
image::/assets/img/reviewing-pull-requests/merge.png[Merging to main from the IDE]
154+
image::/assets/img/reviewing-pull-requests/merge.png[Merging to main from the web IDE]
160155
Figure 12: Clicking "Merge Pull Request" to merge.
161156

162-
image::/assets/img/reviewing-pull-requests/merged.png[Merged to main from the IDE]
157+
image::/assets/img/reviewing-pull-requests/merged.png[Merged to main from the web IDE]
163158
Figure 13: PR has been merged.
164159

165160
=== Conclusion
166-
And that's it! We have finished reviewing the PR and have successfully merged it from the IDE editor.
161+
You have finished reviewing the PR and have successfully merged it from the web IDE editor.
167162
In summary, we have:
168163

169164
* Opened a new {prod} workspace to review the PR
170165
* Checked out the feature branch
171166
* Ran the unit tests
172167
* Built the application
173168
* Ran the application in development mode to verify that the feature works as intended
174-
* Leveraged the GitHub Pull Requests and Issues plugin and the Language support for Java ™ plugin
175-
* Merged the PR from the IDE
169+
* Used the GitHub Pull Requests and Issues extension and the Language support for Java ™ extension
170+
* Merged the PR from the web IDE
176171

177-
without any prior setup on our local machine.
172+
without any prior setup on your local machine.
178173

179-
Thank you for reading!
174+
Thank you for reading!

0 commit comments

Comments
 (0)