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™
Who are we? We are the Hunters of all Torrent in this world.🗡️.Fork from SlamDevs

MIRROR HUNTER This Mirror Bot is a multipurpose Telegram Bot writen in Python for mirroring files on the Internet to our beloved Google Drive. Repo la

Anime Republic 130 May 28, 2022
A modular Telegram group management bot running with Python based on Pyrogram.

A modular Telegram group management bot running with Python based on Pyrogram.

Jefanya Efandchris 1 Nov 14, 2022
VideocompBot - This is TG Video Compress BoT. Prouduct By BINARY Tech 💫

VideocompBot - This is TG Video Compress BoT. Prouduct By BINARY Tech 💫

1 Jan 04, 2022
Kodi script for proper Australian weather data

Kodi Oz Weather weather.ozweather Script for Kodi for high quality Australian weather data sourced directly from the BOM. Available from the Kodi offi

Jeremy Daalder 5 Nov 24, 2022
ThetaGang is an IBKR bot for collecting money

💬 Join the Matrix chat, we can get money together. Θ ThetaGang Θ Beat the capitalists at their own game with ThetaGang 📈 ThetaGang is an IBKR tradin

Brenden Matthews 1.5k Jan 08, 2023
Monetize your apps with KivAds using Google AdMob api.

KivAds(WIP) Monetize your apps with KivAds using Google AdMob api. KivAds uses the latest version of Google AdMob sdk(version 20.0.0). KivAds exposes

Guhan Sensam 16 Nov 05, 2022
Uses discords api to see if a token has a valid payment method.

Discord Payment Checker Uses discords api to see if a token has a valid payment method. Report Bug · Request Feature Features Checks tokens Checks all

dropout 10 Dec 01, 2022
Kang Sticker bot

Kang Sticker Bot A simple Telegram bot which creates sticker packs from other stickers, images, documents and URLs. Based on kangbot Deploy Credits: s

Hafitz Setya 11 Jan 02, 2023
Binance Futures Client

Binance Futures Client

4 Aug 02, 2022
Python Client for Instagram API

This project is not actively maintained. Proceed at your own risk! python-instagram A Python 2/3 client for the Instagram REST and Search APIs Install

Facebook Archive 2.9k Jan 01, 2023
Shedding a new skin on Dis-Snek's commands.

Molter - WIP Shedding a new skin on Dis-Snek's commands. Currently, its goals are to make message commands more similar to discord.py's message comman

Astrea 7 May 01, 2022
A self-hosted Discord music bot.

Cassette A self-hosted Discord music bot. Requirements py-cord pynacl pytube Setup Intended to be hosted on Heroku. Fork or clone this repo. Create a

Lohan 8 Apr 28, 2022
Python wrapper for GitHub API v3

Squeezeit - Python CSS and Javascript minifier Copyright (C) 2011 Sam Rudge This program is free software: you can redistribute it and/or modify it un

David Medina 207 Oct 24, 2022
Clash of Clans v6.253 private server written in python

cocps Clash of Clans v6.253 private server written in python how2play download server files download Patched APK run Main.py and play Authors Patched

5 Aug 28, 2022
McTrade is a bot exploiting Binance API, open source! built in python !

Open Source Crypto Trading Bot using Binance API Report Bug · Request Feature Table of Contents About The Project Built With Getting Started Prerequis

Raphael Cohen 5 Jul 17, 2022
"zpool iostats" for humans; find the slow parts of your ZFS pool

Getting the gist of zfs statistics vpool-demo.mp4 The ZFS command "zpool iostat" provides a histogram listing of how often it takes to do things in pa

Chad 57 Oct 24, 2022
Decode the Ontario proof of vaccination QR code

Decode the contents of the Ontario Proof of Vaccination (the "Smart Health Card QR Code") Output This is from my QR code, hopefully fully redacted alt

Wesley Ellis 4 Oct 22, 2021
This discord bot will help you to control your target through PickleC2

PickleC2-Bot This discord bot will help you to control your target through PickleC2 WHAT's a PickleC2? PickleC2 is a simple C2 framework written in py

4 Jun 25, 2022
A Multi-Tool with 30+Options.

A Multi-Tool with 30+Options.

Mervin404 15 Apr 12, 2022
Wanna play on the Overwatch NA servers?

OverwatchRegionSwapper-NA- Wanna play on the Overwatch NA servers? Use at you own risk. LIST OF IPs EU Netherlands: From: 5.42.168.0 to: 5.42.175.255

1 Jun 08, 2022