HomeDevCentral

ItemGroupMapping generic class

Description

ItemGroupMapping generic class

Summary:
We're mapping Jenkins jobs / GitHub repositories/ Phabricator projects
to notifications group.

Instead to use a specific class to deserialize the service config file,
it's more convenient to introduce an ItemGroupMapping generic class.

To add new services, which follows the same pattern than Jenkins
or GitHub, ie match names of something and groups and allow *,
we can use the ItemGroupMapping class directly.

When there is a need to extend the format to allow more mapping
properties, we can extend the class, like in PhabricatorGroupMapping.

Test Plan:

  • Fire GitHub / Docker / Phabricator notifications
  • Rebase Jenkins D626 against this code to use ItemGroupMapping too

Reviewers: dereckson

Subscribers: alken-orin

Differential Revision: https://devcentral.nasqueron.org/D627

Details