Skip to content
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

Add authenticated user list repo #256

Closed
wants to merge 1 commit into from

Conversation

juli1
Copy link

@juli1 juli1 commented Mar 3, 2019

Add support for endpoint /user/repos as described in https://developer.github.com/v3/repos/#list-your-repositories .

Copy link
Contributor

@BenFradet BenFradet left a comment

Choose a reason for hiding this comment

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

Thanks 👍

Copy link

@bilki bilki left a comment

Choose a reason for hiding this comment

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

It looks good to me, thanks!

*
* @param accessToken to identify the authenticated user
* @param headers optional user headers to include in the request
* @param visiblility can be all, public, private
Copy link

Choose a reason for hiding this comment

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

Suggested change
* @param visiblility can be all, public, private
* @param visibility can be all, public, private

): M[GHResponse[List[Repository]]] =
httpClient.get[List[Repository]](
accessToken,
s"user/repos",
Copy link

Choose a reason for hiding this comment

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

Suggested change
s"user/repos",
"user/repos",

def listAuthenticatedUserRepos(
accessToken: Option[String] = None,
headers: Map[String, String] = Map(),
visibility: Option[String] = None,
Copy link

Choose a reason for hiding this comment

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

visibility and affiliation aren't being used within this request. Add them to the request query params like in listCommits endpoint. Keep in mind that you can't mix them with type param or github would return a 422 error.

Copy link
Contributor

@BenFradet BenFradet left a comment

Choose a reason for hiding this comment

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

The API has changed a fair bit since this PR was opened. As a result I'm closing this, feel free to open a new PR 👍

@BenFradet BenFradet closed this Mar 29, 2020
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