Fix Style/GuardClause issue in app/services/commits/commit_patch_service.rb
This issue is part of the Source Code Management backend team's effort to resolve RuboCop violations.
Violation
File: app/services/commits/commit_patch_service.rb
Cop: Style/GuardClause
Steps to resolve
- Remove the entry from the RuboCop todo file
- Fix the violation in the code
- Ensure tests pass
- Submit the merge request