protected void WriteLog(string message, ConsoleColor color) { _logger.WriteLog(message, color); }
private static Task WriteHelpAsync() { _logger.WriteLog($"{"".PadLeft(40, '#')} HELP { "".PadRight(40, '#')}", ConsoleColor.Red); _logger.WriteLog("Specify github uri (https://github.domain.com/)", ConsoleColor.Cyan); _logger.WriteLog($"{"".PadLeft(7, ' ')}-uri=<OrganisationName>", ConsoleColor.Green); _logger.WriteLog("Specify personal oauth token with rights", ConsoleColor.Cyan); _logger.WriteLog($"{"".PadLeft(7, ' ')}-token=<personalToken>", ConsoleColor.Green); _logger.WriteLog("Specify if synchronization will be strict or not. This means if also can delete labels or only create or update", ConsoleColor.Cyan); _logger.WriteLog($"{"".PadLeft(7, ' ')}-strict=<true|false>", ConsoleColor.Green); _logger.WriteLog("Specify organization where you want to sync labels", ConsoleColor.Cyan); _logger.WriteLog($"{"".PadLeft(7, ' ')}-source-org=<OrganisationName>", ConsoleColor.Green); _logger.WriteLog("Specify repository in that organization which will be source of labels", ConsoleColor.Cyan); _logger.WriteLog($"{"".PadLeft(7, ' ')}-source-repo=<RepositoryName>", ConsoleColor.Green); _logger.WriteLog("Specify organization where is located target repository", ConsoleColor.Cyan); _logger.WriteLog($"{"".PadLeft(7, ' ')}-target-org=<OrganisationName>", ConsoleColor.Green); _logger.WriteLog("Specify repository in that organiosation which will be target and wher labels will be synchronized", ConsoleColor.Cyan); _logger.WriteLog($"{"".PadLeft(7, ' ')}-target-repo=<RepositoryName>", ConsoleColor.Green); _logger.WriteLog("", ConsoleColor.Green); _logger.WriteLog("Example when we want synchronize labels across all organization repositories: ", ConsoleColor.Cyan); _logger.WriteLog($"{"".PadLeft(7, ' ')} MalikP.GitHub.LabelSynchronizer -uri=https://github.domain.com/ -token=<personalToken> -source-org=<OrganisationName> -source-repo=<RepositoryName> [-target-org=<OrganisationName>] [-strict=<true|false>]", ConsoleColor.Green); _logger.WriteLog("", ConsoleColor.Green); _logger.WriteLog("Example when we want synchronize labels only in specific repository from specific repository: ", ConsoleColor.Cyan); _logger.WriteLog($"{"".PadLeft(7, ' ')} 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>]", ConsoleColor.Green); _logger.WriteLog("", ConsoleColor.Green); _logger.WriteLog("Example when we want synchronize labels only in specific repository from specific repository and both are in different organizations: ", ConsoleColor.Cyan); _logger.WriteLog($"{"".PadLeft(7, ' ')} 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>]", ConsoleColor.Green); _logger.WriteLog($"{"".PadLeft(86, '#')}", ConsoleColor.Red); Console.ResetColor(); return(Task.CompletedTask); }