We have detected an error in your notification set-up
(Event-ID dab39dc24f564ec7bd4628d1305fd03c).
Currently, we cannot inform you about inspection progress.
Please check that the user
557058:bca11929-8c2d-43f2-8a82-c5416880d395
still has access to your repository or
update the API account.
1 | <?php |
||
22 | class BranchRestrictions extends Api |
||
23 | { |
||
24 | /** |
||
25 | * Allowed restrictions to create a new branch permission for |
||
26 | * @var array |
||
27 | */ |
||
28 | protected $allowedRestrictionTypes = array( |
||
29 | 'require_tasks_to_be_completed', |
||
30 | 'require_passing_builds_to_merge', |
||
31 | 'force', |
||
32 | 'require_all_dependencies_merged', |
||
33 | 'push', |
||
34 | 'require_approvals_to_merge', |
||
35 | 'enforce_merge_checks', |
||
36 | 'restrict_merges', |
||
37 | 'reset_pullrequest_approvals_on_change', |
||
38 | 'delete' |
||
39 | ); |
||
40 | |||
41 | /** |
||
42 | * Get the information associated with a repository's branch restrictions |
||
43 | * |
||
44 | * @access public |
||
45 | * @param string $account The team or individual account owning the repository. |
||
46 | * @param string $repo The repository identifier. |
||
47 | * @return ResponseInterface |
||
48 | */ |
||
49 | 1 | public function all($account, $repo) |
|
55 | |||
56 | /** |
||
57 | * Creates restrictions for the specified repository. |
||
58 | * |
||
59 | * @access public |
||
60 | * @param string $account The team or individual account owning the repository. |
||
61 | * @param string $repo The repository identifier. |
||
62 | * @param array|string $params Additional parameters as array or JSON string |
||
63 | * @return ResponseInterface |
||
64 | * |
||
65 | * @throws \InvalidArgumentException |
||
66 | */ |
||
67 | 6 | public function create($account, $repo, $params = array()) |
|
94 | |||
95 | /** |
||
96 | * Get a specific restriction |
||
97 | * |
||
98 | * @access public |
||
99 | * @param string $account The team or individual account owning the repository. |
||
100 | * @param string $repo The repository identifier. |
||
101 | * @param int $id The restriction's identifier. |
||
102 | * @return ResponseInterface |
||
103 | */ |
||
104 | 1 | public function get($account, $repo, $id) |
|
110 | |||
111 | /** |
||
112 | * Updates a specific branch restriction. |
||
113 | * |
||
114 | * @access public |
||
115 | * @param string $account The team or individual account owning the repository. |
||
116 | * @param string $repo The repository identifier. |
||
117 | * @param int $id The restriction's identifier. |
||
118 | * @param array|string $params Additional parameters as array or JSON string |
||
119 | * @return ResponseInterface |
||
120 | * |
||
121 | * @throws \InvalidArgumentException |
||
122 | */ |
||
123 | 4 | public function update($account, $repo, $id, $params = array()) |
|
144 | |||
145 | /** |
||
146 | * Delete a specific branch restriction. |
||
147 | * |
||
148 | * @access public |
||
149 | * @param string $account The team or individual account owning the repository. |
||
150 | * @param string $repo The repository identifier. |
||
151 | * @param int $id The restriction's identifier. |
||
152 | * @return ResponseInterface |
||
153 | * |
||
154 | * @throws \InvalidArgumentException |
||
155 | */ |
||
156 | 1 | public function delete($account, $repo, $id) |
|
162 | |||
163 | /** |
||
164 | * Add allowed permission types |
||
165 | * |
||
166 | * @param array $restrictions |
||
167 | */ |
||
168 | 1 | public function addAllowedRestrictionType($restrictions = array()) |
|
172 | } |
||
173 |