services
A tool for promoting between GitHub repositories.
This is a pre-alpha PoC for promoting versions of files between environments, represented as repositories.
Building
$ go build ./cmd/services
Running
You'll need a GitHub token to test this out.
$ export GITHUB_TOKEN=<paste in GitHub access token>
$ ./services promote --from https://github.com/organisation/first-environment.git --to https://github.com/organisation/second-environment.git --service service-a --commit-name <User to commit as> --commit-email <Email to commit as>
If the commit-name
and commit-email
are not provided, it will attempt to find them in ~/.gitconfig
, otherwise it will fail.
This will copy a single file deployment.txt
from service-a
in first-environment
to service-a
in second-environment
, commit and push, and open a PR for the change.
Testing
$ go test ./...