Skip to content
Snippets Groups Projects

Allow updating squash option per branch rule (excl. All branches)

All threads resolved!

What does this MR do and why?

Allows editing squash option on the branch rule details page

⚠️ This excludes updating squash option for 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
Screenshot_2025-02-11_at_14.45.20 Screenshot_2025-02-11_at_14.45.26

Screen_Recording_2025-02-11_at_14.46.09.2025-02-11_14_48_06

How to set up and validate locally

  1. Enable the branch_rule_squash_settings feature flag.
  2. Ensure you're on an EE instance of GitLab.
  3. Create a project in a group.
  4. 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)
  5. Navigate to Project > Settings > Repository.
  6. Click on View details next to the protected branch created in step 4.
  7. On the Branch rule details page, the Squash commits when merging section should have an Edit button.
  8. Clicking the edit button should open a drawer and editing should work as expected.
  9. The Edit button should not be available when viewing branch details for All branches.
  10. The Edit button should not be available when viewing branch details on a non-EE instance.

Related to #512674 (closed)

Edited by Jacques Erasmus

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • GitLab Duo
  • GitLab Duo
  • Fred de Gier
  • Fred de Gier approved this merge request

    approved this merge request

  • 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

  • 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 assets

    Entrypoint / 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 the bundle-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 🚫 Danger

    Edited by ****
  • E2E Test Result Summary

    allure-report-publisher generated test report!

    e2e-test-on-cng: test report for c29e0886

    expand 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 c29e0886

    expand 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 ****
  • 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 Herwaarden
  • added 1 commit

    • 4ec5acdb - Translate squash option returned by the backend

    Compare with previous version

  • Jacques Erasmus reset approvals from @fdegier by pushing to the branch

    reset approvals from @fdegier by pushing to the branch

  • **** added backend label

    added backend label

  • requested review from @jwoodwardgl

  • requested review from @lorenzvanherwaarden

  • Lorenz van Herwaarden approved this merge request

    approved this merge request

  • Jacques Erasmus added 460 commits

    added 460 commits

    Compare with previous version

  • Jacques Erasmus reset approvals from @lorenzvanherwaarden by pushing to the branch

    reset approvals from @lorenzvanherwaarden by pushing to the branch

  • Lorenz van Herwaarden approved this merge request

    approved this merge request

  • Joe Woodward approved this merge request

    approved this merge request

  • Joe Woodward resolved all threads

    resolved all threads

  • Joe Woodward added this merge request to the merge train at position 2

    added this merge request to the merge train at position 2

  • merged

  • Joe Woodward mentioned in commit 19215ebf

    mentioned in commit 19215ebf

  • added workflowstaging label and removed workflowcanary label

  • Please register or sign in to reply
    Loading