Skip to content

Issues API: Add support for 'scope' parameter #247

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 15, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/Gitlab/Api/Issues.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class Issues extends AbstractApi
* @var string $labels Comma-separated list of label names, issues must have all labels to be returned.
* No+Label lists all issues with no labels.
* @var string $milestone The milestone title.
* @var string scope Return issues for the given scope: created-by-me, assigned-to-me or all. Defaults to created-by-me
* @var int[] $iids Return only the issues having the given iid.
* @var string $order_by Return requests ordered by created_at or updated_at fields. Default is created_at.
* @var string $sort Return requests sorted in asc or desc order. Default is desc.
Expand All @@ -33,6 +34,9 @@ public function all($project_id = null, array $parameters = [])
return count($value) == count(array_filter($value, 'is_int'));
})
;
$resolver->setDefined('scope')
->setAllowedValues('scope', ['created-by-me', 'assigned-to-me', 'all'])
;
$resolver->setDefined('order_by')
->setAllowedValues('order_by', ['created_at', 'updated_at'])
;
Expand Down