refactor: Apply rubocop auto-corrections to lib/api/commits.rb

Why

We want to refactor lib/api/commits.rb as preparatory cleanup before implementing keyset pagination. Doing all the rubocop changes first makes the MRs smaller and less noisy.

Changes

No functional changes intended here, this is just to address rubocops.

Addressed the following .rubocop_todo/ items for lib/api/commits.rb, and removed the entries from the todo's.

Removed lib/api/commits.rb from 4 exclusion files:

  • style/guard_clause.yml
  • layout/line_length.yml
  • style/unless_logical_operators.yml
  • style/if_unless_modifier.yml

Verification

  • All existing specs pass (spec/requests/api/commits_spec.rb)
  • rubocop lib/api/commits.rb reports 0 offenses

Closes #595505 (closed)

Edited by Hunter Stewart

Merge request reports

Loading