create-probot-app
is a command line (CLI) Node.js application that generates a new Probot app with everything you need to get started building. π·π½β
More specifically, this command line interface allows you to select from our pre-defined blueprints to choose a basic working example to start from.
Make sure you've got Node.js installed on your workstation, then open your terminal and type the following command:
-
if you're using
npm
(the package manager bundled withNode.js
):npx create-probot-app my-first-app
-
if you're using Yarn:
yarn create probot-app my-first-app
and follow the instructions printed on the terminal as you go. create-probot-app
will then take care of the heavy lifting required to setup a Probot app development environment, with proper folder structure, and even installing all the basic Probot
dependencies.
See the Probot docs to get started running your app locally.
Thanks goes to these wonderful people (emoji key):
Maxim Devoir π» π |
Alexander Fortin π» |
Bex Warner π» π |
Tommy Byrd π» |
Jason Etcovitch π» |
This project follows the all-contributors specification. Contributions of any kind welcome!
###Gabriel Bot App Configuration Set up
Ensure that you have the required versions of Node.js (at least 18.0.0) and npm installed. Run the following commands to check:
node -v
npm -v
If the versions are not as required, download and install the latest version of Node.js from nodejs.org.
Sometimes, clearing the npm cache can resolve the issue. Lets Run:
npm cache clean --force
Try installing create-probot-app
globally:
npm install -g create-probot-app
Then try running the command again:
create-probot-app my-first-app
When the command is run; we see a series of output and a dir
with the name of the app is created as shown in the below
App is successfully created;
Here we can see the details of the newly created dir
and the contents of the index.js
file
Run the following command to start the app
cd my-first-app
npm start
When you click on Register GitHub App
should get an error that says
This is because this App is not created using a Manifest file
###Step 6: Configuring the App
To run your app in development, you will need to configure a GitHub App's APP_ID, PRIVATE_KEY, WEBHOOK_SECRET, and WEBHOOK_PROXY_URL in order to receive webhooks to your local machine.
On your local machine, copy .env.example
to .env
in the same directory. We're going to be changing a few things in this new file.
Go to smee.io
and click Start a new channel. Set WEBHOOK_PROXY_URL
to the URL that you are redirected to.
When this is done; add the smee
client to your local machine.
We need the smee
to send payloads to our local machine
Run the following command
npm install --global smee-client
Then the smee command will forward webhooks from smee.io to your local development environment.
smee -u <https://your webhook-proxy-url>