A repo-watcher to watch for commits on a repo an trigger GitHub action by sending a `repository_dispatch` event to destinantion repo

Overview

repo-watcher-dispatch-sender

Forks Stars Issues LICENSE Contributors Repo Size Views

DeepSource

Join us on Telegram

This app is used to send a repository_dispatch event to the destination repo set in config.py or Environmental Variables whenver a commit is made on the upstream repo.

This setup is for my own use, please fork and make your own if you want :D

Give this repo a if you like it or it helps you!

How to use?

Set the Environmental Variables or config.py file

It's really not difficult to set this up, you just need to define the variables in config file, the varibales include the following:

  • GH_PAT: Github Personal Access Token with repo access to the destination repo. Cause you know, you can't trigger any workflow anywhere except the ones you have acess to :p
  • REPOSITORY_PAIR: The main stuff, this tells the script about source and destination repo, the source repo is the one we check commits for, destination is for sending the repository_dispatch to it. It should be in this format: : : , the source and destination should be in this format: , Example:
  • TIME_PERIOD: The time after which script should sleep for, i.e. wait before running again. It is not recommented to set it to less than 30, default is 60 minutes
  • SLEEP_TIME: The time before performing another action after one has been done, i.e. wait time between 2 consecutive requests. It is not recommented to set it to 0, default is 1 minute
  • EVENT_TYPE: The event which should be sent in repository_dispatch, read more here: docs.github.com
  • DB_URI: MongoDB URL for database usage of bot.

Choose how you want to run it

You can run it in several different ways, one of the easiest might be to use heroku.

Another option is to locally run it on you pc as it is or using docker.

Docker images can be found here: ghcr.io or Docker Hub

You can even easily build your own docker images using the provided dockerfiles!

Running using docker

You can easily use the docker image like this:

" -e REPOSITORY_PAIR=" " -e TIME_PERIOD=60 -e SLEEP_TIME=1 -e EVENT_TYPE=" " -e DB_URI=" " divideprojects/repo-watcher-dispatch-sender:latest ">
docker run -e GH_PAT="
       
        "
        -e REPOSITORY_PAIR="
       
        "
        -e TIME_PERIOD=60 -e SLEEP_TIME=1 -e EVENT_TYPE="
       
        "
        -e DB_URI="
       
        "
        divideprojects/repo-watcher-dispatch-sender:latest

or

" -e REPOSITORY_PAIR=" " -e TIME_PERIOD=60 -e SLEEP_TIME=1 -e EVENT_TYPE=" " -e DB_URI=" " ghcr.io/divideprojects/repo-watcher-dispatch-sender:latest ">
docker run -e GH_PAT="
       
        "
        -e REPOSITORY_PAIR="
       
        "
        -e TIME_PERIOD=60 -e SLEEP_TIME=1 -e EVENT_TYPE="
       
        "
        -e DB_URI="
       
        "
        ghcr.io/divideprojects/repo-watcher-dispatch-sender:latest

These is absolutely no difference between the 2 commands above, you can use any, the first one fetched image from docker hub while other one gets the image from ghcr.io

What is the use of this?

It can be whatever you want it to do, you can use it trigger automatic builds, tests, builds, and a lot of things...

FAQ

Some general questions you might stumble upon

Why can't I trigger to a specific branch on destination repo?

It's not really needed most of time, if you stiff want this feature we'll be happy to merge your pull request for it :)

Why should SLEEP_TIME should not be set to 0?

Every API has limitations, and so is the case with Github, it has a soft-limit of 60 api calls per hour, so we need to make sure that we don't hit the limits.

Owner
Divide Projects™
A simple open source projects orgainisation
Divide Projects™
Python client for Arista eAPI

Arista eAPI Python Library The Python library for Arista's eAPI command API implementation provides a client API work using eAPI and communicating wit

Arista Networks EOS+ 124 Nov 23, 2022
CyberTKR - CyberTK-API

CyberTKR - CyberTK-API

TKR 2 Apr 08, 2022
A simple tool which automate commands of discord economy bots

A simple tool which automate commands of discord economy bots. Fully configurable using an intuitive configuration made in YAML

SkydenFly 5 Sep 18, 2022
This is a tool to help people to make a bot for labelling images for machine learning projects.

labeller_images_python_telegramBOT This is a bot to help collect data for any machine learning project. It was developed using the python-telegram-bot

Diego Silveira 2 Nov 13, 2021
Plataforma para atendimento a outras empresas que necessitam de atendimento técnico.

Plataforma para atendimento a outras empresas que necessitam de atendimento técnico. É possível que os usuarios de empresas parceiras registrem solici

Kelvin Alisson Cantarino 2 Jun 29, 2022
Graviti-python-sdk - Graviti Data Platform Python SDK

Graviti Python SDK Graviti Python SDK is a python library to access Graviti Data

Graviti 13 Dec 15, 2022
Ein PY-Skript, mit dem tiled-Editor-Maps bearbeitet werden

tilesetCopyrighter Ein PY-Skript, mit dem tiled-Editor-Maps bearbeitet werden können fügt je Tileset eine custom-Property tilesetCopyright (string) hi

1 Dec 26, 2021
BeeDrive: Open Source Privacy File Transfering System for Teams and Individual Developers

BeeDrive For privacy and convenience purposes, more and more people try to keep data on their own hardwires instead of third-party cloud services such

Xuansheng Wu 8 Oct 31, 2022
Production Ontology Merging (PrOM) Framework

Production Ontology Merging (PrOM) Framework OWL 2 DL ontology merging framework tailored to the production domain Features preprocessing: translation

4 Nov 02, 2022
A Python package that can be used to download post and comment data from Reddit.

Reddit Data Collector Reddit Data Collector is a Python package that allows a user to collect post and comment data from Reddit. It is built on top of

Nico Van den Hooff 3 Jul 26, 2022
A Simple and User-Friendly Google Collab Notebook with UI to transfer your data from Mega to Google Drive.

Mega to Google Drive (UI Added! 😊 ) A Simple and User-Friendly Google Collab Notebook with UI to transfer your data from Mega to Google Drive. ⚙️ How

Dr.Caduceus 18 Aug 16, 2022
My Advent of Code solutions. I also upload videos of my solves: https://www.youtube.com/channel/UCuWLIm0l4sDpEe28t41WITA

My solutions to adventofcode.com puzzles. I post videos of me solving the puzzles in real-time at https://www.youtube.com/channel/UCuWLIm0l4sDpEe28t41

195 Jan 04, 2023
VC-Music , Playing music without bot.

VC-Userbot A Telegram Userbot to play or streaming Audio and Video songs / files in Telegram Voice Chats. It's made with PyTgCalls and Pyrogram Requir

RioProjectX 8 Aug 04, 2022
Home Assistant for Opendata CWB. Get the weather forecast of the city in Taiwan.

Home assistant support for Opendata CWB. The readme in Traditional Chinese. This integration is based on OpenWeatherMap (@csparpa, pyowm) to develop.

11 Sep 30, 2022
A multipurpose Telegram Bot writen in Python for mirroring files

Deepak Clouds Mirror Deepak Clouds Torrent is a multipurpose Telegram Bot writen in Python for mirroring files on the Internet to our beloved Google D

MR.SHAGGY 0 Dec 19, 2021
Yes, it's true :yellow_heart: This repository has 326 stars.

Yes, it's true! Inspired by a similar repository from @RealPeha, but implemented using a webhook on AWS Lambda and API Gateway, so it's serverless! If

510 Dec 28, 2022
A full-featured Python wrapper for the Onfleet API.

UPDATE: Please use Onfleet's wrapper instead. This repository is not maintained. https://github.com/onfleet/pyonfleet --- Python-Onfleet   python-onfl

Lionheart Software 11 Jan 13, 2022
Ditch Xiaomi's cloud and use a Telegram bot instead

Yi-Home_Telegram_Bot_Interface Ditch Xiaomi's cloud and use a Telegram bot instead Features Motion detection Works by monitoring a tmp file that is cr

Erli 10 Aug 18, 2022
A listener for RF >= 4.0 that prints a Stack Trace to console to faster find the code section where the failure appears.

robotframework-stacktrace A listener for RF = 4.0 that prints a Stack Trace to console to faster find the code section where the failure appears. Ins

marketsquare 16 Nov 24, 2022
Discord Token Generator based on HTTPX, makes unverified tokens and automatically joins your server! this is used for memberboosting

Discord Token Generator | 2021 Features: (1) hCaptcha Bypasser, latest hfuck.py Updated by me (2) Free Proxy Support/Scrapper (3) Custom Realistic Dat

2 Nov 30, 2021