Allow updating squash option per branch rule (excl. All branches)
What does this MR do and why?
Allows editing squash option on the branch rule details page
All branches
+ non-EE, see #512674 (comment 2341726245) for context.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
![]() |
![]() |
How to set up and validate locally
- Enable the
branch_rule_squash_settings
feature flag. - Ensure you're on an EE instance of GitLab.
- Create a project in a group.
- Create a protected branch for that project and add squash options .
- I.e.
FactoryBot.create(:branch_rule_squash_option, protected_branch: Project.last.protected_branches.create(name: 'test-branch'), project: Project.last)
- I.e.
- Navigate to Project > Settings > Repository.
- Click on
View details
next to the protected branch created in step 4. - On the Branch rule details page, the Squash commits when merging section should have an Edit button.
- Clicking the edit button should open a drawer and editing should work as expected.
- The Edit button should not be available when viewing branch details for
All branches
. - The Edit button should not be available when viewing branch details on a non-EE instance.
Related to #512674 (closed)
Merge request reports
Activity
changed milestone to %17.9
assigned to @jerasmus
added pipelinetier-1 label
added 278 commits
-
a1a785ef...2c4b97cb - 277 commits from branch
master
- 1ffcbf0a - Allow editing squash option per branch rule
-
a1a785ef...2c4b97cb - 277 commits from branch
1 Warning ⚠️ featureaddition and featureenhancement merge requests normally have a documentation change. Consider adding a documentation update or confirming the documentation plan with the Technical Writer counterpart.
For more information, see:
- The Handbook page on merge request types.
- The definition of done documentation.
2 Messages 📖 This merge request includes changes to Vue files that have both CE and EE versions. 📖 CHANGELOG missing: If this merge request needs a changelog entry, add the
Changelog
trailer to the commit message you want to add to the changelog.If this merge request doesn't need a CHANGELOG entry, feel free to ignore this message.
Vue
<template>
in CE and EESome Vue files in CE have a counterpart in EE. (For example,
path/to/file.vue
andee/path/to/file.vue
.)When run in the context of CE, the
<template>
of the CE Vue file is used. When run in the context of EE, the<template>
of the EE Vue file is used.It's easy to accidentally make a change to a CE
<template>
that should appear in both CE and EE without making the change in both places. When this happens, the change only takes effect in CE.The following Vue files were changed as part of this merge request that include both a CE and EE version of the file:
app/assets/javascripts/projects/settings/branch_rules/components/view/index.vue
If you made a change to the
<template>
of any of these Vue files that should be visible in both CE and EE, please ensure you have made your change to both versions of the file.A better alternative
An even better alternative is to refactor this component to only use a single template for both CE and EE. More info on this approach here: https://docs.gitlab.com/ee/development/ee_features.html#template-tag
Reviewer roulette
Category Reviewer Maintainer backend @abime
(UTC+5.5, 4.5 hours ahead of author)
@rzwambag
(UTC+1, same timezone as author)
frontend @fernando-c
(UTC-6, 7 hours behind author)
@pgascouvaillancourt
(UTC-5, 6 hours behind author)
Please refer to documentation page for guidance on how you can benefit from the Reviewer Roulette, or use the GitLab Review Workload Dashboard to find other available reviewers.
If needed, you can retry the
🔁 danger-review
job that generated this comment.Generated by
🚫 DangerEdited by ****mentioned in issue #512674 (closed)
- Edited by Jacques Erasmus
requested review from @fdegier
requested review from @GitLabDuo
I have reviewed the code and left a mix of questions and recommendations. The comments cover error handling improvements, error message specificity, and test description updates. I estimate there is a small amount of work required to address these suggestions, focusing on enhancing error handling and improving test clarity.
Edited by GitLab Duo- Resolved by Fred de Gier
- Resolved by Fred de Gier
- Resolved by Fred de Gier
- Resolved by Jacques Erasmus
Thanks @jerasmus I'm having some issues with GDK rendering the page so I could not validate it locally. Left 1 comment for consideration. Generally this looks good to me.
@lorenzvanherwaarden could you do the frontend maintainer review please?
requested review from @lorenzvanherwaarden
added pipeline:mr-approved label
added pipelinetier-3 pipeline:run-e2e-omnibus-once labels and removed pipelinetier-1 label
Before you set this MR to auto-merge
This merge request will progress on pipeline tiers until it reaches the last tier: pipelinetier-3. We will trigger a new pipeline for each transition to a higher tier.
Before you set this MR to auto-merge, please check the following:
- You are the last maintainer of this merge request
- The latest pipeline for this merge request is pipelinetier-3 (You can find which tier it is in the pipeline name)
- This pipeline is recent enough (created in the last 8 hours)
If all the criteria above apply, please set auto-merge for this merge request.
See pipeline tiers and merging a merge request for more details.
Bundle size analysis [beta]
This compares changes in bundle size for entry points between the commits 352d2d69 and c29e0886
✨ Special assetsEntrypoint / Name Size before Size after Diff Diff in percent average 4.9 MB 4.9 MB - 0.0 % mainChunk 3.79 MB 3.79 MB - 0.0 %
Note: We do not have exact data for 352d2d69. So we have used data from: e1526f20.
The target commit was too new, so we used the latest commit from master we have info on.
It might help to rerun thebundle-size-review
job
This might mean that you have a few false positives in this report. If something unrelated to your code changes is reported, you can check this comparison in order to see if they caused this change.Please look at the full report for more details
Read more about how this report works.
Generated by
🚫 DangerEdited by ****E2E Test Result Summary
allure-report-publisher
generated test report!e2e-test-on-cng:
✅ test report for c29e0886expand test summary
+------------------------------------------------------------------+ | suites summary | +-------------+--------+--------+---------+-------+-------+--------+ | | passed | failed | skipped | flaky | total | result | +-------------+--------+--------+---------+-------+-------+--------+ | Data Stores | 33 | 0 | 10 | 0 | 43 | ✅ | | Package | 29 | 0 | 15 | 0 | 44 | ✅ | | Create | 140 | 0 | 22 | 0 | 162 | ✅ | | Plan | 86 | 0 | 8 | 0 | 94 | ✅ | | Release | 5 | 0 | 1 | 0 | 6 | ✅ | | Govern | 83 | 0 | 11 | 0 | 94 | ✅ | | Verify | 52 | 0 | 20 | 0 | 72 | ✅ | | Monitor | 8 | 0 | 12 | 0 | 20 | ✅ | | Ai-powered | 0 | 0 | 2 | 0 | 2 | ➖ | | Manage | 1 | 0 | 9 | 0 | 10 | ✅ | | Secure | 2 | 0 | 5 | 0 | 7 | ✅ | | ModelOps | 0 | 0 | 1 | 0 | 1 | ➖ | | Fulfillment | 2 | 0 | 7 | 0 | 9 | ✅ | | Configure | 0 | 0 | 3 | 0 | 3 | ➖ | | Analytics | 2 | 0 | 0 | 0 | 2 | ✅ | | Growth | 0 | 0 | 2 | 0 | 2 | ➖ | +-------------+--------+--------+---------+-------+-------+--------+ | Total | 443 | 0 | 128 | 0 | 571 | ✅ | +-------------+--------+--------+---------+-------+-------+--------+
e2e-test-on-gdk:
✅ test report for c29e0886expand test summary
+------------------------------------------------------------------+ | suites summary | +-------------+--------+--------+---------+-------+-------+--------+ | | passed | failed | skipped | flaky | total | result | +-------------+--------+--------+---------+-------+-------+--------+ | Govern | 4 | 0 | 0 | 0 | 4 | ✅ | | Create | 13 | 0 | 0 | 0 | 13 | ✅ | | Plan | 9 | 0 | 0 | 0 | 9 | ✅ | | Verify | 6 | 0 | 0 | 0 | 6 | ✅ | | Data Stores | 2 | 0 | 0 | 0 | 2 | ✅ | | Secure | 2 | 0 | 0 | 0 | 2 | ✅ | | Package | 1 | 0 | 0 | 0 | 1 | ✅ | +-------------+--------+--------+---------+-------+-------+--------+ | Total | 37 | 0 | 0 | 0 | 37 | ✅ | +-------------+--------+--------+---------+-------+-------+--------+
Edited by ****- Resolved by Joe Woodward
Really nice work @jerasmus! Thanks for the good verification steps as well.
I have just 1 question about the label/value utility
😊 Back to you
🏓 Edited by Lorenz van Herwaardenadded 1 commit
- 4ec5acdb - Translate squash option returned by the backend
reset approvals from @fdegier by pushing to the branch
added backend label
requested review from @jwoodwardgl
requested review from @lorenzvanherwaarden
added 460 commits
-
4ec5acdb...256fa0dc - 459 commits from branch
master
- c29e0886 - Allow editing squash option per branch rule
-
4ec5acdb...256fa0dc - 459 commits from branch
reset approvals from @lorenzvanherwaarden by pushing to the branch
added this merge request to the merge train at position 2
mentioned in commit 19215ebf
added workflowstaging-canary label
added workflowcanary label and removed workflowstaging-canary label
added workflowstaging label and removed workflowcanary label
added workflowproduction label and removed workflowstaging label
added workflowpost-deploy-db-staging label and removed workflowproduction label
added workflowpost-deploy-db-production label and removed workflowpost-deploy-db-staging label
added releasedpublished label