Skip to content

Commit 4012304

Browse files
committed
Github: handling branches containing '/'
Prior to this, when processing the payload sent by the Github webhook (via checkin.php), the commit() method would truncate a branch after the first contained '/', i.e. 'dev/1.1.0' would be saved as 'dev'. By using explode()'s limit parameter when splitting the branch ref we get from the Github payload, we keep everything after the 2nd '/'. Fixes #193
1 parent 39fbb5f commit 4012304

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

SourceGithub/SourceGithub.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ public function commit( $p_repo, $p_data ) {
316316
$t_commits[] = $t_commit['id'];
317317
}
318318

319-
$t_refData = explode( '/',$p_data['ref'] );
319+
$t_refData = explode( '/', $p_data['ref'], 3 );
320320
$t_branch = $t_refData[2];
321321

322322
return $this->import_commits( $p_repo, $t_commits, $t_branch );

0 commit comments

Comments
 (0)