static void Main(string[] args) { const string ownerName = "cawagner"; const string repositoryName = "testing-github-api"; Console.Write("User name: "); string userName = Console.ReadLine(); Console.Write("Password: "******"master", gitRequestBuilder); GitHubCommitter committer = gitHub.CreateCommitter(); committer.CreateFile(DateTime.Now + ".txt", "this is a test file"); committer.UpdateFile("nested/file.txt", "I've eaten it!"); GitCommit commit = committer.SubmitCommit("Bert", "*****@*****.**", "This is a test commit."); gitHub.MergeIn(commit, "Merged it in"); Console.WriteLine("Press enter to stop the world"); Console.ReadLine(); }
public GitHubWrapper(string userName, string password, string branchName, GitHubRequestBuilder gitHubRequestBuilder) { BranchName = branchName; HubRequestBuilder = gitHubRequestBuilder; _restClient = new RestClientWrapper(userName, password); }