support the delegate filter for REST API #36
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.
The REST API does not add the delegate filter to the REST API query, which
makes using -d give unexpected results:
If you add -d then you will still obtain all patches, and then
print them out sorted by delegate.
Fix this by passing the delegate as a filter to the query command.
I suspect this was not implemented before because the REST API may not
actually allow partial names for the delegate. I believe this is still
valuable to support even if it requires strict matching against the
delegate names or IDs.
If a match is desirable, this could be refactored to query the set of
delegates from the API, find all the IDs which match, and then make
multiple calls to _list for each matching delegate ID. I did not attempt to
implement that.
Signed-off-by: Jacob Keller [email protected]