static string GetOldFileName(PullRequestFileModel file, TreeChanges changes) { if (file.Status == PullRequestFileStatus.Renamed) { var fileName = file.FileName.Replace("/", "\\"); return(changes?.Renamed.FirstOrDefault(x => x.Path == fileName)?.OldPath); } return(null); }
static string GetOldFileName(PullRequestFileModel file, TreeChanges changes) { if (file.Status == PullRequestFileStatus.Renamed) { var gitPath = Paths.ToGitPath(file.FileName); return(changes?.Renamed.FirstOrDefault(x => x.Path == gitPath)?.OldPath); } return(null); }