public void CheckoutOnBranch(bool isMasterBranch, GitlabIssue issue = null) { if (isMasterBranch) { _gitRepository.CheckoutMaster(); _gitRepository.PullOnRepository(); } else { if (issue == null) { return; } GitResult <Branch> result = _gitRepository.CheckoutIssueBranch(issue.Id.ToString()); if (!result.HasSucceeded) { return; } if (result.Response.TrackingDetails.AheadBy > 0) { _gitRepository.PullOnRepository(); } } }
public void CreateBranchLinkedWithIssue(GitlabIssue issue) { _gitRepository.CheckoutMaster(); _gitRepository.PullOnRepository(); GitResult <Branch> result = _gitRepository.CheckoutIssueBranch(issue.Id.ToString()); if (result.HasSucceeded) { _gitRepository.PushOnOriginBranch(result.Response, false); } }