From the course: Building GitHub Bots
What are GitHub bots?
From the course: Building GitHub Bots
What are GitHub bots?
- [Instructor] In this era of automation, it has become indispensable to automate repetitive tasks in every part of the software development lifecycle. From design to development, to continuous integration, and even continuous deployment, automating a few tasks can help you save time to focus on business needs, and requirements, and core use cases that need human intelligence more. In this video, we will briefly highlight the use cases, benefits, the what and why about GitHub bots. So what are GitHub bots? I'd like to draw your attention to the second part of this phrase, which contains the word bot. Bot is short for robot. It is evident that it is not a real human, but a bot that automates tasks on a human's behalf. Coming to the full word, GitHub bots, these are applications that run automation on GitHub using GitHub webhooks and APIs. Imagine having an open-source repository, and you have a continuous integration set in place that also flags any comment that doesn't meet a certain criteria. Say, the comment message should not exceed 50 or 72 characters. On a side note, this is a good practice when it comes to writing a comment message. Even if you mention it on your Read Me or your contributing docs, there is a high possibility that the contributors might miss this. As a maintainer, it is a pain to go to every pull request and mention this rule, and ask them to edit the comment message to adhere to this rule. Instead, you can simply automate this and have a bot in place to notify the contributors about this rule, and how to make their comment messages adhere to this rule. This is one of the plethora of tasks that a GitHub bot can do. If ever you imagine something like, what if GitHub could, that's where GitHub bots come into the picture. Coming to why we should use GitHub Bots, benefits of using GitHub bots include reducing the software development workload, improving productivity, and enabling use cases for which humans are not realistically suitable. Let's say detecting merge conflicts in hundreds of commented files. Talking about the use cases of GitHub bots, apart from the obvious automation of routine tasks, GitHub Bots aid in upholding code quality by ensuring standardization and consistency. They also aid in CI/CD and error reduction. They also ensure customization, extensibility, and scalability. They also set formatting rules and best practices. And in turn, lead to faster code reviews. Remember when you created your first pull request and wondered about a section at the end of your pull request where you see things about building, testing, and deploying your changes? That's a GitHub bot too. These GitHub bots, sometimes commonly referred to as the CI bots and/or merge bots, aid in continuous integration and continuous deployment by running a few required tests before the pull request can even be reviewed by a human. And this ensures that the pull request doesn't have any uncaught errors that may go unnoticed by a human. You can create your own versions of existing bots and extend them, tailor them to your workflows and use cases as long as you adhere to their licenses. As your project grows, you can rest assured that these bots will ensure scalability without foregoing quality. GitHub bots can also aid in code reviews. There's one going around the internet right now that uses AI to do code reviews. This one is still undergoing research and rigorous testing as far as the accuracy is concerned, and they're also creating insights into project metrics like code quality, test coverage, and contribute activity. Thus, GitHub bots can wear multiple hats to help automate and make a lot of your tasks easier for a maintainer as well as a fellow developer.
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.