Fix rebase failure alert variant
What does this MR do and why?
There is no error variant for alerts, so passing that yields an
unstyled alert banner. This MR fixes this functionality by passing the danger prop.
References
Please include cross links to any resources that are relevant to this MR. This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
| Before | After |
|---|---|
![]() |
![]() |
How to set up and validate locally
- Check out this branch
- Visit an MR in your GDK that is multiple commits behind the tip of its repo's main branch
- apply this patch so that an attempted rebase will fail:
diff --git a/app/assets/javascripts/vue_merge_request_widget/components/states/ready_to_merge.vue b/app/assets/javascripts/vue_merge_request_widget/components/states/ready_to_merge.vue
index 3ff2488d8787..2a5b2cdd6021 100644
--- a/app/assets/javascripts/vue_merge_request_widget/components/states/ready_to_merge.vue
+++ b/app/assets/javascripts/vue_merge_request_widget/components/states/ready_to_merge.vue
@@ -565,7 +565,7 @@ export default {
`${this.mr.iid}`,
'rebase',
);
- await axios.post(rebasePath);
+ await axios.post();
createAlert({
message: sprintf(this.$options.i18n.scheduledRebase, {
- Click the
Rebase source branchbutton on the MR. - You should see a correctly styled danger-variant alert banner at the top of the page.

