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.
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: