Fix error in MR widget after /merge slash command
What does this MR do?
It fixes an error that sometimes occurs when a user merges an MR using /merge
slash command. This error was caused due to the fact that MRs are merged asynchronously and when MR widget is reloaded the MR could still be waiting for being picked up by a worker. MR waiting for a worker doesn't have any special state and that's why the error occurs.
With this fix the merge_widget_refresh
action will end in 2 possible states - merge_when_build_succeeds
for a case a build is running or success
which refreshes the widget. This action should never be called unless all merge request checks for merging are ok. And even if it was called the possible error would still be caught by the js code of the widget.
Why was this MR needed?
Found bug confirmed on gitlab.com
Does this MR meet the acceptance criteria?
-
Changelog entry added -
Documentation created/updated -
API support added - Tests
-
Added for this feature/bug -
All builds are passing
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Branch has no merge conflicts with master
(if it does - rebase it please) -
Squashed related commits together
What are the relevant issue numbers?
Fixes #28176 (closed)