Skip to content

About

No description, website, or topics provided.

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

VcsManager

Unified version control system management for .NET.

VcsManager provides a core abstraction package plus one package per supported provider, so applications can work with GitHub, GitLab, Azure DevOps, and Gitea through a consistent API.

Status

The repository is under active development. The core contracts, builder, configuration readers, operational layers, and tests are available. The GitHub, GitLab, Azure DevOps, and Gitea providers are available.

Project layout

src/
  VcsManager/              Core abstractions (VcsManager.Core)
  VcsManager.GitHub/       GitHub provider
  VcsManager.GitLab/       GitLab provider
  VcsManager.AzureDevOps/  Azure DevOps provider
  VcsManager.Gitea/        Gitea provider
tests/
  VcsManager.Tests/
  VcsManager.GitHub.Tests/
  VcsManager.GitLab.Tests/
  VcsManager.AzureDevOps.Tests/
  VcsManager.Gitea.Tests/
  VcsManager.IntegrationTests/
samples/
docs/                      Docusaurus documentation site

Requirements

  • .NET 10 SDK or later
  • Linux, macOS, or Windows
  • Node.js 20 or later for the documentation site

Build and test

dotnet restore
dotnet build
dotnet test

Integration tests are a console runner with YAML configs. See tests/VcsManager.IntegrationTests/README.md.

Package

dotnet pack src/VcsManager/VcsManager.csproj -c Release

The core package ID is VcsManager.Core.

Sample

The sample runs the full repository and pull request flow with the built-in in-memory demo provider. For the same flow against a real provider, see the GitHub provider page, the GitLab provider page, the Azure DevOps provider page, or the Gitea provider page.

cd samples/VcsManager.Samples
VCS_PROVIDER=demo dotnet run

Optional owner:

VCS_PROVIDER=demo VCS_DEMO_OWNER=my-owner dotnet run

YAML configuration:

VCS_CONFIG_FILE=./sample.yaml dotnet run
provider:
  demo: {}

The sample exits with status 1 when no configuration is present, before it runs any operation.

Configuration

Use VcsProviderBuilder with UseProvider, environment variables, or YAML.

Environment variables use this shape:

VCS_PROVIDER=github
VCS_GITHUB_TOKEN=<token>
VCS_GITHUB_BASE_URL=https://github.example.com/api/v3

VCS_{PROVIDER}_{KEY} maps to a setting key. Underscores after the provider name become dots, so VCS_GITHUB_BASE_URL becomes base.url.

YAML uses one provider block:

provider:
  github:
    token: <token>
    base:
      url: https://github.example.com/api/v3

Documentation

The documentation site is built with Docusaurus:

https://mrhamburg.github.io/VcsManager/

Run it locally:

cd docs
npm install
npm start

Build the static site:

cd docs
npm run build

Source documentation:

Contributing

License

Licensed under either of the following, at your option:

About

No description, website, or topics provided.

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages