GitHub import creates incorrect milestone events if milestone doesn't exist in GitHub
When importing issues or pull requests, they can contain events for adding or removing a milestone that has been deleted.
On GitHub side, such an event is displayed correctly with simply not linking to actual milestone and having a pop up that this milestone has been removed:
On GitLab side, the event is created and displayed in UI but it is malformed because it doesn't contain actual milestone number:
This also causes our daily large import test to fail because test is using api to fetch milestone events and despite the event being present in UI, api returns no such event.
This issue has been caught by our daily test and can be observed in vuejs/vue
repository for example. PR has event with deleted milestone: https://github.com/vuejs/vue/pull/3967
Proposed solution
Since we can't create a milestone event for a milestone that doesn't exist on GitLab DB, we should ignore such an event and don't create the event.