예제 #1
0
        private static void AddReviewOwnershipDetail(Dictionary <string, DeveloperKnowledge> developersKnowledge, DeveloperFileReveiewDetail developerFileReveiewDetail)
        {
            var developerName = developerFileReveiewDetail.Developer.NormalizedName;

            if (!developersKnowledge.ContainsKey(developerName))
            {
                developersKnowledge[developerName] = new DeveloperKnowledge()
                {
                    DeveloperName = developerName
                };
            }

            developersKnowledge[developerName].NumberOfReviews += developerFileReveiewDetail.PullRequests.Count();

            developersKnowledge[developerName].AddReviewedFile(developerFileReveiewDetail.FilePath);
        }
예제 #2
0
        private static void AddModificationOwnershipDetail(Dictionary <string, DeveloperKnowledge> developersKnowledge, DeveloperFileCommitDetail developerFileCommitsDetail, int totalAuditedLines)
        {
            var developerName = developerFileCommitsDetail.Developer.NormalizedName;

            if (!developersKnowledge.ContainsKey(developerName))
            {
                developersKnowledge[developerName] = new DeveloperKnowledge()
                {
                    DeveloperName = developerName
                };
            }

            developersKnowledge[developerName].NumberOfCommits       += developerFileCommitsDetail.Commits.Count();
            developersKnowledge[developerName].NumberOfAuthoredLines += totalAuditedLines;

            developersKnowledge[developerName].AddCommittedFile(developerFileCommitsDetail.FilePath);
        }