Synchronize GitHub labels across organization repositories
Imagine that you have lot of repositories in your account and you want to have in all repositories the same label names, descriptions and colors. You can prepare labels in one repository and then use this repository as reference one. This tool will synchronize these labels and create in all other organization repositories.
This tool is written in .Net Core 2.1 and using Octokit.Net
accessible here on GitHub
Synchronizer working well for cloud GitHub.com
and also for on-premise version GitHub Enterprise
. For GitHub.com
use -uri=https://github.com/
parameter
Open command prompt and execute with all parameters.
Example when we want synchronize labels across all organization repositories:
MalikP.GitHub.LabelSynchronizer -uri=https://github.domain.com/ -token=<personalToken> -source-org=<OrganisationName> -source-repo=<RepositoryName> [-target-org=<OrganisationName>] [-strict=<true|false>]
Example when we want synchronize labels only in specific repository from specific repository:
MalikP.GitHub.LabelSynchronizer -uri=https://github.domain.com/ -token=<personalToken> -source-org=<OrganisationName> -source-repo=<RepositoryName> [-target-org=<OrganisationName>] -target-repo=<RepositoryName> [-strict=<true|false>]
or when repositories are not in the same organization:
MalikP.GitHub.LabelSynchronizer -uri=https://github.domain.com/ -token=<personalToken> -source-org=<OrganisationName> -source-repo=<RepositoryName> -target-org=<OrganisationName> -target-repo=<RepositoryName> [-strict=<true|false>]
-uri=
- this parameter defines GitHub server Uri
-strict=
- this parameter defines if synchronization will be strict or not. Strict means that synchronizer will delete, update, create labels
-token=
- this parameter defines personal access token
-source-org=
- defines organization name in which reference repository is created
-source-repo=
- defines name of reference repository used as label source
-target-org=
- defines organization name in which target repository is created. When is not defined then is expected that both source and target repositories are in the same organization
-target-repo=
- defines name of repository used as label target