BUGFIX : search templates only for unknown repositories

When the git repo is known but not triggered, it should be avoided to
go through the template based job creation.
Last resort template search based on the repository group