Extract RewriteHistory logic into a service

What does this MR do and why?

Contributes to #475250 (closed)

Problem

The rewrite history logic is implemented in GraphQL mutation and cannot be reused.

Solution

Extract logic into a service and call this service from GraphQL mutation.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

How to set up and validate locally

See documentation - https://docs.gitlab.com/ee/user/project/repository/reducing_the_repo_size_using_git.html#remove-blobs.

  1. Create a new project with a README file
  2. Go to Settings -> Repository -> Repository maintenance
  3. Select Redact text, type Getting started
  4. Press "Redact matching strings" button
  5. Go back to README.md, line Getting started should be replaced with REMOVED
Edited by Vasilii Iakliushin

Merge request reports

Loading