mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-03 17:44:48 +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:
parent
6cc4cf24dc
commit
52d3cce59d
13 changed files with 115 additions and 80 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue