[go: up one dir, main page]

Skip to content

Add squash commits option in push options for merge requests

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Release notes

Problem to solve

Currently, it is not possible to enable squash commits for a merge request when creating an MR through CLI(git) because there doesn't appear to be a push option available for the same.

This is important if the project has Squash commit options set to Require and the customer/user rely on git CLI to push and create the Merge Request (ex: git push -o merge_request.create -o merge_request.merge_when_pipeline_succeeds -o merge_request.target=main). As of now, such a MR won't merge as squash attribute here will always be false.

Additional information: Create MR API has a squash attribute that helps in this scenario if the MR were created through the API.

Intended users

User experience goal

User should be able to configure squash attribute when creating an MR through git CLI.

Example: git push -o merge_request.create -o merge_request.merge_when_pipeline_succeeds -o merge_request.target=main -o merge_request.squash=true

Proposal

Adding a push option squash to the existing list of Push options for merge requests should help here.

Permissions and Security

  • Add expected impact to members with no access (0)
  • Add expected impact to Guest (10) members
  • Add expected impact to Reporter (20) members
  • Add expected impact to Developer (30) members
  • Add expected impact to Maintainer (40) members
  • Add expected impact to Owner (50) members

Documentation

Already linked in appropriate places.

Availability & Testing

Available Tier

What does success look like, and how can we measure that?

What is the type of buyer?

Is this a cross-stage feature?

Links / references

Edited by 🤖 GitLab Bot 🤖