DEV Community

Cover image for Probot - The Framework for Github Apps
Giuliano1993
Giuliano1993

Posted on

Probot - The Framework for Github Apps

Good morning everyone and happy MonDEV!

I hope as always you had a good weekend, spending it with some good relaxation and disconnecting a bit; every now and then it's really necessary πŸ˜€

But now here we are ready for a new week and with a new tool to experiment with a bit!

Have you ever noticed that on many well-maintained Open Source repositories there are bots or small automations that may give some preliminary indications when you open a PR or a new issue, or that react to certain events?

If you've tinkered around with GitHub, you've surely seen, in addition to the APIs, also the various webhooks and the possibility of creating GitHub Apps installed for your entire profile or related to specific repos.

Certainly creating a GitHub app is very feasible! However, as often happens, having to create the whole structure from scratch based on the basic tools provided can be daunting if we don't have enough time to dedicate to it. Something that could deprive us of indulging in some curiosity if delving into that part of the documentation is not among our current goals.

Here's where tools like today's come in!

Today we talk about probot.github.io which, by their own words, "Is a framework for building GitHub apps in Node.js". Briefly, Probot handles all the part of receiving events from webhooks, facilitating the management of the resulting information and the reaction accordingly, thus focusing only on the development phase of our functionalities.

With a simple command from the terminal, it makes it possible to create our first working app, listening to the webhooks launched by our repos on which the application itself is installed.

Launching the command:

npx create-probot-app my-first-app

you'll go through a short setup that will create the project folder and all the basic structure, also installing the necessary dependencies. After that you can enter your application folder and launch

npm start

to run your new app locally, where you'll receive instructions on the last steps to follow to make it actually work.

Within 5 minutes, you can have your development environment ready to test your personal Github App!

At this link you can find all the precise instructions on starting local development, while here all the information regarding the deployment of this app on any cloud provider, to be able to use it continuosly (not just when it is running locally) and make it available to others!

In case you are particularly proud of what you have developed, you can also add your new project to the list of featured apps on the site through a PR ;)

With this tool, there's certainly more than a few interesting ideas that can be realized ;) I hope you'll take advantage of it: I'm planning mine to organize the work on make-js-component and serverMan, so you'll probably see it in action soon! Have you ever created a GitHub app, with or without tool assistance?

As always let me know, in the meantime, have a good start to the week and Happy Coding 0_1

Top comments (0)