Ejemplo n.º 1
0
        private void ReleaseVersion(string versionID)
        {
            var resource = "version/" + versionID;
            var request  = CreateRestRequest(resource, Method.PUT);

            var adjustedReleaseDate = AdjustReleaseDateForJira(DateTime.Today);
            var projectVersion      = new JiraProjectVersion {
                id = versionID, released = true, releaseDate = adjustedReleaseDate
            };

            request.AddBody(projectVersion);

            DoRequest(request, HttpStatusCode.OK);
        }
Ejemplo n.º 2
0
        public string CreateVersion(string projectKey, string versionName, DateTime releaseDate)
        {
            var request = CreateRestRequest("version", Method.POST);

            var adjustedReleaseDate = AdjustReleaseDateForJira(releaseDate);
            var projectVersion      = new JiraProjectVersion {
                name = versionName, project = projectKey, releaseDate = adjustedReleaseDate
            };

            request.AddBody(projectVersion);

            var newProjectVersion = DoRequest <JiraProjectVersion> (request, HttpStatusCode.Created);

            return(newProjectVersion.Data.id);
        }