2021-03-29 20:15:56 +03:00
|
|
|
<?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',
|
2022-03-24 13:59:34 +03:00
|
|
|
'exampleValue' => 'RSS-Bridge',
|
2021-03-29 20:15:56 +03:00
|
|
|
'required' => true
|
|
|
|
),
|
|
|
|
'p' => array(
|
|
|
|
'name' => 'Project name',
|
2022-03-24 13:59:34 +03:00
|
|
|
'exampleValue' => 'rss-bridge',
|
2021-03-29 20:15:56 +03:00
|
|
|
'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',
|
2022-03-24 13:59:34 +03:00
|
|
|
'exampleValue' => '2100',
|
2021-03-29 20:15:56 +03:00
|
|
|
'required' => true
|
|
|
|
)
|
|
|
|
)
|
|
|
|
);
|
|
|
|
|
|
|
|
const BRIDGE_OPTIONS = array(0 => 'Project Pull Requests', 1 => 'Pull Request comments');
|
|
|
|
const URL_PATH = 'pull';
|
|
|
|
const SEARCH_QUERY_PATH = 'pulls';
|
2022-01-24 08:58:54 +03:00
|
|
|
const SEARCH_QUERY = '?q=is%3Apr+sort%3Acreated-desc';
|
2021-03-29 20:15:56 +03:00
|
|
|
}
|