예제 #1
0
        public static async Task CreateOrUpdateJiraVersion(this ICakeContext context, CreateOrUpdateJiraVersionSettings settings)
        {
            ValidateJiraSettings(settings);

            if (string.IsNullOrWhiteSpace(settings.Project))
            {
                throw new ArgumentException("Project must be specified.");
            }

            if (string.IsNullOrWhiteSpace(settings.VersionName))
            {
                throw new ArgumentException("Version Number must be specified.");
            }
            await JiraClient.CreateOrUpdateJiraVersion(settings, context.Log);
        }
예제 #2
0
        public static async Task CreateJiraIssue(this ICakeContext context, CreateIssueSettings settings)
        {
            ValidateJiraSettings(settings);

            if (string.IsNullOrWhiteSpace(settings.Project))
            {
                throw new ArgumentException("Project must be specified.");
            }

            if (string.IsNullOrWhiteSpace(settings.Summary))
            {
                throw new ArgumentException("Summary must be specified.");
            }

            await JiraClient.CreateJiraIssue(settings, context.Log);
        }
예제 #3
0
        public static async Task MigrateIssuesVersion(this ICakeContext context, MigrateIssuesVersionSettings settings)
        {
            ValidateJiraSettings(settings);

            if (string.IsNullOrWhiteSpace(settings.Project))
            {
                throw new ArgumentException("Project must be specified.");
            }

            if (string.IsNullOrWhiteSpace(settings.FromVersion))
            {
                throw new ArgumentException("The source version must be specified.");
            }

            if (string.IsNullOrWhiteSpace(settings.ToVersion))
            {
                throw new ArgumentException("The target version must be specified.");
            }

            await JiraClient.MigrateIssuesVersion(settings, context.Log);
        }