Skip to main content

Providers Overview

VcsManager ships one provider package for each supported system. All providers implement IVcsProvider and return the same core records and exceptions.

Available providers​

ProviderPackageAuthenticationNative address
GitHubVcsManager.GitHubPersonal access token{owner}/{name}
GitLabVcsManager.GitLabPersonal access token{owner}/{project}/{name} or {owner}/{name}
Azure DevOpsVcsManager.AzureDevOpsPersonal access token{organization}/{project}/{name}
GiteaVcsManager.GiteaAccess token{owner}/{name}

Capability summary​

CapabilityGitHubGitLabAzure DevOpsGitea
Create repositoryYesYesConditionalYes
Delete repositoryYesYesYesYes
List repositoriesYesYesConditionalYes
Create pull requestYesYesYesYes
Merge pull requestConditionalConditionalConditionalConditional
Close pull requestYesYesYesYes

"Conditional" means the operation is available, but repository settings, branch policies, required checks, or resource state can prevent it. The provider capability matrix gives the exact conditions.

Register a provider​

Each provider has a fluent extension method:

using VcsManager.Builder;

var builder = new VcsProviderBuilder();

builder.WithGitHub(); // provider name "github"
builder.WithGitLab(); // provider name "gitlab"
builder.WithAzureDevOps(); // provider name "azuredevops"
builder.WithGitea(); // provider name "gitea"

The provider name is used by VCS_PROVIDER and by the YAML provider block. Matching is case-insensitive.

Repository addressing​

RepositoryRef is the only repository identity:

var repository = new RepositoryRef
{
Owner = "my-org",
Project = "my-project",
Name = "payments-api",
};
ProviderOwnerProjectName
GitHubUser or organizationUnsupportedRepository
GitLabTop-level namespaceOptional subgroup pathProject path
Azure DevOpsOrganization, defaulting to OrganizationUrlTeam project, defaulting to DefaultProjectRepository
GiteaUser or organization, defaulting to DefaultOwnerUnsupportedRepository

A provider rejects a ref that omits a required field and a ref that sets a field the provider cannot express. For example, GitHub rejects Project instead of ignoring it.

Choose a provider​

GitHub​

Use GitHub when your repositories live on GitHub.com or GitHub Enterprise Server. The provider uses Octokit behind an internal client. It supports classic and fine-grained personal access tokens.

GitLab​

Use GitLab when your projects live on GitLab.com or a self-managed GitLab. GitLab merge requests are returned as PullRequest; the project IID is PullRequest.Number. The provider uses REST API v4.

Azure DevOps​

Use Azure DevOps when your repositories live in Azure DevOps Services. The provider uses the official Microsoft.TeamFoundationServer.Client SDK with REST API 7.1 as a fallback. A team project is required for most repository operations.

Gitea​

Use Gitea when you run a self-hosted Gitea instance. The base URL is required. Gitea has no project or subgroup level, and it has no internal repository visibility. The page size is capped at 50.

Provider behavior​

The provider pages document configuration keys, token scopes, addressing, listing scope, merge methods, close behavior, and error mapping: