Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/nexoscreation/bot-github-template

Automation bot for github , under maintaince
https://github.com/nexoscreation/bot-github-template

bot github-bot node-js typescript

Last synced: about 6 hours ago
JSON representation

Automation bot for github , under maintaince

Awesome Lists containing this project

README

        

# ๐Ÿš€ GitHub Bot Template

[![Probot](https://img.shields.io/badge/Built%20with-Probot-blue.svg)](https://probot.github.io/)
[![TypeScript](https://badgen.net/badge/Built%20with/TypeScript/blue)](https://www.typescriptlang.org/)
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE.md)

Welcome to the **GitHub Bot Template**! ๐Ÿค–
This repository provides a robust template for building your own GitHub bot using [Probot](https://probot.github.io/) 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**
```bash
git clone https://github.com/nexoscreation/bot-github-template.git
cd bot-github-template
```

### 2๏ธโƒฃ **Install Dependencies**
```bash
npm install
```

### 3๏ธโƒฃ **Set Up Environment Variables**
Create a `.env` file based on the provided `.env.example`:
```plaintext
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**
```bash
npm start
```

### 5๏ธโƒฃ **Expose the Bot (Optional)**
Use a tool like [ngrok](https://ngrok.com/) to expose your bot locally:
```bash
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:
```bash
npm test
```

### ๐Ÿ›ก๏ธ **Linting**
Ensure code quality using ESLint:
```bash
npm run lint
```

### ๐Ÿ—๏ธ **Build**
Compile the TypeScript code to JavaScript:
```bash
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`](docs/contributing.md).

---

## ๐Ÿ“œ **License**

This repository is licensed under the MIT License. See [`LICENSE.md`](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`](https://github.com/nexoscreation/bot-github-template/discussions).

---

## ๐Ÿ’ก **Acknowledgments**

- Thanks to the [Probot](https://probot.github.io/) team for their amazing framework.
- Inspired by the open-source community.