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/nexoslabs/bot-github-template.git
cd bot-github-templatenpm 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 testEnsure code quality using ESLint:
npm run lint
Compile the TypeScript code to JavaScript:
npm run build
We โค๏ธ contributions! Follow these steps to contribute:
- ๐ด Fork the repository
- ๐ฟ Create a new 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
- Thanks to the Probot team for their amazing framework.
- Inspired by the open-source community.
This project is licensed under The UnLicense See the LICENSE file for details.
๐ฌ Join us on Discord: Click Here
๐ฆ Follow on Twitter: @nexoslabs
๐ง Email: [email protected]
Made with โค๏ธ by the @nexoslabs Team