Trigger changes for the task-discover functinality (docker/distgit testing)
Split-up and rewrite of the `discover_tasks()` method, so the logical steps
are not all tied together, and so we have better starting place for further
changes.
The `discover` 'reaction' in the task configuration can now be like:
```
{discover: {
repo: 'URL of the git branch to clone',
branch: 'branch to clone, master by default',
fallback_branch: 'what branch to clone if `branch` can not be cloned',
base_dir: 'relative path to a directory in the repo. The path is used as root for the task discovery',
recursive: 'when True check the base_dir recursively. When False (default)
only list the first level'
}
}
```
I'm not sure the `fallback_branch` is necessary, but the previous code had
a concept of checking out 'master' when the provided branch could not be cloned
so I wanted to introduce a way to do the same, but explicitly.
Differential Revision: https://phab.qadevel.cloud.fedoraproject.org/D1031