Skip to content

Support dry-run cherry-picks and reverts

Robert Speicher requested to merge rs-cherry-pick-revert-dry-run into master

This adds a dry_run parameter to the /cherry_pick and /revert Commit API endpoints. When enabled (default: false), it will perform the operations in a "dry-run" mode without committing any changes.

Gitaly counterpart: gitaly!2382 (merged)

Related to gitlab-com/gl-infra/delivery#1009 (closed)

Closes #231032 (closed)

As part of gitlab-com/gl-infra/delivery#1009 (closed), teamDelivery needs to be able to know if a cherry-pick will apply cleanly to a target branch, but without actually applying the change. This will allow us to inform developers that a security fix requires a manual backport to a previous stable branch, or if we can simply cherry-pick their merge request targeting the main branch.

While we have no need (yet) for a revert dry-run, we can add that functionality at the same time since the APIs are nearly identical both in gitlab-rails and in Gitaly.

TODO

  • Update API documentation
  • Update gitaly gem version
  • Changelog
Edited by Robert Speicher

Merge request reports

Loading