Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
prow/plugins: prioritise repo level triggers over org level ones
So far, `TriggerFor` prioristised returning org level trigger configs. There might be cases where in a trigger would need to be configured specifically for a repo (ex: allowing `/retest` to trigger GH workflows). In cases like this, we should return the trigger that is defined at the repo level, rather than its corresponding org level trigger. We could "work around" the above constraint by simply defining the repo level trigger higher up in the config, but then this trigger config would shadow the org level trigger, which is not desirable. This change returns a repo level trigger if it finds one, if not, it returns the first org level trigger it sees (keeping in sync with the previous behaviour). Fwiw - I'm not sure why multiple org level or multiple repo level triggers for the same org or repo would be specified. Signed-off-by: Madhav Jivrajani <[email protected]>
- Loading branch information