Refactoring find_commits method
What does this MR do?
It's possible that find_commits_by_message
return nil in array which is not OK. We have different checks outside of this method. This MR places all checks inside the method.
Why was this MR needed?
We need to improve code
What are the relevant issue numbers?
https://gitlab.com/gitlab-org/gitlab-ce/commit/28f6fba97cb9753c43d109ef4f43439413d4eb69