Skip to content
This repository was archived by the owner on Aug 6, 2023. It is now read-only.

Latest commit

 

History

70 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

* fbpush

  ~fbpush~ aims to completely automate the following workflow:

  - Pushing local work to a GitHub remote
  - Waiting for GitHub triggered CI to become green
  - Fast-forward merge the local work into the main remote branch (master)
  - Clean up any leftovers

  With a microservice architecture (20+, easily 100+ repositories) it's quite important to set up automated CI to avoid
  going for YOLO whenever you pull remote changes. But at the same time getting past the CI becomes grueling work when
  you need to change something in more than one repository (e.G. fix that nasty webpack configuration mistake in your 15 scala play repositories).

  Automating the workflow for one repository opens up many possibilities:
  - Shipping code is simply a ~fbpush~ away, no mental burden of tracking the CI job or clicking around in some UI for a pull request
  - FAST FORWARD MERGES! Seriously damn these useless merge commits.
  - Shipping a change in several repositories is just a ~bash~ for loop away

** Installation
   After git clone,

   #+BEGIN_SRC bash
   sudo dotcopter dotcopter.yml apply
   #+END_SRC

   which will create a symlink in ~/usr/local/bin~

** Usage
   After pushing stuff in your repo, do

   #+BEGIN_SRC bash
   fbpush
   #+END_SRC

   This will:
   * generate a new spinoff branch and switch to it
   * push that branch to the origin remote
   * switch back to master so you can continue working
   * wait until the CI status of the spinoff branch ~HEAD~ becomes green
   * push the spinoff branch to origin/master
   * Delete the local branch and remote branch
   
  In case something blows up (e.G. CI fails) the tool will create a pull request on GitHub and point your browser at it.
  This will allow you to investigate.

** Hot tips
   Use with [[https://github.com/brocode/fw][fw foreach]] for best results (foreach supports backpressure with ~-p N)~

About

(almost) fully automated git push with pull request and CI status polling

Topics

Resources

Stars

7 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages