-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Added enum ItemStateFilter to differentiate between search and list APIs #1140
Conversation
so after having a look at the changes on the PR I have to say that I am backflipping a little on what i said in the issue #1082 !! It looks like almost all usages of So Im wondering if perhaps we should:
That means less "overall" change, and the more sensible approach that |
@ryangribble |
Yep pretty much, and |
@ryangribble |
I'm not sure I follow? The search API would no longer take ItemState as an option (it would be ItemStateFilter) so they wouldn't be able to specify it anymore? |
I have made the changes. Take a look. |
hi @prayankmathur, as with the other PR it would be great if you could give this one a nice title and description when you can! 😀 In terms of your latest changes, Im still seeing several uses of To recap:
Your latest changes show |
…ing the necessary changes
@ryangribble And i hope you like the title. 😀 |
/// </summary> | ||
public ItemState State { get; protected set; } | ||
|
||
/// <summary> | ||
/// Whether the issue is open or close | ||
/// </summary> | ||
public ItemStateFilter FilteredState {get; protected set;} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This property shouldnt be needed
Looking really good! Down to very nitpick type comments now... Ive flagged a few whitespace and XmlDoc tidy ups The TravisCI build failure on linux was an environmental issue and not related to your changes... I've given it a kick @shiftkey - im thinking since this is a breaking change anyhow (replacing |
/// <summary> | ||
/// All the issues. The option is Obsolete | ||
/// </summary> | ||
[Obsolete("The method is Obsolete. Dont specify the state in case of all queries")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As per my other comment Im thinking we actually can just remove this guy and not need to Obsolete it, since we are making a breaking change anyway. Waiting for @shiftkey to confirm. If we DO need to obsolete it though, the warning message should be reworded, since this is not a "method". Something like
This value is obsolete and will be removed in a future version. For Request operations please use ItemStateFilter.All. For Search, Create and Update operations, "all" is not a valid option.
@@ -121,23 +121,45 @@ public enum IssueFilter | |||
} | |||
|
|||
/// <summary> | |||
/// The range of states that an issue can be in. | |||
/// Range of states for "Issues", "Milestones" and "Pull Request" API. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't worry about the quotation marks here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shiftkey Removed the quotation marks. 😄
@@ -64,7 +64,7 @@ public Issue(Uri url, Uri htmlUrl, Uri commentsUrl, Uri eventsUrl, int number, I | |||
public int Number { get; protected set; } | |||
|
|||
/// <summary> | |||
/// Whether the issue is open or closed. | |||
/// Whether the issue is "open", "closed" or "all". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we're going to [Obsolete]
All
here, or just remove it, we should update the docs accordingly...
Just one more code comment to tidy up and I think this is good. @ryangribble how does this read for the breaking changes documentation:
|
@shiftkey |
@prayankmathur correct, this one #1140 (comment) |
@shiftkey |
@shiftkey |
@ryangribble over to you ✊ |
/// </summary> | ||
[Obsolete("The value is Obsolete and will be removed in a future release as it is not a valid option for Search, Create and Update operations")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As agreed by @shiftkey we can just DROP the All
option here, no need to mark it [Obsolete]
anymore
Hi guys, sorry for the delay I had a little break over the long weekend :) It's looking great now @prayankmathur... |
@ryangribble |
@ryangribble |
release_notes: Add |
@shiftkey it seems this fix didn't make it in to the Breaking Changes section of the release notes (I realised as it broke a couple of my scripts after I upgraded to latest), mind having a look and adding it in there? |
@alfhenrik ugh, yep, missed this one. Thanks for letting me know, I'll edit the GitHub release to include that change... |
For reference, I added this comment to the GitHub release:
@alfhenrik can I get a 👍 that this matches with what you were seeing? |
I was using |
Fixes #1082
I have added an enum "ItemStateFilter"
and tried to explain it in the xml docs.
You can review it.