Welcome to the GitHub Bot Template! 🤖
This repository provides a robust template for building your own GitHub bot using Probot and TypeScript. The bot automates common workflows like handling issues, pull requests, and notifications while being highly extensible.
- 📝 Issue Automation: Automatically triage issues with labels, comments, and assignments.
- 🔍 Pull Request Workflow: Streamline code reviews with reviewer assignment, comments, and more.
- 📣 Notifications: Notify contributors and maintainers about important events.
- 🔧 Extensible and Modular: Easily add new functionality with a service-based architecture.
- 🌟 TypeScript Support: Take advantage of type safety and modern JavaScript features.
Follow these steps to get your bot up and running:
git clone https://github.com/nexoscreation/bot-github-template.git
cd bot-github-template
npm install
Create a .env
file based on the provided .env.example
:
APP_ID=your_app_id
PRIVATE_KEY=path_to_private_key.pem
WEBHOOK_SECRET=your_webhook_secret
GITHUB_TOKEN=your_personal_access_token
npm start
Use a tool like ngrok to expose your bot locally:
ngrok http 3000
Write unit and integration tests to ensure the bot works as expected:
- Unit tests are located in
test/unit/
. - Integration tests are located in
test/integration/
.
Run tests with:
npm test
Ensure code quality using ESLint:
npm run lint
Compile the TypeScript code to JavaScript:
npm run build
We 💖 contributions! If you'd like to contribute:
- Fork the repo and create your branch (
git checkout -b feature/AmazingFeature
). - Commit your changes (
git commit -m 'Add some AmazingFeature'
). - Push to the branch (
git push origin feature/AmazingFeature
). - Open a Pull Request.
For detailed guidelines, see CONTRIBUTING.md
.
This repository is licensed under the MIT License. See LICENSE.md
for more information.
- Found this template helpful? Give us a ⭐ on GitHub!
- Questions? Open an issue or join the discussion in
Discussions
.
- Thanks to the Probot team for their amazing framework.
- Inspired by the open-source community.