Skip to content

Added lighter reset Approvals on push rules

Lucas Zampieri requested to merge lzampier/gitlab:smarter_approvals into master

What does this MR do and why?

Add rules to preserve approvals more often.

This MR tries to identify rebases, so we can keep approvals if code on the MR hasn't changed.

Fixes: #7834 (closed), #337888 (closed), #50
Relates-to: &544

How to set up and validate locally

  1. Use gdk project for testing
$> git clone http://127.0.0.1:3000/flightjs/Flight.git; cd Flight
  1. Simulate rebase
$> new_file="$RANDOM"; git checkout master; echo $new_file >> ./$new_file; git add $new_file; git commit -m "added $new_file"; git push; git checkout fix-event-currentTarget; git rebase origin/master; git push -f
  1. Check MR for approvals
    http://localhost:3000/flightjs/Flight/-/merge_requests/3
    or
$> lab mr browse origin

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by 🤖 GitLab Bot 🤖

Merge request reports