If this feature needs to handle non Gerrit Triggered jobs,  I think we should consider another approach.
Do you have any design document or picture? I would like to know your purpose and your current approach.