TempRepoContext(Reference tempBranchReference, string tempBranchName, string tempBranchRefName, XunitContextBase verifyBase)
 {
     this.tempBranchReference = tempBranchReference;
     TempBranchName           = tempBranchName;
     this.tempBranchRefName   = tempBranchRefName;
     this.verifyBase          = verifyBase;
 }
    public static async Task <TempRepoContext> Create(string tempBranchName, XunitContextBase verifyBase)
    {
        var newReference = new NewReference($"refs/heads/{tempBranchName}", "af72f8e44eb53d26969b1316491a294f3401f203");

        await Client.DeleteBranch(tempBranchName);

        var tempBranchReference = await Client.GitHubClient.Git.Reference.Create("SimonCropp", "GitHubSync.TestRepository", newReference);

        return(new TempRepoContext(tempBranchReference, tempBranchName, $"refs/heads/{tempBranchName}", verifyBase));
    }