Skip to content

H1D/telegram-to-github-bot

Repository files navigation

Telegram to GitHub Bot


What It Is

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

How to

You'll need to create a Telegram bot and a GitHub token.

  1. 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"
  2. 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:
  3. 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
```
  1. Run the bot. Deploy ready docker image somewhere. For example use Heroku template – Deploy. Local run example:
    docker run --env-file .env ghcr.io/h1d/telegram-to-github-bot:main
  2. Add the bot to your group(s)
  3. Start creating issues!

Deploy to Heroku

You can easily deploy this bot to Heroku by clicking the button below:

Deploy

About

Telegram bot to create GitHub via @mention.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages