コード例 #1
0
        public VersionControlSystemInfo CreateRepositoryForProject(CreateProjectRequest request)
        {
            var project = new ProjectCreate
            {
                IssuesEnabled = false,
                Description = request.Info,
                MergeRequestsEnabled = false,
                Name = request.Name,
                VisibilityLevel = request.AccessLevel == AccessLevel.Public
                    ? VisibilityLevel.Public
                    : VisibilityLevel.Private
            };

            var createdProject = _gitLabClient.Projects.Create(project);
            return new VersionControlSystemInfo(createdProject.Id, new Uri(createdProject.WebUrl));
        }
コード例 #2
0
ファイル: ProjectsTests.cs プロジェクト: 2kah/NGitLab
        private ProjectCreate CreateProject(out Project created, string name)
        {
            var p = new ProjectCreate
            {
                Description = "desc",
                ImportUrl = null,
                IssuesEnabled = true,
                MergeRequestsEnabled = true,
                Name = name,
                NamespaceId = null,
                SnippetsEnabled = true,
                VisibilityLevel = VisibilityLevel.Public,
                WallEnabled = true,
                WikiEnabled = true
            };

            created = _projects.Create(p);
            return p;
        }
コード例 #3
0
 public Project Create(ProjectCreate project)
 {
     return _api.Post().With(project).To<Project>(Project.Url);
 }