aboutsummaryrefslogtreecommitdiff
path: root/bridges/GithubPullRequestBridge.php
blob: 82f901d1a64c4659fa450fa951b1dc273b28a9c2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php

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 = array(
		'global' => array(
			'u' => array(
				'name' => 'User name',
				'exampleValue' => 'RSS-Bridge',
				'required' => true
			),
			'p' => array(
				'name' => 'Project name',
				'exampleValue' => 'rss-bridge',
				'required' => true
			)
		),
		'Project Pull Requests' => array(
			'c' => array(
				'name' => 'Show Pull Request Comments',
				'type' => 'checkbox'
			),
			'q' => array(
				'name' => 'Search Query',
				'defaultValue' => 'is:pr is:open sort:created-desc',
				'required' => true
			)
		),
		'Pull Request comments' => array(
			'i' => array(
				'name' => 'Pull Request number',
				'type' => 'number',
				'exampleValue' => '2100',
				'required' => true
			)
		)
	);

	const BRIDGE_OPTIONS = array(0 => 'Project Pull Requests', 1 => 'Pull Request comments');
	const URL_PATH = 'pull';
	const SEARCH_QUERY_PATH = 'pulls';
}