octokit.net
octokit.net copied to clipboard
Support for negative qualifiers
GitHub API V3 has a functionality where a - can be placed in front of a qualifier to negate its function.
extension:sql- Look in files with thesqlextension-extension:sql- Look in file that are notsqlfiles
I think this would be great functionality to have in octokit.net.
As the - syntax works for all string based search qualifiers, should we add them all at the same time?
Before going too deep on this, I want to call out two things:
- the work required to generate each search URL is already complex, and adding support for negation will potentially double the internals required e.g.
https://github.com/octokit/octokit.net/blob/3e7c70cf4e38ea29fd778cdc7bfb65ea4f88e8b5/Octokit/Models/Request/SearchCodeRequest.cs#L160-L228
- What should the user-facing API for this look like? We want to avoid breaking existing callers, if at all possible, but if breaking API changes are unavoidable I'd love to instead make this a new client API that we can experiment to then bake and figure out migration
My initial (though quite brief) thoughts were to just add additional properties for qualifiers to exclude, e.g. ExcludedExtensions but after thinking about it a bit more and seeing the first of your thoughts I agree that it would add unnecessary complexity to an already complex implementation.
👋 Hey Friends, this issue has been automatically marked as stale because it has no recent activity. It will be closed if no further activity occurs. Please add the Status: Pinned label if you feel that this issue needs to remain open/active. Thank you for your contributions and help in keeping things tidy!