Skip to content

Commit c2f0a10

Browse files
authored
Correct for Github payload differences
1 parent cde1eee commit c2f0a10

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/http/GitDeployController.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,12 @@ public function gitHook(Request $request)
218218
$postdata['commits'][$commit_key]['human_date'] = $date_str;
219219
}
220220

221+
// Standardise formats for Gitlab / Github payload differences
222+
if (isset($postdata['pusher']) && !empty($postdata['pusher'])) {
223+
$postdata['user_name'] = $postdata['pusher']['name'];
224+
$postdata['user_email'] = $postdata['pusher']['email'];
225+
}
226+
221227
// Use package's own sender or the project default?
222228
$addressdata['sender_name'] = config('mail.from.name');
223229
$addressdata['sender_address'] = config('mail.from.address');

0 commit comments

Comments
 (0)