Edit on GitHub

gitomator-make-access-permissions

Set who (user or team) has what permissions (e.g. read or write) to which repo.

Usage:

 $ gitomator-make-access-permissions REPOS-CONFIG

Minimal configuration

Specify who (e.g. GitHub usernames) gets access (read-only, by default) to which repo.

repos:
  - repo-001: Alice
  - repo-002: Bob
  - repo-003: Charlie
  - repo-004: Dave
  # ...

Multiple users per repo

You can also specify multiple users per repo (e.g. group assignments):

repos:
  - repo-001: [Alice, Bob]
  - repo-002: [Charlie, Dave, Eva]
  - repo-003: [Frank, George]

And mix the two formats:

repos:
  - repo-001: [Alice, Bob]
  - repo-002: Charlie
  - repo-003: [Dave, Eva]

Permission type

Specify permissions other than default one (read-only):

repos:
  - repo-001: Alice
  - repo-002: { Bob: write }
  - repo-003: { Charlie: write }
  - repo-004: Dave

As you might expect, you can specify multiple users per repo:

repos:
  - repo-001: { Alice: read , Bob: write }
  - repo-002: { Charlie: write, Dave: write }

Which can also be specified as:

repos:
  - repo-001:
     - Alice: read
     - Bob: write
  - repo-002:
     - Charlie: write
     - Dave: write

Default access permission

You can specify the default_access_permission in the config file:

default_access_permission: write
repos:
  - repo-001: Alice
  - repo-002: Bob
  - repo-003: Charlie
  - repo-004: Dave
  # ...

Team Permissions

The names in the configuration file can refer to user and/or teams.

When using the update-access-permissions, you can specify the --permission-type option, which can be one of the following three options:

  • user - The default, treat names as user names.
  • team - Treat names as team names.
  • mixed - The script will first check if a team with the given name exists. If no such team exists, treat the name as a username.