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.
Probot 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.
Although you can make your own GitHub Bots, 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.
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, new-pr-welcome, and first-pr-merge.
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 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 to determine the contribution type.
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.
Stale Bot 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.
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 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.
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.
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.
Gitpod is an online IDE for GitHub that can be launched with a single click. It can be launched by prefixing any GitHub URL with
Such links are generated by Gitpod Bot and posted as comments on issues and pull requests.
It can be enabled by creating
.github/gitpod.yml in the default branch, which can also be used to add customizations.
Reminders can be used to set reminders on issues and pull requests that you want to ensure a revisit to.
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: