Skip to content

nexoscreation/bot-github-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

69 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ GitHub Bot Template

Probot TypeScript License: MIT

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.


🎯 Features

  • πŸ“ 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.

πŸš€ Getting Started

Follow these steps to get your bot up and running:

1️⃣ Clone the Repository

git clone https://github.com/nexoscreation/bot-github-template.git
cd bot-github-template

2️⃣ Install Dependencies

npm install

3️⃣ Set Up Environment Variables

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

4️⃣ Run the Bot

npm start

5️⃣ Expose the Bot (Optional)

Use a tool like ngrok to expose your bot locally:

ngrok http 3000

πŸ› οΈ Development

πŸ§ͺ Testing

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

πŸ›‘οΈ Linting

Ensure code quality using ESLint:

npm run lint

πŸ—οΈ Build

Compile the TypeScript code to JavaScript:

npm run build

πŸ‘₯ Contributing

We πŸ’– contributions! If you'd like to contribute:

  1. Fork the repo and create your branch (git checkout -b feature/AmazingFeature).
  2. Commit your changes (git commit -m 'Add some AmazingFeature').
  3. Push to the branch (git push origin feature/AmazingFeature).
  4. Open a Pull Request.

For detailed guidelines, see CONTRIBUTING.md.


πŸ“œ License

This repository is licensed under the MIT License. See LICENSE.md for more information.


🌟 Support

  • Found this template helpful? Give us a ⭐ on GitHub!
  • Questions? Open an issue or join the discussion in Discussions.

πŸ’‘ Acknowledgments

  • Thanks to the Probot team for their amazing framework.
  • Inspired by the open-source community.