Configuration
The recommended way to configure spr is to run spr init, rather than setting config values manually. You can rerun spr init to update config at any time.
spr uses the following Git configuration values:
| config key | CLI flag | description | default1 | default in spr init2 |
|---|---|---|---|---|
githubAuthToken | --github-auth-token3 | The GitHub authentication token to use for accessing the GitHub API. | ||
githubRepository | --github-repository | Name of repository on github.com in owner/repo format | ||
githubMasterBranch | The name of the centrally shared branch into which the pull requests are merged | master | taken from repository configuration on GitHub | |
branchPrefix | --branch-prefix | String used to prefix autogenerated names of pull request branches | spr/GITHUB_USERNAME/ | |
requireApproval | If true, spr land will refuse to land a pull request that is not accepted | false | ||
requireTestPlan | If true, spr diff will refuse to process a commit without a test plan | true |
-
The config keys are all in the
sprsection; for example,spr.githubAuthToken. -
Values passed on the command line take precedence over values set in Git configuration.
-
Values are read from Git configuration as if by
git config --get, and thus follow its order of precedence in reading from local and global config files. See the git-config docs for dteails. -
spr initwrites configured values into.git/configin the local repo. (It must be run inside a Git repo.)