Exemple #1
0
        private void PushNewCommit(GitHubBranch branch, string commitMessage, IGitHubClient client)
        {
            GitCommand.Commit(commitMessage, GitAuthorName, _auth.Email, all: true);

            string remoteUrl = client.CreateGitRemoteUrl(branch.Project);
            string refSpec   = $"HEAD:refs/heads/{branch.Name}";

            GitCommand.Push(
                $"https://{_auth.User}:{_auth.AuthToken}@{remoteUrl}",
                $"https://{remoteUrl}",
                refSpec,
                force: true);
        }