Table of Contents

Class GitHelper

Namespace
SunamoDevCode
Assembly
SunamoDevCode.dll

Must be in Win because use powershell In shared cannot because win derife from shared. If I have abstract layer for shared, then yes

public class GitHelper
Inheritance
GitHelper
Inherited Members
Extension Methods

Methods

NameOfRepoFromOriginUri(string)

Extracts repository name from git origin URI

public static string NameOfRepoFromOriginUri(string originUri)

Parameters

originUri string

Git origin URI to parse

Returns

string

Repository name extracted from the URI

PowershellForPull(List<string>)

Generates a PowerShell/Git bash script to pull updates from all specified folders.

public static string PowershellForPull(List<string> folders)

Parameters

folders List<string>

List of repository folder paths to pull from.

Returns

string

Generated bash script content for pulling all repositories.

PushSolution(bool, GitBashBuilder, string, string, string, PushSolutionsData, GitBashBuilder, Func<List<string>, Task<List<List<string>>>>)

Pushes changes for a solution to the remote repository, including status check and commit.

public static Task<bool> PushSolution(bool release, GitBashBuilder gitBashBuilder, string pushArgs, string commitMessage, string fullPathFolder, PushSolutionsData pushSolutionsData, GitBashBuilder gitStatus, Func<List<string>, Task<List<List<string>>>> psInvoke)

Parameters

release bool

Whether this is a release build push.

gitBashBuilder GitBashBuilder

Git bash builder for generating git commands.

pushArgs string

Additional arguments for the push command.

commitMessage string

Commit message to use.

fullPathFolder string

Full path to the solution folder.

pushSolutionsData PushSolutionsData

Data about the push operation status.

gitStatus GitBashBuilder

Git bash builder for status commands.

psInvoke Func<List<string>, Task<List<List<string>>>>

Function to invoke PowerShell commands and return their output.

Returns

Task<bool>

True if the push was successful.