Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-02-23 21:16:59 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-02-23 21:16:59 +0300
commit94299354d10c1c4758883eb92df56255f32dcbe9 (patch)
treefb5254b3ac33eb888e7a676ffa8234370026d7c9 /lib/gitlab/diff
parent12f988e7dcb038e82144fcd159b94839044c54cb (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/diff')
-rw-r--r--lib/gitlab/diff/custom_diff.rb4
-rw-r--r--lib/gitlab/diff/rendered/notebook/diff_file.rb2
2 files changed, 2 insertions, 4 deletions
diff --git a/lib/gitlab/diff/custom_diff.rb b/lib/gitlab/diff/custom_diff.rb
index 5fb636fc4e0..af1fd8fb03e 100644
--- a/lib/gitlab/diff/custom_diff.rb
+++ b/lib/gitlab/diff/custom_diff.rb
@@ -10,14 +10,12 @@ module Gitlab
transformed_for_diff(new_blob, old_blob)
Gitlab::AppLogger.info({ message: 'IPYNB_DIFF_GENERATED' })
end
- rescue IpynbDiff::InvalidNotebookError => e
+ rescue IpynbDiff::InvalidNotebookError, IpynbDiff::InvalidTokenError => e
Gitlab::ErrorTracking.log_exception(e)
nil
end
def transformed_diff(before, after)
- Gitlab::AppLogger.info({ message: 'IPYNB_DIFF_GENERATED' })
-
transformed_diff = IpynbDiff.diff(before, after,
raise_if_invalid_nb: true,
diffy_opts: { include_diff_info: true }).to_s(:text)
diff --git a/lib/gitlab/diff/rendered/notebook/diff_file.rb b/lib/gitlab/diff/rendered/notebook/diff_file.rb
index 8e76d753dc6..e700e730f20 100644
--- a/lib/gitlab/diff/rendered/notebook/diff_file.rb
+++ b/lib/gitlab/diff/rendered/notebook/diff_file.rb
@@ -57,7 +57,7 @@ module Gitlab
IpynbDiff.diff(source_diff.old_blob&.data, source_diff.new_blob&.data,
raise_if_invalid_nb: true,
diffy_opts: { include_diff_info: true })
- rescue IpynbDiff::InvalidNotebookError => e
+ rescue IpynbDiff::InvalidNotebookError, IpynbDiff::InvalidTokenError => e
Gitlab::ErrorTracking.log_exception(e)
nil
end