Warn user about losing merge request diff
This commit is contained in:
parent
4da8b37e67
commit
771b5c2298
1 changed files with 7 additions and 0 deletions
|
@ -1,6 +1,13 @@
|
||||||
# This taks will reload commits/diff for all merge requests
|
# This taks will reload commits/diff for all merge requests
|
||||||
desc "GITLAB | Migrate Merge Requests"
|
desc "GITLAB | Migrate Merge Requests"
|
||||||
task migrate_merge_requests: :environment do
|
task migrate_merge_requests: :environment do
|
||||||
|
puts "Since 5.1 old merge request serialization logic was replaced with a better one."
|
||||||
|
puts "It makes old merge request diff invalid for GitLab 5.1+"
|
||||||
|
puts "* * *"
|
||||||
|
puts "This will rebuild commits/diffs info for existing merge requests."
|
||||||
|
puts "You will lose merge request diff if its already merged."
|
||||||
|
ask_to_continue
|
||||||
|
|
||||||
MergeRequest.find_each(batch_size: 20) do |mr|
|
MergeRequest.find_each(batch_size: 20) do |mr|
|
||||||
mr.st_commits = []
|
mr.st_commits = []
|
||||||
mr.save
|
mr.save
|
||||||
|
|
Loading…
Reference in a new issue