public static void ProcessAuthor(this CheckinOptions checkinOptions, GitCommit commit, AuthorsFile authors) { if (!authors.IsParseSuccessfull) { return; } Author a = authors.FindAuthor(commit.AuthorAndEmail); if (a == null) { checkinOptions.AuthorTfsUserId = null; return; } checkinOptions.AuthorTfsUserId = a.TfsUserId; Trace.TraceInformation("Commit was authored by git user {0} {1} ({2})", a.Name, a.Email, a.TfsUserId); }
public CheckinOptions BuildCommitSpecificCheckinOptions(CheckinOptions sourceCheckinOptions, string commitMessage, GitCommit commit, AuthorsFile authors) { var customCheckinOptions = BuildCommitSpecificCheckinOptions(sourceCheckinOptions, commitMessage); customCheckinOptions.ProcessAuthor(commit, authors); return(customCheckinOptions); }