Beispiel #1
0
        protected override async Task <string> GetRepositoryUrlAsync(CancellationToken cancellationToken)
        {
            var gitlab = new GitLabClient(this.ApiUrl, this.UserName, this.Password, this.GroupName);

            var project = await gitlab.GetProjectAsync(this.ProjectName, cancellationToken).ConfigureAwait(false);

            if (project == null)
            {
                throw new InvalidOperationException($"Project '{this.ProjectName}' not found on GitLab.");
            }

            return((string)project["http_url_to_repo"]);
        }