Commit fbcd6de1 authored by Maina Ng'ang'a's avatar Maina Ng'ang'a
Browse files

feat: implement patch invert command with commit traceability

Add `ringctl patch invert` to automate patch inversion during incident
response. Extracts old values from git history, creates invert patch
with commit references, and deletes failed patch in single MR.

Key changes:
- Add InvertInfo struct (patch ID, applied SHA, parent SHA)
- Implement ExtractOldValues using Compare API and JSON parsing
- Add FindPatchApplicationCommit using Search API
- Enhance MR template with clickable commit links
- Add 9 comprehensive unit tests
- Validate only 'replace' operations (fail fast on others)

Related: https://gitlab.com/gitlab-com/gl-infra/delivery/-/issues/21502
parent 01ac952b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment