Add importing: true to GitHub import objects
What does this MR do and why?
There are often validations and callbacks on models that should be switched off during an import.
To disable callbacks on an object we create during an import, we must
always remember to set importing: true
on the object before saving, if
that object's class includes the Importable
module.
This change sets importing: true
on some objects in the GitHub
importer.
This will fix #432962 (closed).
Related: #434114.
QA
Put a break point in just above this line.
Run bundle exec rspec spec/lib/gitlab/github_import/importer/events/changed_assignee_spec.rb:48
On this branch the breakpoint will not be triggered as the callback is skipped. On master
it will be.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #432962 (closed)