Skip to content

webmd-health-services/GitAutomation

Repository files navigation

Build status latest

Overview

GitAutomation is a PowerShell module for working with Git repositories. You can use it to create, clone, query, push, pull, commit, and even more with Git repositories.

This module uses LibGit2Sharp, the .NET wrapper of libgit2, "a portable, pure C implementation of... Git", which allows you to call Git via API instead using the Git command line interface.

Installation

Install from PowerShell Gallery

Ensure you have PowerShellGet installed and make PowerShell Gallery a trusted source:

Set-PSRepository -Name PSGallery -InstallationPolicy Trusted

Then to install the module run:

Install-Module -Name GitAutomation

Contributing

Contributions are welcome and encouraged!

Building and Testing

We use Whiskey to build, test, and publish the module. Pester is the testing framework used for our tests.

To build and run all tests, use the build.ps1 script:

.\build.ps1

If you want to run only specific tests, first import Pester:

Import-Module -Name '.\PSModules\Pester'

Then invoke a single test script:

Invoke-Pester -Path .\Tests\Get-GitCommit.Tests.ps1

Test scripts go in the Tests directory. New module functions go in the GitAutomation\Functions directory.