Skip to content

Commit

Permalink
Correct for Github payload differences
Browse files Browse the repository at this point in the history
  • Loading branch information
Muffinman authored May 18, 2018
1 parent cde1eee commit c2f0a10
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/http/GitDeployController.php
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,12 @@ public function gitHook(Request $request)
$postdata['commits'][$commit_key]['human_date'] = $date_str;
}

// Standardise formats for Gitlab / Github payload differences
if (isset($postdata['pusher']) && !empty($postdata['pusher'])) {
$postdata['user_name'] = $postdata['pusher']['name'];
$postdata['user_email'] = $postdata['pusher']['email'];
}

// Use package's own sender or the project default?
$addressdata['sender_name'] = config('mail.from.name');
$addressdata['sender_address'] = config('mail.from.address');
Expand Down

0 comments on commit c2f0a10

Please sign in to comment.