Crate what_git[][src]

what_git provides an easy mechanism for associating a given Git repository URL with its source. It supports either GitHub, GitHub Enterprise, Gitlab, or Gitlab Enterprise repositories. Use this crate to structure SCM-agnostic code with minimal branching.

About

what_git associates a repository URL to a known repository source. All you need is an HTTP or Git URL, and a personal access token to the API service your repository is associated with. Provide each of those to the what_git::what_git function, and that’s it.

Structs

SCM

Used to describe the structure of a repository on a supported source control management (SCM) solution.

Enums

Error
SCMKind

Supported SCMs. Currently, what_git only supports GitHub and Gitlab.

Functions

what_git

Determines what source control management (SCM) solution a repository URL belongs to. Returns a what_git::Result type describing the structure of the URL and the associated what_git::SCMKind, or some error of type what_git::Error.

Type Definitions

Result