@mjia this is the "matcher" object idea I had mentioned previously.
I think this refactoring makes the policy logic a little clearer, and should be easier to test. There is still lots of room for improvement however, particularly with how the summary text is being generated... and a few things that need fixing which I marked with XXX.
The idea is this refactoring preserves the existing policy logic we have right now (even if it's not quite right), and then subsequent ones will clean up/expand the policy logic.
Btw helps to read each commit in sequence instead of looking at the "files changed" tab that Pagure shows.
@mjia this is the "matcher" object idea I had mentioned previously.
I think this refactoring makes the policy logic a little clearer, and should be easier to test. There is still lots of room for improvement however, particularly with how the summary text is being generated... and a few things that need fixing which I marked with
XXX.The idea is this refactoring preserves the existing policy logic we have right now (even if it's not quite right), and then subsequent ones will clean up/expand the policy logic.
Btw helps to read each commit in sequence instead of looking at the "files changed" tab that Pagure shows.