Skip to content
This repository has been archived by the owner on Aug 6, 2023. It is now read-only.
/ fbpush Public archive

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

Notifications You must be signed in to change notification settings

brocode/fbpush

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

70 Commits
 
 
 
 
 
 

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,

sudo dotcopter dotcopter.yml apply

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

Usage

After pushing stuff in your repo, do

fbpush

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 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

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages