We used to examine only Koji task source to get the SCM namespace, repo, branch and commit hash. But the Koji task can contain branch name in the SCM url. That is not acceptable for Freshmaker, because we need particular commit hash.
This PR therefore prefers koji_build["source"] as a source of SCM data and only fallbacks to Koji task source if koji_build["source"] is not available. If Koji task is used, it checks for slash in commit hash, which detects wrong commit hash in "origin/branch" form.
We used to examine only Koji task source to get the SCM namespace, repo, branch and commit hash. But the Koji task can contain branch name in the SCM url. That is not acceptable for Freshmaker, because we need particular commit hash.
This PR therefore prefers koji_build["source"] as a source of SCM data and only fallbacks to Koji task source if koji_build["source"] is not available. If Koji task is used, it checks for slash in commit hash, which detects wrong commit hash in "origin/branch" form.