-
Notifications
You must be signed in to change notification settings - Fork 248
Add search by labels. #284
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
Changes from 4 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
39288df
Add search by labels.
a723a3d
Add search by labels.
22a135d
Add search by labels.
124ebec
Merge branch 'master' into master
aheritier 314ee71
Add search by labels.
3763e84
Merge remote-tracking branch 'origin/master'
3337f10
Add search by labels.
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Naming seems a little off to me, especially with the fact singular is used for returning a collection. How about something like..
getArticlesWithAllLabels
searchArticlesWithLabels
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.
I don't understand what is meant by "get" vs "search" if anything. The part I was looking to make clear was that one method requires at least one label to be found, the other requires all labels to be found. IMO, "WithAll" is good, but the idea of "with at least one" is not captured in the name "searchArticlesWithLabels". Not sure if "search" implies such behavior. You objected to the use of singular for returning a collection, I agree with that, I followed the existing pattern established by the
getArticleFromSearchmethod. I thinkgetArticlesFromSomeLabelsandgetArticlesFromAllLabelsbest captures the concerns, though I don't like the apparent API inconsistency with the singular Article vs Articles.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.
How about getArticlesFromAllLabels and getArticlesFromAnyLabels
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.
Works for me, as long as everyone doesn't mind the inconsistency of Article plurality with
getArticleFromSearch. Should I make the change, or will someone else do it?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.
Or introduce corrected method with deprecated annotation on the singular.
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.
Who is the "gatekeeper" of the public-facing API? I'm trying to add functionality but not dictate API design in general. I feel like someone more qualified should handle the naming issue. I'm happy with getArticlesFromAllLabels and getArticlesFromAnyLabels. I'm going to make that change and hope it goes through.