For SmokeDetector, we have several SE API filter
values in use. Notably, there are separate filters for the /answers/*
, /questions/*
and /posts/*
routes. From an organizational standpoint, I'd like to merge all these filter definitions into one filter value which is used for all requests, so we can be sure we're getting a consistent set of data for all requests.
Further complicating this is that, in the past, we've had multiple pull requests (PRs) making changes to these filters at the same time. Such PRs are normally separate in that each PR is adding or removing different properties to each of the multiple filters, but, usually, the PR is adding/removing properties consistently to/from all filters. The PRs usually don't depend on each other and are often submitted by different people, so the filters values are changed separately. The PRs, as is normal, include text changes to the filter values. Given how filters are generated, it's not possible to just merge the text change which is made by each PR, as adding or removing even a single property from a filter is not a progressive textual change. As a result, the actual changes to the filters need to be understood and applied to a new updated value. This can be quite inconvenient with multiple PRs changing multiple values (e.g. the resulting changes can involve > 10 different filter values).
I'm aware of being able to see what the filter values contain interactively using the various endpoint pages in the SE API documentation. I'm also aware of the filters/{filters} and filters/create endpoints which enable decoding a filter and creating a filter respectively.
How can I easily compare two, or more, filters, see what the differences are and generate a merged filter which is a superset of both, or all, of the filters?