Skip to content

Automate the creation & environment provisioning of new GH repository.

Story

As a template user, I would like to use a script that automatically creates a new repo & environments, So that I can set up the project repo, environments, and environment variables with one command.

Solution

This builds on (or in some sense precedes) #134. Because the proposed scripts in #134 would fail without a GitHub repo and environments, it came up that it might be nice if some script could create the two prerequisites for the user.

The GitHub CLI does not currently provide a method for creating environments directly, but it does provide a handy gh api catch-all which is kind of like curl with all the necessary authorizations handled for you.

### Tasks
- [ ] Script initiates repo using `gh repo create`, passing control to `gh` to collect necessary info with its prompts
- [ ] Script creates `staging` and `production` environments with API call using `gh api`.

Acceptance Criteria

  • can create github repo & environments with a single script
  • could perhaps include as an option to #134.