Prepares satis.json config based on contents of your Github/Gitlab/Azure DevOps organization repositories, fully customizable with input file
$ make depinitiates go modules$ make testchecks the code
- https://github.com/google/go-github/v42/github used for Github communication
- https://github.com/microsoft/azure-devops-go-api used for AzDO communication
- https://github.com/xanzy/go-gitlab used for Gitlab communication
- https://gopkg.in/alecthomas/kingpin.v2 for cli input processing
$ makeprepares win/linux/mac binaries into bin folder- Use your preffered binary with following arguments
| Name | Type | Description |
|---|---|---|
--input |
string (required) | Path to input file. Defaults toinput.json. See input.example.json or below for instructions |
--output |
string (required) | Path to save the config file. Defaults tosatis.json |
See input.example.json for details. Effectively this can be full blown satis.json config even with prefilled repositories. This config is then enhanced with contents of your private repositories when you run the script.
On top of default satis configuration sources attribute is added which instruments the script how to obtain your repositories. The attribute is removed before saving the final file.
The sources attribute looks like this
{
"name": "myorg/satis",
# any other satis config
"sources": [
{
"sourceType": "gitlab",
"sourceIdent": "349181",
"sourceAuth": "GITLAB_PAT",
"exclude": [
"repository-name",
"other-repository"
]
},
#...other sources
]
}
The values of source can be of following values:
| sourceType | sourceIdent | sourceAuth | exclude | |
|---|---|---|---|---|
| Gitlab | gitlab |
group id to process349181 for https://gitlab.com/gitlab-examples |
Personal Access Token - Create one here Required scopes are api, read_api, read_repository |
Names of repositories to exclude from final satis.json |
| Github | github |
organization slugcomposer for https://github.com/composer |
Personal access token - Create one here Required scopes are repo, read_org |
Names of repositories to exclude from final satis.json |
| Azure DevOps | azdo |
full organization + project pathhttps://dev.azure.com/myorg/myproject |
Personal Access Token Link for creating access token is https://dev.azure.com/YOURORG/_usersSettings/tokensRequired scopes are Code > read |
Names of repositories to exclude from final satis.json |