Github Telegram Bot is a php bot for notifying Events from your github repository.
This is the introduction section and a brief description is provided within this section.
Get Instant Notifications for
- Pushes
- Pull Request(open)
- Comment
- Issue(open)
- Issue(close)
- Merge
- Add @BotFather to start conversation.
- Type
/newbot
and @BotFather will ask the name for your bot. - Choose a cool name, for example
My Github Bot
and hit enter. - Now choose a username for your bot. It must end in bot, for example
GithubBot
orGithub_Bot
. - If succeed, @BotFather will give you API key to be used in this bot.
-
Create a Account on Heroku
-
Click
Create New App
in Heroku Dashboard -
Enter App Name and click on create app
-
Now install Heroku CLI on your Computer Instuctions
-
Now open your terminal and run command
git clone https://github.com/albinvar/Github-Telegram-Bot.git
-
It will download Latest codes for you in your Device
-
Now change the directory to test using command
cd test
-
Now Login into Heroku CLI using command
heroku login -i
now enter your login details and hit Enter -
After Login run this command in terminal
heroku git:remote -a appName
here appName will be your app's name that you choose while creating the app. -
Now run follow commands in termial to install packages
heroku buildpacks:add heroku/php
-
Now run this command in your terminal
git push heroku master
, if this gives an error try thisgit push -f heroku master
-
All done now it will take time to complete, after that you can visit your domain shown in terminal.
Easily deploy using the button below
-
Clone the repository using git.
git clone https://github.com/albinvar/Github-Telegram-Bot.git
-
Install all pacakges using composer.
composer install
-
Now change your directory using
cd Github-Telegram-Bot
-
Start a localhost using
php -S localhost:8080
-
You can setup your port-forwarding method. (Services like ngrok, serveo.net)
-
Install and Configure ngrok on your localmachine.
-
Start Port-forwarding using the command
ngrok http 8080
-
Set the link with https as webhook using setWebhook.php
-
You are good to go...
-
Open
http://YOUR_DOMAIN.COM/setWebhook.php
on your server/localhost. -
It will set your webhook based on the current server address for receiving calls from Telegram API.
-
If you get a message saying "webhook set successfully". You are good to go....
-
Choose a repository on Github which you want to receive notifications.
-
Direct to repo-settings->webhooks->add webhook
-
Set the payload url ngrok/website link.
-
Select
application/x-www-form-urlencoded
and selectAll Events
-
Hit Enter and you will get all notifications from your Telegram bot
Note that : Your ngrok link will expire after sometimes. Using webhosting/vps is suggested
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
This project is certified using MIT License