public override bool Execute() { try { IJiraProjectVersionService service = new JiraProjectVersionService(JiraUrl, JiraUsername, JiraPassword); var versions = service.FindVersions(JiraProject, VersionPattern).ToArray(); var unreleasedVersions = versions.Where(v => v.released != true); var releasedVersions = versions.Where(v => v.released == true); var latestReleasedVersion = releasedVersions.Last(); var earliestUnreleasedVersion = unreleasedVersions.First(); VersionID = latestReleasedVersion.id; VersionName = latestReleasedVersion.name; NextUnreleasedVersionID = earliestUnreleasedVersion.id; NextUnreleasedVersionName = earliestUnreleasedVersion.name; return(true); } catch (Exception ex) { Log.LogErrorFromException(ex); return(false); } }
public override bool Execute() { try { JiraRestClient restClient = new JiraRestClient (JiraUrl, Authenticator); IJiraProjectVersionService service = new JiraProjectVersionService (restClient); IJiraProjectVersionFinder finder = new JiraProjectVersionFinder(restClient); var versions = finder.FindVersions (JiraProjectKey, "(?s).*"); var jiraProject = versions.Where(x => x.name == VersionNumber).DefaultIfEmpty().First(); if (jiraProject != null) { if (jiraProject.released != null) { if (jiraProject.released.Value) throw new JiraException ("The Version '" + VersionNumber + "' got already released in Jira."); } CreatedVersionID = jiraProject.id; return true; } CreatedVersionID = service.CreateVersion (JiraProjectKey, VersionNumber, null); return true; } catch (Exception ex) { Log.LogErrorFromException (ex); return false; } }
public override bool Execute() { try { IJiraProjectVersionService service = new JiraProjectVersionService(JiraUrl, JiraUsername, JiraPassword); var versions = service.FindUnreleasedVersions(JiraProject, VersionPattern).ToArray(); VersionID = ""; VersionName = ""; NextVersionID = ""; NextVersionName = ""; NumberOfUnreleasedVersions = versions.Count(); if (NumberOfUnreleasedVersions >= 1) { var version = versions.First(); VersionID = version.id; VersionName = version.name; } if (NumberOfUnreleasedVersions >= 2) { var nextVersion = versions.Skip(1).First(); NextVersionID = nextVersion.id; NextVersionName = nextVersion.name; } return(true); } catch (Exception ex) { Log.LogErrorFromException(ex); return(false); } }
public void SetUp() { IAuthenticator authenticator = new HttpBasicAuthenticator(c_jiraUsername, c_jiraPassword); _restClient = new JiraRestClient(c_jiraUrl, authenticator); _service = new JiraProjectVersionService(_restClient); _versionFinder = new JiraProjectVersionFinder(_restClient); _issueService = new JiraIssueService(_restClient); _repairer = new JiraProjectVersionRepairer(_service, _versionFinder); }
public override bool Execute() { try { IJiraProjectVersionService service = new JiraProjectVersionService(JiraUrl, JiraUsername, JiraPassword); service.ReleaseVersion(VersionID, NextVersionID); return(true); } catch (Exception ex) { Log.LogErrorFromException(ex); return(false); } }
public override bool Execute() { try { IJiraProjectVersionService service = new JiraProjectVersionService(JiraUrl, JiraUsername, JiraPassword); service.CreateSubsequentVersion(JiraProject, VersionPattern, VersionComponentToIncrement, _versionReleaseWeekday); return(true); } catch (Exception ex) { Log.LogErrorFromException(ex); return(false); } }
public override bool Execute() { try { IJiraProjectVersionService service = new JiraProjectVersionService (JiraUrl, JiraUsername, JiraPassword); service.ReleaseVersion (VersionID, NextVersionID); return true; } catch(Exception ex) { Log.LogErrorFromException (ex); return false; } }
public override bool Execute() { try { JiraRestClient restClient = new JiraRestClient (JiraUrl, Authenticator); IJiraProjectVersionService service = new JiraProjectVersionService (restClient); service.ReleaseVersion (VersionID, NextVersionID); return true; } catch(Exception ex) { Log.LogErrorFromException (ex); return false; } }
public override bool Execute() { try { JiraRestClient restClient = new JiraRestClient (JiraUrl, Authenticator); IJiraProjectVersionService service = new JiraProjectVersionService (restClient); service.CreateSubsequentVersion (JiraProject, VersionPattern, VersionComponentToIncrement, _versionReleaseWeekday); return true; } catch(Exception ex) { Log.LogErrorFromException (ex); return false; } }
public override bool Execute() { try { JiraRestClient restClient = new JiraRestClient(JiraUrl, Authenticator); IJiraProjectVersionService service = new JiraProjectVersionService(restClient); service.ReleaseVersionAndSquashUnreleased(VersionID, NextVersionID, ProjectKey); return(true); } catch (Exception ex) { Log.LogErrorFromException(ex); return(false); } }
public override bool Execute() { try { JiraRestClient restClient = new JiraRestClient(JiraUrl, Authenticator); IJiraProjectVersionService service = new JiraProjectVersionService(restClient); IJiraProjectVersionFinder finder = new JiraProjectVersionFinder(restClient); var _jiraProjectVersionRepairer = new JiraProjectVersionRepairer(service, finder); var versions = finder.FindVersions(JiraProjectKey, "(?s).*").ToList(); var jiraProject = versions.Where(x => x.name == VersionNumber).DefaultIfEmpty().First(); if (jiraProject != null) { if (jiraProject.released != null) { if (jiraProject.released.Value) { throw new JiraException("The Version '" + VersionNumber + "' got already released in Jira."); } } CreatedVersionID = jiraProject.id; return(true); } CreatedVersionID = service.CreateVersion(JiraProjectKey, VersionNumber, null); _jiraProjectVersionRepairer.RepairVersionPosition(CreatedVersionID); return(true); } catch (Exception ex) { Log.LogErrorFromException(ex); return(false); } }
public override bool Execute() { try { JiraRestClient restClient = new JiraRestClient(JiraUrl, Authenticator); IJiraProjectVersionService service = new JiraProjectVersionService(restClient); var jiraProjectVersionFinder = new JiraProjectVersionFinder(restClient); var jiraProjectVersionRepairer = new JiraProjectVersionRepairer(service, jiraProjectVersionFinder); service.ReleaseVersion(VersionID, NextVersionID); if (SortReleasedVersion) { jiraProjectVersionRepairer.RepairVersionPosition(VersionID); } return(true); } catch (Exception ex) { Log.LogErrorFromException(ex); return(false); } }
public override bool Execute() { try { JiraRestClient restClient = new JiraRestClient(JiraUrl, Authenticator); IJiraProjectVersionService service = new JiraProjectVersionService(restClient); IJiraProjectVersionFinder finder = new JiraProjectVersionFinder(restClient); var jiraProjectVersionRepairer = new JiraProjectVersionRepairer(service, finder); var createdVersionId = service.CreateSubsequentVersion(JiraProject, VersionPattern, VersionComponentToIncrement, _versionReleaseWeekday); if (SortVersion) { jiraProjectVersionRepairer.RepairVersionPosition(createdVersionId); } return(true); } catch (Exception ex) { Log.LogErrorFromException(ex); return(false); } }
public void SetUp() { _service = new JiraProjectVersionService (c_jiraUrl, c_jiraUsername, c_jiraPassword); }
public void SetUp() { _service = new JiraProjectVersionService(c_jiraUrl, c_jiraUsername, c_jiraPassword); }
public override bool Execute() { try { IJiraProjectVersionService service = new JiraProjectVersionService (JiraUrl, JiraUsername, JiraPassword); var versions = service.FindUnreleasedVersions (JiraProject, VersionPattern).ToArray(); VersionID = ""; VersionName = ""; NextVersionID = ""; NextVersionName = ""; NumberOfUnreleasedVersions = versions.Count(); if(NumberOfUnreleasedVersions >= 1) { var version = versions.First(); VersionID = version.id; VersionName = version.name; } if(NumberOfUnreleasedVersions >= 2) { var nextVersion = versions.Skip (1).First(); NextVersionID = nextVersion.id; NextVersionName = nextVersion.name; } return true; } catch(Exception ex) { Log.LogErrorFromException (ex); return false; } }
public override bool Execute() { try { IJiraProjectVersionService service = new JiraProjectVersionService (JiraUrl, JiraUsername, JiraPassword); service.CreateSubsequentVersion (JiraProject, VersionPattern, VersionComponentToIncrement, _versionReleaseWeekday); return true; } catch(Exception ex) { Log.LogErrorFromException (ex); return false; } }
public override bool Execute() { try { IJiraProjectVersionService service = new JiraProjectVersionService (JiraUrl, JiraUsername, JiraPassword); var versions = service.FindVersions (JiraProject, VersionPattern).ToArray(); var unreleasedVersions = versions.Where (v => v.released != true); var releasedVersions = versions.Where (v => v.released == true); var latestReleasedVersion = releasedVersions.Last(); var earliestUnreleasedVersion = unreleasedVersions.First(); VersionID = latestReleasedVersion.id; VersionName = latestReleasedVersion.name; NextUnreleasedVersionID = earliestUnreleasedVersion.id; NextUnreleasedVersionName = earliestUnreleasedVersion.name; return true; } catch(Exception ex) { Log.LogErrorFromException (ex); return false; } }
public void SetUp() { IAuthenticator authenticator = new HttpBasicAuthenticator(c_jiraUsername, c_jiraPassword); _restClient = new JiraRestClient (c_jiraUrl, authenticator); _service = new JiraProjectVersionService (_restClient); _versionFinder = new JiraProjectVersionFinder (_restClient); _issueService = new JiraIssueService (_restClient); }