Skip to content

Commit

Permalink
pipeline page schema json request
Browse files Browse the repository at this point in the history
  • Loading branch information
gq1 committed Sep 24, 2024
1 parent 52c1566 commit 00c7a9c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions includes/pipeline_page/_index.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,14 +136,14 @@
$api_opts = stream_context_create(['http' => ['method' => 'GET', 'header' => ['User-Agent: PHP']]]);
$gh_launch_schema_url = "https://api.github.com/repos/sanger-tol/{$pipeline->name}/contents/nextflow_schema.json?ref={$release}";
$gh_launch_schema_json = file_get_contents($gh_launch_schema_url, false, $api_opts);
if (strpos($http_response_header[0], 'HTTP/1.0 200') === false) {
if (preg_match('/HTTP\/\d\.*\d* 200/', $http_response_header[0]) === false) {
echo '<script>console.log("Sent request to ' .
$gh_launch_schema_url .
'"," got http response header:",' .
json_encode($http_response_header, JSON_HEX_TAG) .
')</script>';
# Remember for next time
if (strpos($http_response_header[0], 'HTTP/1.0 404') !== false) {
if (preg_match('/HTTP\/\d\.*\d* 404/', $http_response_header[0]) !== false) {
file_put_contents($gh_pipeline_no_schema_fn, '');
}
} else {
Expand Down

0 comments on commit 00c7a9c

Please sign in to comment.