Coder Social home page Coder Social logo

el-take-2's Introduction

Submarine

This program iterates over a list of 'consumer' github url's looking for submodules. When it finds a match, it checks the current commit sha of the submodule repo against the commit of the submodule in the consumer repo. If they differ, and there is no matching open PR, the repo is cloned and a commit is created on a new branch and pushed to the remote. A PR is then created.

Pre-reqs

If you are comfortable setting up python virtenv and willing to export env vars by hand, you can skip installing direnv. But it really makes things easier...

Setup

Create config/list.txt as shown below and update it with one or more repos containing submodules. You can choose which submodules are checked.

  $ cp envrc.example .envrc
  $ direnv allow
  $ direnv edit .envrc
  # update this line with your github access token.
  # export GITHUB_TOKEN="_YOUR_GITHUB_ACCESS_TOKEN_"

  $ mkdir config
  $ cp list.txt.example config/list.txt

  $ pip install pygithub

Run

  $ ./submarine.py

Production

Add a crontab entry to run the script at the desired interval. Given the requirements, this is a bit tricky. Googling will reveal some ways to run tasks every N weeks using a wrapper script.

If you have ssh access to production servers/containers, this above command can be manually run as needed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.