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™
A Python library for the Docker Engine API

Docker SDK for Python A Python library for the Docker Engine API. It lets you do anything the docker command does, but from within Python apps – run c

Docker 6.1k Jan 03, 2023
a discord bot for searching your movies, and bot return movie url for you :)

IMDb Discord Bot how to run this bot. the first step you must create prefixes.json file the second step you must create a virtualenv if you use window

Mehdi Radfar 6 Dec 20, 2022
A file-based quote bot written in Python

Let's Write a Python Quote Bot! This repository will get you started with building a quote bot in Python. It's meant to be used along with the Learnin

0 Jan 20, 2022
🐍 The official Python client library for Google's discovery based APIs.

Google API Client This is the Python client library for Google's discovery based APIs. To get started, please see the docs folder. These client librar

Google APIs 6.2k Jan 08, 2023
An unofficial Python wrapper for the 'Binance exchange REST API'

Welcome to binex_f v0.1.0 many interfaces are heavily used by myself in product environment, the websocket is reliable (re)connected. Latest version:

DeepLn 2 Jan 05, 2022
Join & Leave spam for aminoapps using aminoboi

JLspam.py Join & Leave spam for https://aminoapps.com using aminoboi Instalação apt-get update -y apt-get upgrade -y apt-get install git pkg install

Moleey 1 Dec 21, 2021
Using AWS Batch jobs to bulk copy/sync files in S3

Using AWS Batch jobs to bulk copy/sync files in S3

AWS Samples 14 Sep 19, 2022
Discord E-Store Bot

A delivery bot for Discord, works like Amazon where real users can pack & deliver orders in different servers!

Amit Pathak 2 Jan 28, 2022
Bot to notify when vaccine appointments are available

Vaccine Watch Bot to notify when vaccine appointments are available. Supports checking Hy-Vee, Walgreens, CVS, Walmart, Cosentino's stores (KC), and B

Peter Carnesciali 37 Aug 13, 2022
Automatically load stolen cookies from ChromePass

AutoCookie - Automatically loading stolen cookies from ChromePass View Demo · Report Bug · Request Feature Table of Contents About the Project Getting

darkArp 21 Oct 11, 2022
An Undertale RPG Discord bot to fight monsters, bosses, level up and duel with other players

UNDERTALE-RPG An Undertale RPG Discord bot to fight monsters, bosses, level up and duel with other players!. Explanation you can collect gold which is

2 Oct 21, 2021
Clippin n grafting Backend

Clipping' n Grafting Presenting you, 🎉 Clippin' n Grafting 🎉 , your very own ecommerce website displaying all your artsy-craftsy stuff. Not only the

Google-Developer-Student-Club-ISquareIT (GDSC I²IT) 2 Oct 22, 2021
A bot written in python that send prefilled Google Forms. It supports multithreading for faster execution time.

GoogleFormsBot https://flassy.xyz https://github.com/Shawey/GoogleFormsBot Requirements: os (Default) ast (Default) threading (Default) configparser (

Shawey 1 Jul 10, 2022
Python Twitter API

Python Twitter Tools The Minimalist Twitter API for Python is a Python API for Twitter, everyone's favorite Web 2.0 Facebook-style status updater for

Mike Verdone 2.9k Jan 03, 2023
Python lib for Embedly

embedly-python Python library for interacting with Embedly's API. To get started sign up for a key at embed.ly/signup. Install Install with Pip (recom

Embedly 80 Oct 05, 2022
DongTai API SDK For Python

DongTai-SDK-Python Quick start You need a config file config.json { "DongTai":{ "token":"your token", "url":"http://127.0.0.1:90"

huoxian 50 Nov 24, 2022
Create a Neo4J graph of users and roles trust policies within an AWS Organization.

AWS_ORG_MAPPER This tool uses sso-oidc to authenticate to the AWS organization. Once authenticated the tool will attempt to enumerate all users and ro

Ruse 24 Jul 28, 2022
Stream Telegram files to web

Telegram File Stream Bot A Telegram bot to stream files to web Demo Bot » Report a Bug | Request Feature Table of Contents About this Bot Original Rep

Wrench 572 Jan 09, 2023
✨ Music&Video Userbot

🎶 Fizi - UserBot 🎶 🤖 Telegram UserBot Untuk Memutar Lagu Dan Video Di Obrolan Suara Telegram. ✨ Didukung Oleh PyTgCalls Pyrogram 📝 Persyaratan Pyt

F I Z I • Ɱeƙípres 4 Mar 29, 2022
Discord bot template.py

discord_bot_template.py A minimal and open-source discord.py boilerplate for kick-starting bot projects. I spend a lot of time developing bots for dif

Tarran Prior 1 Feb 24, 2022