Ejemplo n.º 1
0
        /// <summary>
        /// Gets the remote versions necessary for the affects versions. The versions are created if they don't exist.
        /// </summary>
        /// <returns></returns>
        internal IEnumerable <RemoteVersion> CreateAffectsVersions()
        {
            IEnumerable <RemoteVersion> remoteVersions = null;

            if (_affectsVersionNames.Count != 0)
            {
                remoteVersions = _affectsVersionNames
                                 .Select(versionName => Jira.GetVersion(_projectKey, versionName) ?? Jira.CreateVersion(_projectKey, versionName));
            }

            return(remoteVersions);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Gets the remote components necessary for the components. The components are created if they don't exist.
        /// </summary>
        /// <returns></returns>
        internal IEnumerable <RemoteComponent> CreateRemoteComponents()
        {
            var remoteComponents = new List <RemoteComponent>();

            if (_componentNames.Count != 0)
            {
                foreach (var componentName in _componentNames)
                {
                    var remoteComponent = Jira.GetComponent(_projectKey, componentName);

                    if (remoteComponent == null)
                    {
                        remoteComponent = Jira.CreateComponent(_projectKey, componentName);
                    }

                    remoteComponents.Add(remoteComponent);
                }
            }
            //remoteComponents = _componentNames
            //    .Select(componentName => Jira.GetComponent(_projectKey, componentName) ?? Jira.CreateComponent(_projectKey, componentName));

            return(remoteComponents);
        }