Skip to content

Commit

Permalink
Resolve code review comments
Browse files Browse the repository at this point in the history
Rename makeCommit to commit

Type array key

Normalize clean working tree message with Git
  • Loading branch information
caendesilva committed Nov 30, 2023
1 parent 34a1223 commit 9f52f26
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/Actions/GitCommitter.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,24 +36,24 @@ public function execute($changes)
if (empty($files)) {
render(<<<'HTML'
<div class="mx-2">
<span class="text-green-500">No changes to commit!</span>
<span class="text-green-500">Nothing to commit, working tree clean.</span>
</div>
HTML
);

return Command::SUCCESS;
}

return $this->makeCommit($files);
return $this->commit($files);
}

/**
* Make the Git commit.
*
* @param array<string> $files
* @param array<int, string> $files
* @return int
*/
protected function makeCommit(array $files)
protected function commit(array $files)
{
$process = Process::run(sprintf('git commit -m "Apply style fixes from Laravel Pint" %s', implode(' ', $files)));

Expand Down

0 comments on commit 9f52f26

Please sign in to comment.