guardian / typerighter

Even if you’re the right typer, couldn’t hurt to use Typerighter!
Apache License 2.0
276 stars 12 forks source link

Add a diff of pending changes to the rule publication modal #391

Closed rhystmills closed 1 year ago

rhystmills commented 1 year ago

What does this change?

It's currently not clear what changes are being published when publishing a new version of a live rule.

This PR adds a diff to the publication modal to show what fields have been updated, plus tests for the functions added.

image

How to test

  1. Run the rule manager locally according to the instructions in the readme.
  2. Change some fields in a Live rule (If you have no Live rules, publish a Draft rule. If you have no draft rules, pull rules from the Google Sheet by activating the feature switch in the top right dropdown menu).
  3. Do you receive a diff of any field you change? Do any fields show up in the diff when they shouldn't?