Skip to content

Telegram bot that sends new commits on github to the chat

Notifications You must be signed in to change notification settings

celishere/Commiter

Repository files navigation

title

GitHub Stats Bot

Telegram bot that sends new commits from GitHub with statistics to the chat

Alert example
introduction

Installation

  1. Node is required.
  2. Make sure everything is correct in .env file.
  3. Run npm install to install dependencies
  4. Run npm run start

Setting up the GitHub Webhook

1. For repository:

Go to repository settings and select webhooks:

Example url
https://github.com/YOUR_USERNAME/YOUR_REPO/settings/hooks

title

- Create webhook with your URL.
- Set content type to application/json

You can choose which events you will receive, we only need the "Pushes" event

Show webhook settings

title


2. For organisation:

Go to organisation settings and select webhooks:

Example url
https://github.com/YOUR_ORGANISATION/settings/hooks

title

- Create webhook with your URL.
- Set content type to application/json

You can choose which events you will receive, we only need the "Pushes" event

Show webhook settings

title

Getting GitHub Key

  1. Go to account settings, go down and select Developer Settings

title

  1. Go to Fine-grained tokens section
  2. Click on Generate new token button
  3. Create a new token.

IMPORTANT!

If you want to create a token for an organization, then you need to enable this feature in the organization settings.

Show details https://github.com/organizations/YOUR_ORGANISATION/settings/personal-access-tokens

title

Then, select in 'Resource Owner' your organisation

Docker

Build and deploy with Docker

# build image
docker build . -t webhook

# check image
docker images webhook:latest

# run container
docker run webhook

Build and deploy with docker-compose

# build and start service
docker-compose up --build

# stop service and remove artifacts
docker-compose down

About

Telegram bot that sends new commits on github to the chat

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published