fix: invalid empty commit range for log opts
What does this MR do?
This MR fixes the conditional that checks if there are any commits present that need to be scanned. Cases like merge request branches being merged would result in failures like https://gitlab.com/gitlab-org/gitlab/-/jobs/2159996266 where there are no new changes.
What are the relevant issue numbers?
N/A
Does this MR meet the acceptance criteria?
-
Changelog entry added -
Documentation created/updated for GitLab EE, if necessary -
Documentation created/updated for this project, if necessary -
Documentation reviewed by technical writer or follow-up review issue created -
Tests added for this feature/bug -
Job definition updated, if necessary -
Conforms to the code review guidelines -
Conforms to the Go guidelines -
Security reports checked/validated by reviewer
Edited by Daniel Paul Searles