Telegram bot to create GitHub issues simply by @mentioning
. Useful for "TDD" (Telegarm Driven Development) team styles. Comparing to annndruha/issue-github-telegram-bot needs less github permissions and is more lightweight overall.
![image](https://private-user-images.githubusercontent.com/697625/347020746-2ae5fc94-f261-42dd-b6c9-37b3c35b876b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0Nzg1MDEsIm5iZiI6MTczOTQ3ODIwMSwicGF0aCI6Ii82OTc2MjUvMzQ3MDIwNzQ2LTJhZTVmYzk0LWYyNjEtNDJkZC1iNmM5LTM3YjNjMzViODc2Yi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEzJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxM1QyMDIzMjFaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1kZDkyMzZlNjJlYmQ4ZjhmNTRiNTEwMjYwYmU5Nzc4MTU5M2M2NjMzNWY3OWE5NzRhNzM3YjVjMDdmZmY3ZjdkJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.aJtTR4TXG6vNIDPDEbue51WwLfBRaPDmhbGtAAWg648)
You'll need to create a Telegram bot and a GitHub token.
-
Create a Telegram Bot
- Go to '@BotFather'.
- Create a new bot via
/newbot
command. - Follow the instructions to set up your bot. BotFather will give you a token when your bot is created.
- Turn off 'Privacy mode' (more info here):
- Use the
/mybots
command to list your bots. - Select the bot you've just created.
- "Bot Settings" -> "Group Privacy" -> "Turn off"
- Use the
-
Generate a GitHub Personal Access Token
- If you own the repo:
- Go to your GitHub settings.
- Click on Generate new token.
- Choose
Repository access
->Only select repositories
. Select repo(s) where you want to create issues. - Add
Repository permissions
->Issues
->Read & Write
. - Click on Generate token and save the token.
- If you are a collaborator on a repo you don't own:
- Create a 'classic' token with
repo
scope – https://github.com/settings/tokens
- Create a 'classic' token with
- If you own the repo:
-
Prepare Environment Variables
Keep in mind – one bot instance – one repo. So if you want to create issues in multiple repos, you'll need to create multiple bots.
- Prepare env variables:
```sh
TELEGRAM_BOT_TOKEN=your-telegram-bot-token
GITHUB_TOKEN=your-github-token
GH_REPO=user/repo
```
- Run the bot. Deploy ready docker image somewhere. For example use Heroku template –
. Local run example:
docker run --env-file .env ghcr.io/h1d/telegram-to-github-bot:main
- Add the bot to your group(s)
- Start creating issues!
You can easily deploy this bot to Heroku by clicking the button below: