Skip to content

Conversation

@palas
Copy link
Contributor

@palas palas commented Aug 22, 2014

I have added the functionality for searching code: https://developer.github.com/v3/search/#search-code

I had to make several of the fields of "Repo" optional, but I have updated the samples accordingly.

Finally, I added the sample Search/SearchCode.hs, to illustrate the functionality.

@jwiegley
Copy link
Contributor

@nataren @maxpow4h How does this look to you guys? I leave merging of pull requests up to you now, to avoid disrupting anything you might have in progress.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we leave spaces between the inner type and the brackets ('[' and ']')

@nataren
Copy link
Collaborator

nataren commented Aug 23, 2014

Hi @palas, thanks for the change, I added some comment to specific parts of the code. Also, please bump the version to 0.11 in the github.cabal file and rebase your changes to a single commit once we are done with the changes.

@jwiegley The change looks good, and it does not interfere with anything I am working on (which is related to Commits and Refs).

@palas
Copy link
Contributor Author

palas commented Aug 23, 2014

Fixed. :)

@nataren
Copy link
Collaborator

nataren commented Aug 23, 2014

@palas 👍 Thanks. Looks good. I just realized that since the kind of terms that can be in the q (query) parameter changes depending on the search end-point, it would be great to create a small DSL that let's you build those queries for the specific type of search; the benefit would be better discoverability and type safety. Probably a version 2 of this change.

@jwiegley 👍

jwiegley added a commit that referenced this pull request Aug 23, 2014
Added basic code search functionality
@jwiegley jwiegley merged commit 6911ee6 into haskell-github:master Aug 23, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants