ideas icon indicating copy to clipboard operation
ideas copied to clipboard

Automated feature branch forking for GitHub/Heroku

Open daguar opened this issue 10 years ago • 1 comments

A micro-tool that watches a GitHub repo, and creates a Heroku instance for every new branch.

Process would look like this:

  • The user would create a base Heroku app instance (Heroku base) from the master branch
    • Heroku base would be fully configured with any necessary work up-front (example: setting of environment variables, adding of plugins)
    • Any merges/pushes to master on GitHub triggers a redeploy of the new code to Heroku base
    • Example name: appname-base.herokuapp.com
  • When the user pushes a branch called "feature-name" to GitHub, it would trigger:
    • Forking of "Heroku base" to a new app instance with the branch name appended (example: appname-feature-name.herokuapp.com)
    • Pushing of that branch's code to the feature fork (i.e., git push feature-remote-name feature-name:master)

In this way, if a user ever wants to examine a branch, they know they can head over to http://appname-branch-name.herokuapp.com and take a look.

daguar avatar May 12 '14 18:05 daguar

Sounds like it might blow through your Heroku app allowance pretty quickly. What if the tool instead spins up Heroku instances on request, and tears them down later?

When the user makes a request to appname-feature-name.example.com, the [proxy or whatever] looks to see whether there exists a matching branch, a designated Heroku app, optionally creates a new one, and routes there.

migurski avatar May 14 '14 18:05 migurski