FindAuthor() 공개 메소드

public FindAuthor ( string>.Tuple gitUser ) : Author
gitUser string>.Tuple
리턴 Author
예제 #1
0
        private void ProcessAuthor(CheckinOptions checkinOptions, TextWriter writer, GitCommit commit)
        {
            if (checkinOptions.AuthorsFilePath == null)
            {
                writer.WriteLine("Author file was not set.");
                return;
            }

            // get authors file FIXME
            AuthorsFile af = new AuthorsFile();
            TextReader  tr = new StreamReader(checkinOptions.AuthorsFilePath);

            af.Parse(tr);

            Author a = af.FindAuthor(commit.AuthorAndEmail);

            if (a == null)
            {
                checkinOptions.AuthorTfsUserId = null;
                return;
            }

            checkinOptions.AuthorTfsUserId = a.TfsUserId;
            writer.WriteLine("Commit was authored by git user {0} {1} ({2})", a.Name, a.Email, a.TfsUserId);
        }
예제 #2
0
        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 static void ProcessAuthor(this CheckinOptions checkinOptions, TextWriter writer, 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;
            writer.WriteLine("Commit was authored by git user {0} {1} ({2})", a.Name, a.Email, a.TfsUserId);
        }
        private void ProcessAuthor(CheckinOptions checkinOptions, TextWriter writer, GitCommit commit)
        {
            // get authors file FIXME
            AuthorsFile af = new AuthorsFile();

            if (!af.Parse(checkinOptions.AuthorsFilePath, globals.GitDir))
            {
                return;
            }

            Author a = af.FindAuthor(commit.AuthorAndEmail);

            if (a == null)
            {
                checkinOptions.AuthorTfsUserId = null;
                return;
            }

            checkinOptions.AuthorTfsUserId = a.TfsUserId;
            writer.WriteLine("Commit was authored by git user {0} {1} ({2})", a.Name, a.Email, a.TfsUserId);
        }
        private void ProcessAuthor(CheckinOptions checkinOptions, TextWriter writer, GitCommit commit)
        {
            if (checkinOptions.AuthorsFilePath == null)
            {
                writer.WriteLine("Author file was not set.");
                return;
            }

            // get authors file FIXME
            AuthorsFile af = new AuthorsFile();
            TextReader tr = new StreamReader(checkinOptions.AuthorsFilePath);
            af.Parse(tr);

            Author a = af.FindAuthor(commit.AuthorAndEmail);
            if (a == null)
            {
                checkinOptions.AuthorTfsUserId = null;
                return;
            }

            checkinOptions.AuthorTfsUserId = a.TfsUserId;
            writer.WriteLine("Commit was authored by git user {0} {1} ({2})", a.Name, a.Email, a.TfsUserId);
        }
        private void ProcessAuthor(CheckinOptions checkinOptions, TextWriter writer, GitCommit commit)
        {
            // get authors file FIXME
            AuthorsFile af = new AuthorsFile();
            if (!af.Parse(checkinOptions.AuthorsFilePath, globals.GitDir))
                return;

            Author a = af.FindAuthor(commit.AuthorAndEmail);
            if (a == null)
            {
                checkinOptions.AuthorTfsUserId = null;
                return;
            }

            checkinOptions.AuthorTfsUserId = a.TfsUserId;
            writer.WriteLine("Commit was authored by git user {0} {1} ({2})", a.Name, a.Email, a.TfsUserId);
        }