mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-09 10:06:33 +02:00
bridges: add context to detectParameters (#3607)
* bridges: add context to detectParameters Some bridges did not return the context parameter but they used it in the parameters * bridges: add context to detectParameters Fix test for InstagramBridge
This commit is contained in:
@@ -277,6 +277,7 @@ class GithubIssueBridge extends BridgeAbstract
|
||||
case 2: // Project issues
|
||||
[$user, $project] = $path_segments;
|
||||
$show_comments = 'off';
|
||||
$context = 'Project Issues';
|
||||
break;
|
||||
case 3: // Project issues with issue comments
|
||||
if ($path_segments[2] !== static::URL_PATH) {
|
||||
@@ -284,15 +285,18 @@ class GithubIssueBridge extends BridgeAbstract
|
||||
}
|
||||
[$user, $project] = $path_segments;
|
||||
$show_comments = 'on';
|
||||
$context = 'Project Issues';
|
||||
break;
|
||||
case 4: // Issue comments
|
||||
[$user, $project, /* issues */, $issue] = $path_segments;
|
||||
$context = 'Issue comments';
|
||||
break;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
||||
return [
|
||||
'context' => $context,
|
||||
'u' => $user,
|
||||
'p' => $project,
|
||||
'c' => $show_comments ?? null,
|
||||
|
Reference in New Issue
Block a user