Update documentation to reflect the {state: "all"} option #629

Merged
merged 2 commits into from Aug 12, 2015

Projects

None yet

2 participants

@nilbus
Contributor
nilbus commented Aug 7, 2015

This applies to both issues and milestones where the default state is "open".
Although undocumented, the "all" option is confirmed to work.

See the API docs:

@nilbus nilbus Update documentation to reflect the {state: "all"} option
This applies to both issues and milestones where the default state is "open".
Although undocumented, the "all" option is confirmed to work.

See the API docs:
  * https://developer.github.com/v3/issues/#parameters-1
  * https://developer.github.com/v3/issues/milestones/#parameters
dea83c8
@pengwynn pengwynn commented on the diff Aug 10, 2015
lib/octokit/client/milestones.rb
@@ -28,7 +28,7 @@ def list_milestones(repository, options = {})
# @param repository [String, Repository, Hash] A GitHub repository.
# @param options [Hash] A customizable set of options.
# @option options [Integer] :milestone Milestone number.
- # @option options [String] :state (open) State: <tt>open</tt> or <tt>closed</tt>.
+ # @option options [String] :state (open) State: <tt>open</tt>, <tt>closed</tt>, or <tt>all</tt>.
@pengwynn
pengwynn Aug 10, 2015 Member

Oops, everything but number is existing copypasta. Mind removing :state, :sort, and `:direction here?

@pengwynn pengwynn commented on an outdated diff Aug 10, 2015
lib/octokit/client/milestones.rb
@@ -44,7 +44,7 @@ def milestone(repository, number, options = {})
# @param repository [String, Repository, Hash] A GitHub repository.
# @param title [String] A unique title.
# @param options [Hash] A customizable set of options.
- # @option options [String] :state (open) State: <tt>open</tt> or <tt>closed</tt>.
+ # @option options [String] :state (open) State: <tt>open</tt>, <tt>closed</tt>, or <tt>all</tt>.
@pengwynn
pengwynn Aug 10, 2015 Member

The all value works for listings, but isn't a valid value for specifying state on a milestone.

@pengwynn pengwynn commented on an outdated diff Aug 10, 2015
lib/octokit/client/milestones.rb
@@ -61,7 +61,7 @@ def create_milestone(repository, title, options = {})
# @param number [String, Integer] ID of the milestone
# @param options [Hash] A customizable set of options.
# @option options [String] :title A unique title.
- # @option options [String] :state (open) State: <tt>open</tt> or <tt>closed</tt>.
+ # @option options [String] :state (open) State: <tt>open</tt>, <tt>closed</tt>, or <tt>all</tt>.
@pengwynn
pengwynn Aug 10, 2015 Member

Same here, the all value works for listings, but isn't a valid value for specifying state on a milestone.

@pengwynn
Member

Thanks @nilbus. I left a couple of comments.

@nilbus
Contributor
nilbus commented Aug 10, 2015

😵 good catch! Thank you for looking so closely. I will update this soon.

@nilbus
Contributor
nilbus commented Aug 12, 2015

Updated! This looks better to me now.

@pengwynn
Member

🍰

@pengwynn pengwynn merged commit 46f1135 into octokit:master Aug 12, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment