Ticket #5303: github-branches.diff
File github-branches.diff, 966 bytes (added by , 5 years ago) |
---|
-
cli/class-block-plugin-checker.php
135 135 // https://github.com/sortabrilliant/jumbotron 136 136 // git@github.com:sortabrilliant/jumbotron.git 137 137 // https://github.com/sortabrilliant/jumbotron.git 138 // 139 if ( preg_match( '#^/(\w+/[^.]+)(?:\.git)?$#', $url_parts[ 'path' ], $matches ) ) { 140 $url = 'https://github.com/' . $matches[1] . '.git/trunk'; 138 if ( preg_match( '#^/(\w+/[^./]+)(?:\.git)?(.*)$#', $url_parts['path'], $matches ) ) { 139 if ( empty( $matches[2] ) ) { 140 $url = 'https://github.com/' . $matches[1] . '.git/trunk'; 141 } else { 142 $branch = str_replace( '/tree/', '/branches/', $matches[2] ); 143 $url = 'https://github.com/' . $matches[1] . '.git' . $branch; 144 } 141 145 } else { 142 146 $this->record_result( 143 147 __FUNCTION__,