2021-03-29 20:15:56 +03:00
|
|
|
<?php
|
2022-05-13 10:35:25 +03:00
|
|
|
|
2021-03-29 20:15:56 +03:00
|
|
|
class GitHubPullRequestBridge extends GithubIssueBridge
|
|
|
|
{
|
|
|
|
const NAME = 'GitHub Pull Request';
|
|
|
|
const DESCRIPTION = 'Returns the pull request or comments of a pull request of a GitHub project';
|
|
|
|
|
|
|
|
const PARAMETERS = [
|
|
|
|
'global' => [
|
|
|
|
'u' => [
|
|
|
|
'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' => [
|
|
|
|
'name' => 'Project name',
|
2022-03-24 13:59:34 +03:00
|
|
|
'exampleValue' => 'rss-bridge',
|
2021-03-29 20:15:56 +03:00
|
|
|
'required' => true
|
2022-07-01 16:10:30 +03:00
|
|
|
]
|
2021-03-29 20:15:56 +03:00
|
|
|
],
|
|
|
|
'Project Pull Requests' => [
|
|
|
|
'c' => [
|
|
|
|
'name' => 'Show Pull Request Comments',
|
|
|
|
'type' => 'checkbox'
|
2022-04-03 11:07:35 +03:00
|
|
|
],
|
|
|
|
'q' => [
|
|
|
|
'name' => 'Search Query',
|
|
|
|
'defaultValue' => 'is:pr is:open sort:created-desc',
|
|
|
|
'required' => true
|
2022-07-01 16:10:30 +03:00
|
|
|
]
|
2021-03-29 20:15:56 +03:00
|
|
|
],
|
|
|
|
'Pull Request comments' => [
|
|
|
|
'i' => [
|
|
|
|
'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
|
2022-07-01 16:10:30 +03:00
|
|
|
]
|
|
|
|
]
|
2021-03-29 20:15:56 +03:00
|
|
|
];
|
|
|
|
|
|
|
|
const BRIDGE_OPTIONS = [0 => 'Project Pull Requests', 1 => 'Pull Request comments'];
|
|
|
|
const URL_PATH = 'pull';
|
|
|
|
const SEARCH_QUERY_PATH = 'pulls';
|
|
|
|
}
|