Skip to content

drmaxgit/drmax-satis-generator

Repository files navigation

Dr.max Satis Generator

Prepares satis.json config based on contents of your Github/Gitlab/Azure DevOps organization repositories, fully customizable with input file

Development

  • $ make dep initiates go modules
  • $ make test checks the code

Important Dependencies

Run!

  • $ make prepares win/linux/mac binaries into bin folder
  • Use your preffered binary with following arguments

Run Options

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

Input/Configuration file

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.

Sources Configuration

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 process
349181 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 slug
composer 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 path
https://dev.azure.com/myorg/myproject
Personal Access Token
Link for creating access token is
https://dev.azure.com/YOURORG/_usersSettings/tokens
Required scopes are Code > read
Names of repositories to exclude from final satis.json