Skip to content
This repository was archived by the owner on Apr 19, 2021. It is now read-only.

Commit ef10622

Browse files
committed
fix linting + type checking errors + format the entire code base with prettier.
1 parent 4bcff57 commit ef10622

File tree

191 files changed

+8506
-7978
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

191 files changed

+8506
-7978
lines changed

src/blog/bitbucket.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,21 @@ For more convenience, you can also install Gitpod's browser extension (for [Chro
2525

2626
Gitpod also supports other types of Bitbucket URLs, like:
2727

28-
- Opening file URLs
28+
- Opening file URLs
2929

30-
<p style="font-size: 70%;">Example: <a href="https://gitpod.io/#https://bitbucket.org/gitpod/spring-petclinic/src/master/src/main/java/org/springframework/samples/petclinic/PetClinicApplication.java" target="blank"><b style="font-weight:700;">https://gitpod.io/#</b>https://bitbucket.org/gitpod/spring-petclinic/.../petclinic/PetClinicApplication.java</a></p>
31-
- Opening branches
30+
<p style="font-size: 70%;">Example: <a href="https://gitpod.io/#https://bitbucket.org/gitpod/spring-petclinic/src/master/src/main/java/org/springframework/samples/petclinic/PetClinicApplication.java" target="blank"><b style="font-weight:700;">https://gitpod.io/#</b>https://bitbucket.org/gitpod/spring-petclinic/.../petclinic/PetClinicApplication.java</a></p>
3231

33-
<p style="font-size: 70%;">Example: <a href="https://gitpod.io/#https://bitbucket.org/gitpod/spring-petclinic/src/my-branch/" target="blank"><b style="font-weight:700;">https://gitpod.io/#</b>https://bitbucket.org/gitpod/spring-petclinic/src/my-branch/</a></p>
34-
- Opening issues
32+
- Opening branches
3533

36-
<p style="font-size: 70%;">Example: <a href="https://gitpod.io/#https://bitbucket.org/gitpod/spring-petclinic/issues/1/make-first-name-optional" target="blank"><b style="font-weight:700;">https://gitpod.io/#</b>https://bitbucket.org/gitpod/spring-petclinic/issues/1/make-first-name-optional</a></p>
37-
- Opening pull requests
34+
<p style="font-size: 70%;">Example: <a href="https://gitpod.io/#https://bitbucket.org/gitpod/spring-petclinic/src/my-branch/" target="blank"><b style="font-weight:700;">https://gitpod.io/#</b>https://bitbucket.org/gitpod/spring-petclinic/src/my-branch/</a></p>
3835

39-
<p style="font-size: 70%;">Example: <a href="https://gitpod.io/#https://bitbucket.org/gitpod/spring-petclinic/pull-requests/1/allow-omitting-first-name/diff" target="blank"><b style="font-weight:700;">https://gitpod.io/#</b>https://bitbucket.org/gitpod/spring-petclinic/pull-requests/1/allow-omitting-first-name/diff</a></p>
36+
- Opening issues
37+
38+
<p style="font-size: 70%;">Example: <a href="https://gitpod.io/#https://bitbucket.org/gitpod/spring-petclinic/issues/1/make-first-name-optional" target="blank"><b style="font-weight:700;">https://gitpod.io/#</b>https://bitbucket.org/gitpod/spring-petclinic/issues/1/make-first-name-optional</a></p>
39+
40+
- Opening pull requests
41+
42+
<p style="font-size: 70%;">Example: <a href="https://gitpod.io/#https://bitbucket.org/gitpod/spring-petclinic/pull-requests/1/allow-omitting-first-name/diff" target="blank"><b style="font-weight:700;">https://gitpod.io/#</b>https://bitbucket.org/gitpod/spring-petclinic/pull-requests/1/allow-omitting-first-name/diff</a></p>
4043

4144
Depending on the context, your dev environment will be initialized differently.
4245

@@ -60,7 +63,8 @@ There is much more you can do to make sure every team member gets a ready-to-cod
6063
Gitpod’s [prebuilt workspaces](/docs/prebuilds/) are key to providing ephemeral, ready-to-code dev environments for your branches and projects. You can configure Gitpod to run your project's build asynchronously every time someone pushes new commits or branches to your repository. So when a developer wants to start coding, she can start immediately, because everything is already prepared.
6164

6265
Enabling prebuilds on your Bitbucket project is done by configuring a Webhook. This can be done automatically: Just trigger the first prebuild on your project manually, and Gitpod will take it from there. To do that, use the prefix `https://gitpod.io/#prebuild/`, as in
63-
> __https://gitpod.io/#prebuild/__`https://bitbucket.org/<myuser>/<myrepo>`
66+
67+
> **https://gitpod.io/#prebuild/**`https://bitbucket.org/<myuser>/<myrepo>`
6468
6569
## We Need Your Feedback
6670

