Exemplo n.º 1
0
 private void LoadProjectList()
 {
     _ciEntryPointSetting.BuildDefinitionSettings.ForEach(buildDefinition =>
     {
         var travisCiBuildDefinition = TravisCiBuildDefinition.FromIdString(buildDefinition.Id);
         ThreeStateTreeNode node     = new ThreeStateTreeNode(travisCiBuildDefinition.OwnerName + "/" + travisCiBuildDefinition.ProjectName)
         {
             Tag   = buildDefinition,
             State = CheckBoxState.Checked
         };
         _projects.Nodes.Add(node);
     });
 }
Exemplo n.º 2
0
        private void GetProjectComplete(TravisCiBuildDefinition buildDefinition)
        {
            _ciEntryPointSetting.Url = "https://api.travis-ci.org/";
            Settings.Save();

            bool exists = Settings.BuildExistsAndIsActive(_travisCiEntryPoint.Name, buildDefinition.Id);

            ThreeStateTreeNode node = new ThreeStateTreeNode(buildDefinition.OwnerName + "/" + buildDefinition.ProjectName)
            {
                Tag = buildDefinition,
                State = exists ? CheckBoxState.Checked : CheckBoxState.Unchecked
            };
            _projects.Nodes.Add(node);
        }
Exemplo n.º 3
0
        private void GetProjectComplete(TravisCiBuildDefinition buildDefinition)
        {
            _ciEntryPointSetting.Url = "http://travis-ci.org/";
            Settings.Save();

            bool exists = Settings.BuildExistsAndIsActive(_travisCiEntryPoint.Name, buildDefinition.Id);

            ThreeStateTreeNode node = new ThreeStateTreeNode(buildDefinition.OwnerName + "/" + buildDefinition.ProjectName)
            {
                Tag   = buildDefinition,
                State = exists ? CheckBoxState.Checked : CheckBoxState.Unchecked
            };

            _projects.Nodes.Add(node);
        }
        private void GetProjectComplete(TravisCiBuildDefinition buildDefinition)
        {
            _ciEntryPointSetting.Url = _travisUrl.Text;
            if (!string.IsNullOrEmpty(_travisApiAccessToken.Text))
            {
                _ciEntryPointSetting.SetPassword(_travisApiAccessToken.Text);
            }
            Settings.Save();

            bool exists = Settings.BuildExistsAndIsActive(_travisCiEntryPoint.Name, buildDefinition.Id);

            ThreeStateTreeNode node = new ThreeStateTreeNode(buildDefinition.OwnerName + "/" + buildDefinition.ProjectName)
            {
                Tag = buildDefinition,
                State = exists ? CheckBoxState.Checked : CheckBoxState.Unchecked
            };
            _projects.Nodes.Add(node);
        }
        public void TravisBuildStatus_FunkyDate()
        {
            var travisCiWorkingBuild    = ResourceManager.TravisFunkyDate;
            var travisCiBuildDefinition = TravisCiBuildDefinition.FromIdString("ownerName/projectName/59");
            BuildDefinitionSetting buildDefinitionSetting = new BuildDefinitionSetting();

            buildDefinitionSetting.Name = "Name";
            buildDefinitionSetting.Id   = "BuildDefinitionId";
            TravisCiBuildStatus buildStatus = new TravisCiBuildStatus(travisCiBuildDefinition, travisCiWorkingBuild, buildDefinitionSetting);

            Assert.AreEqual(BuildStatusEnum.InProgress, buildStatus.BuildStatusEnum);
            Assert.AreEqual("BuildDefinitionId", buildStatus.BuildDefinitionId);
            Assert.AreEqual("Name", buildStatus.Name);
            Assert.AreEqual("Garima Singh", buildStatus.RequestedBy);
            Assert.AreEqual("Adding rake db:migrate for sample app in code", buildStatus.Comment);
            Assert.AreEqual("https://api.travis-ci.org/ownerName/projectName/builds/1791928", buildStatus.Url);
            Assert.AreEqual("1791928", buildStatus.BuildId);
        }
        public void TravisBuildStatus_PassingBuildNoComment()
        {
            var travisCiWorkingBuild    = ResourceManager.TravisCiWorkingBuild;
            var travisCiBuildDefinition = TravisCiBuildDefinition.FromIdString("ownerName/projectName/59");
            BuildDefinitionSetting buildDefinitionSetting = new BuildDefinitionSetting();

            buildDefinitionSetting.Name = "Name";
            buildDefinitionSetting.Id   = "BuildDefinitionId";
            TravisCiBuildStatus buildStatus = new TravisCiBuildStatus(travisCiBuildDefinition, travisCiWorkingBuild, buildDefinitionSetting);

            Assert.AreEqual(BuildStatusEnum.Working, buildStatus.BuildStatusEnum);
            Assert.AreEqual("BuildDefinitionId", buildStatus.BuildDefinitionId);
            Assert.AreEqual("Name", buildStatus.Name);
            Assert.AreEqual("Bob Smith", buildStatus.RequestedBy);
            Assert.AreEqual("Merge branch 'master' of https://github.com/travis-ci/travis-ci", buildStatus.Comment);
            Assert.AreEqual("https://api.travis-ci.org/ownerName/projectName/builds/1591278", buildStatus.Url);
            Assert.AreEqual("1591278", buildStatus.BuildId);
        }
Exemplo n.º 7
0
        private void GetProjectComplete(TravisCiBuildDefinition buildDefinition)
        {
            _ciEntryPointSetting.Url = _travisUrl.Text;
            if (!string.IsNullOrEmpty(_travisApiAccessToken.Text))
            {
                _ciEntryPointSetting.SetPassword(_travisApiAccessToken.Text);
            }
            Settings.Save();

            bool exists = Settings.BuildExistsAndIsActive(_travisCiEntryPoint.Name, buildDefinition.Id);

            ThreeStateTreeNode node = new ThreeStateTreeNode(buildDefinition.OwnerName + "/" + buildDefinition.ProjectName)
            {
                Tag   = buildDefinition,
                State = exists ? CheckBoxState.Checked : CheckBoxState.Unchecked
            };

            _projects.Nodes.Add(node);
        }