Fixes attempted commits with no changes (#43)

* Fixes attempted commits with no changes

* Spaces
This commit is contained in:
Jordan Brown
2017-06-12 12:03:25 +02:00
committed by AnturK
parent c831ad084d
commit 96312be367
+11 -8
View File
@@ -18,8 +18,8 @@ namespace TGServerService
const string RepoData = RepoPath + "/data";
const string RepoErrorUpToDate = "Already up to date!";
const string SSHPushRemote = "ssh_push_target";
const string PrivateKeyPath = "RepoKey/private_key.txt";
const string PublicKeyPath = "RepoKey/public_key.txt";
const string PrivateKeyPath = "RepoKey/private_key.txt";
const string PublicKeyPath = "RepoKey/public_key.txt";
const string PRJobFile = "prtestjob.json";
const string CommitMessage = "Automatic changelog compile, [ci skip]";
@@ -656,6 +656,9 @@ namespace TGServerService
Commands.Stage(Repo, "html/changelog.html");
Commands.Stage(Repo, "html/changelogs");
if (Repo.RetrieveStatus().Added.Count() == 0) //nothing to commit
return null;
// Create the committer's signature and commit
var authorandcommitter = MakeSig();
@@ -712,12 +715,12 @@ namespace TGServerService
{
Username = user,
};
return new SshUserKeyCredentials()
{
Username = user,
PrivateKey = PrivateKeyPath,
PublicKey = PublicKeyPath,
Passphrase = "",
return new SshUserKeyCredentials()
{
Username = user,
PrivateKey = PrivateKeyPath,
PublicKey = PublicKeyPath,
Passphrase = "",
};
}