mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-07-24 20:55:11 +02:00
[GitHubPullRequestBridge] Add new bridge inheriting GithubIssueBridge (#2001)
This commit is contained in:
parent
b4f809aa44
commit
6f75d07456
2 changed files with 86 additions and 29 deletions
38
bridges/GithubPullRequestBridge.php
Normal file
38
bridges/GithubPullRequestBridge.php
Normal file
|
@ -0,0 +1,38 @@
|
|||
<?php
|
||||
require_once('GithubIssueBridge.php');
|
||||
class GitHubPullRequestBridge extends GithubIssueBridge {
|
||||
const MAINTAINER = 'Yaman Qalieh';
|
||||
const NAME = 'GitHub Pull Request';
|
||||
const DESCRIPTION = 'Returns the pull request or comments of a pull request of a GitHub project';
|
||||
|
||||
const PARAMETERS = array(
|
||||
'global' => array(
|
||||
'u' => array(
|
||||
'name' => 'User name',
|
||||
'required' => true
|
||||
),
|
||||
'p' => array(
|
||||
'name' => 'Project name',
|
||||
'required' => true
|
||||
)
|
||||
),
|
||||
'Project Pull Requests' => array(
|
||||
'c' => array(
|
||||
'name' => 'Show Pull Request Comments',
|
||||
'type' => 'checkbox'
|
||||
)
|
||||
),
|
||||
'Pull Request comments' => array(
|
||||
'i' => array(
|
||||
'name' => 'Pull Request number',
|
||||
'type' => 'number',
|
||||
'required' => true
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
const BRIDGE_OPTIONS = array(0 => 'Project Pull Requests', 1 => 'Pull Request comments');
|
||||
const URL_PATH = 'pull';
|
||||
const SEARCH_QUERY_PATH = 'pulls';
|
||||
const SEARCH_QUERY = '?q=is%3Apr+sort%3Aupdated-desc';
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue