GetFileChanges() public method

public GetFileChanges ( NGitLab.Models.MergeRequest mergeRequest ) : IEnumerable
mergeRequest NGitLab.Models.MergeRequest
return IEnumerable
Example #1
0
        static bool ValidateMergeRequestChanges(GitLabWrapper gitLabWrapper, MergeRequest mergeRequest, bool ignoreValidation) {
            if (ignoreValidation)
                return true;

            bool result = true;
            var fileChanges = gitLabWrapper.GetFileChanges(mergeRequest);
            foreach (var fileChange in fileChanges) {
                if (!ValidateFileChange(fileChange)) {
                    Log.Error($"File {fileChange.OldPath} has nonwindows line endings. Only windows line endings allowed.");
                    result = false;
                }
            }
            return result;
        }