src/blog/build-a-webhook-for-google-assistant.md

Lines changed: 36 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -10,43 +10,47 @@ image: https://res-3.cloudinary.com/anudeepc/image/upload/q_auto/v1/blog-images/
1010
This post is all about how to build your webhook for your Google Assistant action and host it temporarily on Gitpod and test your code.
1111

1212
## Prerequisites
13-
* Node JS
14-
* Express JS
15-
* Basics on how to use Github
13+
14+
- Node JS
15+
- Express JS
16+
- Basics on how to use Github
1617

1718
If you have these in place, Let's get started.
1819

1920
## What is Gitpod?
21+
2022
First of all I would like to start this section by saying, I ❤ Gitpod. Gitpod is an online IDE for Github. Gitpod provides you with a fully working development environment, including a VS Code-powered IDE and a cloud-based Linux container configured specifically for the project at hand. Just prefix your Github repo URL with "https://gitpod.io/#", So that the final link looks something like this "https://gitpod.io/#https://github.com/<username>/<repo-name>" or you can also use the Gitpod [browser extension](https://chrome.google.com/webstore/detail/gitpod-online-ide/dodmmooeoklaejobgleioelladacbeki?hl=en) to add the Gitpod button to Github page.
23+
2124
<iframe width="560" height="315" src="https://www.youtube.com/embed/bFZMKpDV3GQ" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
2225

2326
## Let's start building
2427

2528
I have created a Github repo which will help you get started without any hassle. The repo is basically a boilerplate to get started with building your webhook. The code is written in Node JS, So it would be easier for you to build on top of it if you are already familiar with Node JS. We will be using the [action-on-google](https://www.npmjs.com/package/actions-on-google) Node JS library (This client library makes it easy to create Actions for the Google Assistant and supports Dialogflow, Actions SDK, and Smart Home fulfillment.).
2629

2730
### Create your Action
28-
* Head over to https://console.actions.google.com/ and click on New Project.
31+
32+
- Head over to https://console.actions.google.com/ and click on New Project.
2933

3034
![Google Actions Console](https://res-2.cloudinary.com/anudeepc/image/upload/q_auto/v1/blog-images/Annotation-2019-06-28-141627.png)
3135

32-
* Enter your project name and click on create project.
36+
- Enter your project name and click on create project.
3337

3438
![Google Actions Create New Project Prompt](https://res-1.cloudinary.com/anudeepc/image/upload/q_auto/v1/blog-images/gitpod-action.png)
3539

36-
* Now select a category for your Action.
37-
* Now under the Develop menu, give your action a name.
38-
* Now head over to actions menu in Develop tab and click on **Add your first action**.
40+
- Now select a category for your Action.
41+
- Now under the Develop menu, give your action a name.
42+
- Now head over to actions menu in Develop tab and click on **Add your first action**.
3943

4044
!["Add your first action" button](https://res-1.cloudinary.com/anudeepc/image/upload/q_auto/v1/blog-images/temp2.png)
4145

42-
* In the next section choose **custom intent** and click on **build**. Doing this will redirect you to the **Dialogflow console** and it should look something like this.
46+
- In the next section choose **custom intent** and click on **build**. Doing this will redirect you to the **Dialogflow console** and it should look something like this.
4347

4448
![Dialogflow console](https://res-3.cloudinary.com/anudeepc/image/upload/q_auto/v1/blog-images/temp3.png)
4549

46-
* Click on create to **create** your agent on Dialogflow.
47-
* Once your agent is ready, you will already have two default Intents (Default Fallback Intent and Default Welcome Intent) in place and these two do pretty good at their job.
48-
* Now it's time to create a new intent and enable fulfillments for that intent so that we can serve responses from the webhook that we will be building in the next section.
49-
* Click on create a new intent, give it a name and training phrase (training phrase will be used to invoke the intent). Now that your intent is almost ready scroll down and under fulfillments **enable webhook call** for the new Default welcome intent and the new intent you just created.
50+
- Click on create to **create** your agent on Dialogflow.
51+
- Once your agent is ready, you will already have two default Intents (Default Fallback Intent and Default Welcome Intent) in place and these two do pretty good at their job.
52+
- Now it's time to create a new intent and enable fulfillments for that intent so that we can serve responses from the webhook that we will be building in the next section.
53+
- Click on create a new intent, give it a name and training phrase (training phrase will be used to invoke the intent). Now that your intent is almost ready scroll down and under fulfillments **enable webhook call** for the new Default welcome intent and the new intent you just created.
5054

5155
### Understanding .gitpod.yml
5256

@@ -69,13 +73,15 @@ When starting or restarting a workspace you typically want to run certain tasks.
6973
Gitpod allows you to configure start tasks in the .gitpod.yml file.
7074

7175
For instance, the start script for this repository is defined as:
76+
7277
```
7378
tasks:
7479
- init: npm install
7580
command: npm start
7681
```
7782

7883
You can have multiple tasks, which are opened on separated terminals.
84+
7985
```
8086
tasks:
8187
- init: npm install
@@ -84,32 +90,33 @@ tasks:
8490
```
8591

8692
#### `init` command
93+
8794
The init property can be used to specify shell commands that should only be executed after a workspace was freshly cloned and needs to be initialized somehow. Such tasks are usually builds or downloading dependencies. Anything you only want to do once but not when you restart a workspace or start a snapshot.
8895

8996
In our case the `init` command is
97+
9098
```
9199
tasks:
92100
- init: npm install
93101
```
94102

95-
96103
### Get the Gitpod setup running
97-
* Fork my [repo (dialogflow-webhook-boilerplate-nodejs)](https://github.com/anudeepreddy/dialogflow-webhook-boilerplate-nodejs) **or** just click on the run in gitpod button in my repo. (If you do this you have to fork it from the workspace so that you can commit your own changes to your repo).
98-
* Now you can just prefix your repo url with "https://gitpod.io/#". This should take you to Gitpod and start your workspace. The workspace take a little while to start.
99-
* Once the workspace is running you should see something like this.
104+
105+
- Fork my [repo (dialogflow-webhook-boilerplate-nodejs)](https://github.com/anudeepreddy/dialogflow-webhook-boilerplate-nodejs) **or** just click on the run in gitpod button in my repo. (If you do this you have to fork it from the workspace so that you can commit your own changes to your repo).
106+
- Now you can just prefix your repo url with "https://gitpod.io/#". This should take you to Gitpod and start your workspace. The workspace take a little while to start.
107+
- Once the workspace is running you should see something like this.
100108

101109
![Gitpod Workspace](https://res-2.cloudinary.com/anudeepc/image/upload/q_auto/v1/blog-images/Annotation-2019-06-25-171555.png)
102110

103-
* If you notice the Node app is already running in the first terminal. This is automated by a Gitpod configuration file. And the webhook URL is printed on to the second terminal. All the dependencies that are required are also installed while creating the workspace.
111+
- If you notice the Node app is already running in the first terminal. This is automated by a Gitpod configuration file. And the webhook URL is printed on to the second terminal. All the dependencies that are required are also installed while creating the workspace.
104112

105113
![Gitpod integrated Linux Terminals](https://res-5.cloudinary.com/anudeepc/image/upload/q_auto/v1/blog-images/Annotation-2019-06-25-171555-crop.png)
106114

107-
* Now that the webhook is running and i presume that you already have your agent on Dialogflow (If not create an agent), Next thing you need to do is to copy the webhook URL from the terminal and paste it in the Fulfillments section in the Dialogflow Console.
115+
- Now that the webhook is running and i presume that you already have your agent on Dialogflow (If not create an agent), Next thing you need to do is to copy the webhook URL from the terminal and paste it in the Fulfillments section in the Dialogflow Console.
108116

109117
![Dialogflow console Fullfillments section](https://res-5.cloudinary.com/anudeepc/image/upload/q_auto/v1/blog-images/Annotation-2019-06-25-172359.png)
110118

111-
112-
* Open the index.js file which contains the code for the webhook.
119+
- Open the index.js file which contains the code for the webhook.
113120

114121
![File index.js which contains the source code for the webhook](https://res-1.cloudinary.com/anudeepc/image/upload/q_auto/v1/blog-images/carbon--1-.png)
115122

@@ -122,25 +129,26 @@ We will be adding the following code to display a card when the new intent is in
122129

123130
Replace the URL's and other contents in the code and stop the previous instance of the app from running and start it again after you have made changes to the code by running `npm start` in the terminal.
124131

125-
* To test your action you can click on **See how it works in Google Assistant** in the Dialogflow console.
132+
- To test your action you can click on **See how it works in Google Assistant** in the Dialogflow console.
126133

127134
![See how it works in Google Assistant](https://res-3.cloudinary.com/anudeepc/image/upload/q_auto/v1/blog-images/Annotation-2019-06-28-175558.png)
128135

129-
* Invoking the intent would give you response similar to this.
136+
- Invoking the intent would give you response similar to this.
130137

131138
![Response on invoking the intent](https://res-5.cloudinary.com/anudeepc/image/upload/q_auto/v1/blog-images/Screenshot_20190628-181019.png)
132139

133140
Refer to the links below to add your own functionalities.
134141

135142
## Links to Refer
136-
* If you would like to learn more about the actions-on-google library, you can find it here - https://www.npmjs.com/package/actions-on-google
137-
* Go through these examples - https://developers.google.com/actions/samples/github
138-
* Rich responses example - https://github.com/actions-on-google/dialogflow-conversation-components-nodejs
143+
144+
- If you would like to learn more about the actions-on-google library, you can find it here - https://www.npmjs.com/package/actions-on-google
145+
- Go through these examples - https://developers.google.com/actions/samples/github
146+
- Rich responses example - https://github.com/actions-on-google/dialogflow-conversation-components-nodejs
139147

140148
## Conclusion
141149

142-
Gitpod can make your life much simpler by automating your development setup just by adding a simple configuration file to your repo. You can refer to the Gitpod [Docs](https://www.gitpod.io/docs/) to learn more about the platform. Gitpod lets you work with unlimited workspace but with 100hrs/month runtime. It also provides Personal and unlimited plans as well. If you are a student then you can claim Gitpod Unlimited plan for just $9.
150+
Gitpod can make your life much simpler by automating your development setup just by adding a simple configuration file to your repo. You can refer to the Gitpod [Docs](https://www.gitpod.io/docs/) to learn more about the platform. Gitpod lets you work with unlimited workspace but with 100hrs/month runtime. It also provides Personal and unlimited plans as well. If you are a student then you can claim Gitpod Unlimited plan for just \$9.
143151

144152
![Animated character waving hand with a smile](https://res-3.cloudinary.com/anudeepc/image/upload/q_auto/v1/blog-images/character.gif)
145-
# Happy coding with Gitpod ✨
146153

154+
# Happy coding with Gitpod ✨

src/blog/continuous-dev-environment-in-devops.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Getting our dev environments into a ready-to-code state is usually still done ma
1818
**Continuous dev environments** are a crucial part in a fully optimized DevOps toolchain, that allow to instantaneously spin up a ready-to-code development environment from any git state. Continuous dev environments reduce friction in onboarding and task switching and improves reproducibility across the project.
1919

2020
## Automated Dev Environments
21+
2122
Automating dev environments is not new and usually focusses on the initial setup, but that doesn't quite cut it. Of course, we all have felt the pain of being on-boarded in a new project, spending the first week figuring out what tools to install and how to configure them correctly. Manually setting up a dev environment is a waste of energy. Surprising that we still do such things, given that we developers are usually busy automating everything else in the world.
2223

2324
![disposable dev environments](./continuous-dev-environment-in-devops/gears.jpg)
@@ -67,15 +68,17 @@ The Theia IDE open-source project is fully configured with continuously prebuilt
6768
![Theia in Gitpod](./continuous-dev-environment-in-devops/theia.png)
6869

6970
## But my environment is different than those from my teammates!
71+
7072
Yes, of course, there are personal preferences like themes, keybindings, or even one or the other tool. Some developers heavily use command-line tools and have very advanced configurations. Others use particular VS Code extensions that improve their workflow significantly.
7173

7274
![Individual](./continuous-dev-environment-in-devops/share.jpg)
7375

7476
> Why don't we share all that goodness within the team?
7577
76-
While [Gitpod](/) lets you have user-specific settings, we see an opportunity in sharing the wisdom within the team to ***build a perfect, friction-free setup for everyone***. This way, you can share your impressive terminal skills and configuration with your team, and you might learn a new thing or two as well.
78+
While [Gitpod](/) lets you have user-specific settings, we see an opportunity in sharing the wisdom within the team to **_build a perfect, friction-free setup for everyone_**. This way, you can share your impressive terminal skills and configuration with your team, and you might learn a new thing or two as well.
7779

7880
## The missing piece in DevOps
81+
7982
I'm pretty sure, automated ready-to-code dev environments will become mainstream. The advantages and implications are just too good to be ignored. Everyone who has understood and experienced the benefits of a proper DevOps toolchain should understand how providing dev environments on-demand completes that experience. Ironing out that last area of non-reproducible and very annoying yak-shaving should be high on our todo list as it will improve developer productivity drastically.
8083

8184
Gitpod is available [to open-source projects for free and affordable for commercial projects](/pricing), through the Saas offering (Gitpod.io). [Gitpod Enterprise](/pricing#enterprise) will soon be released, allows self-hosting Gitpod on any Kubernetes cluster, and integrates with GitHub Enterprise, GitLab, Jenkins, JIRA and other tools in your DevOps toolchain.

0 commit comments

Comments
 (0)