GitHub Bots for every open-source project
Tags: codenewbie, opensource, webdev, github
Published: 2021-06-30 06:25:33

With the explosive growth and expansion of open-source projects, the project maintainers have to be always on their feet. The longer an open-source project thrives, the more the number of issues and pull requests. And keeping track of new contributions becomes more difficult, which might result in losing out on important bug reports and feature requests. Well, no need to worry, we have bots to our rescue! 

Automation could be the key here, bots can assist in welcoming new contributors, informing them of what to expect, where to look for important information, and keeping track of their contributions. Outsourcing this labor to bots can relieve the burden on maintainers, allowing them to devote their time to more important tasks, and also helping to shape better culture and community ambiance around these open-source projects.

Let's dive in and explore some awesome GitHub bots/apps that can ease the maintainers' burden by enabling and empowering them to extend their workflows and customizing the way GitHub functions.

## Introduction to Probot
[Probot](https://probot.github.io/) is a Node.js framework used to create GitHub Apps. Probot monitors webhook events in a repository or organization, such as commenting on a pull request, creating a new issue, submitting a pull request, reviewing code, and so on. 

![Probot](https://cdn.hashnode.com/res/hashnode/image/upload/v1624989922622/2BxBCbeLN.png)

Although you can make your own [GitHub Bots](https://probot.github.io/docs/), however, for this post, we'll see the bots already existing on the Probot community platform, so no need to re-invent the wheel all over again.

## Probot apps for welcoming and inclusivity

### Welcome
[Welcome](https://probot.github.io/apps/welcome/) is a simple and easy-to-use bot to welcome new contributors to the repository using comments defined by the maintainers. It is a combination of three plugins - [new-issue-welcome](https://github.com/behaviorbot/new-issue-welcome), [new-pr-welcome](https://github.com/behaviorbot/new-pr-welcome), and [first-pr-merge](https://github.com/behaviorbot/first-pr-merge).


![Welcome Bot in Action](https://cdn.hashnode.com/res/hashnode/image/upload/v1624989975187/USt3YS59D.png)

This bot can be configured and activated by creating a `.github/config.yml` file to declare the contents of the comments. These comments can include important information like project norms, how long do the contributor can expect to wait before receiving a response, or just a generous welcome message with gifs or images, conveying warmth, enthusiasm, and gratitude.

### All Contributors Bot
[All Contributors Bot](https://probot.github.io/apps/all-contributors/) helps you recognize all the contributors, not just the ones who pushed code but also the ones who contributed to designs, documentation, etc. It uses an [emoji key](https://allcontributors.org/docs/en/emoji-key) to determine the contribution type. 

![contributors-table-small.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1624990814543/-9Dawpvtu.png)

It can be simply used to add a contributor with comments on issues or pull requests, e.g. `@all-contributors please add @tbenning for design`.

![add-contributors.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1624990820361/Qp1IB7aas6.png)

## Probot apps for enforcing community norms
### Stale Bot
[Stale Bot](https://probot.github.io/apps/stale/) helps in closing down stale issues and pull requests that have been open for a long time and have seen no particular action, hence, cutting down on the accumulation of issues and pull requests on the project. 

![Stale Bot in Action](https://cdn.hashnode.com/res/hashnode/image/upload/v1624991226159/F6sAh9HKf.png)

After a period of inactivity, an issue will be labeled as stale, and a comment may be posted to notify contributors that the Issue or Pull Request will be closed. If the Issue or Pull Request is updated, or if someone comments on it, the stale label is removed, and nothing else is done until it becomes stale again. If there is no further activity, the Issue or Pull Request will be closed automatically with an optional comment. It can be configured and enabled by adding a `.github/stale.yml` in the default branch of the repository.

### Auto Assign Bot
[Auto Assign](https://probot.github.io/apps/auto-assign/) allows you to randomly assign individual reviewers or review groups to a pull request when opened. It has to be installed and then configured using the `.github/auto_assign.yml` file on the default branch.


![demo.gif](https://cdn.hashnode.com/res/hashnode/image/upload/v1624991533164/zEHABjIqz.gif)

This helps in pointing out the responsible person for the code reviews, thus, helping in getting a quick review and response. You can also configure skip keywords such as WIP (work in progress) so that reviewers only get assigned on pull requests that are ready so that they don't have to bother unnecessarily.
 
## Probot apps for general utility

### Unfurl Links
[Unfurl Links](https://probot.github.io/apps/unfurl-links/) is a simple utility bot that helps by adding context to the links shared in the discussions. This bot comes into action whenever it detects a link in the comments and then adds more information to the bottom of the comment about the link.

![unfurl](https://cdn.hashnode.com/res/hashnode/image/upload/v1624992556810/_F9Cab5WG.png)

### Gitpod
[Gitpod](https://www.gitpod.io/) is an online IDE for GitHub that can be launched with a single click. It can be launched by prefixing any GitHub URL with `gitpod.io#`. 

![cr-gitpod-starter](https://cdn.hashnode.com/res/hashnode/image/upload/v1624992886005/CxK1ZnDq7.png)

Such links are generated by [Gitpod Bot](https://probot.github.io/apps/gitpod/) and posted as comments on issues and pull requests.

![gitpod](https://cdn.hashnode.com/res/hashnode/image/upload/v1624992907612/tSFWYtI1V.png)

It can be enabled by creating `.github/gitpod.yml` in the default branch, which can also be used to add customizations.

### Reminders
[Reminders](https://probot.github.io/apps/reminders/) can be used to set reminders on issues and pull requests that you want to ensure a revisit to. 

![reminder](https://cdn.hashnode.com/res/hashnode/image/upload/v1624993260462/3FAiRRBDz.png)

To set a reminder on any comment box on GitHub, use the `/remind` command, and you'll receive a ping when the reminder is due. The usual syntax goes like - `/remind me [what] [when]`, for example - `/remind me to deploy on Oct 10` or `/remind me next Monday to review the requirements`.

In a nutshell, being an open-source project maintainer can be tough, especially when it's not your day job. However, Probot can be a boon for such situations, as it allows them to get time-saving automation up and running very quickly. As the saying goes:

> “Most communities just happen; the best are planned.”

That's all for this article. I hope this has been a helpful and insightful read. Please comment with your valuable suggestions and feedback. Also, let me know your favorite GitHub bots or apps that you may have used.

In case you want to connect with me, follow the links below:

[LinkedIn](https://www.linkedin.com/in/pragativerma18/) | [GitHub](https://github.com/PragatiVerma18/) | [Twitter](https://twitter.com/pragati_verma18) | [Medium](https://medium.com/@itispragativerma)