Skip to content

Conversation

m1guelpf
Copy link
Contributor

@m1guelpf m1guelpf commented Jan 11, 2017

Shows repos owned by the logged-in user

@m1guelpf m1guelpf changed the title Repos owned Show repos owned by user Jan 11, 2017
Copy link
Collaborator

@Nyholm Nyholm left a comment

Choose a reason for hiding this comment

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

Thank you for this PR. I had some comments. I also miss some tests for this endpoint.


/**
* List all repositories owned by the user.
*
Copy link
Collaborator

Choose a reason for hiding this comment

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

* @param int|null $id The integer ID of the last Repository that you’ve seen.
*
* @return array list of users found
*/
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should allow for parameters here instead of just the id.

See a full set of parameters here: https://developer.github.com/v3/repos/#list-your-repositories

* @return array list of users found
*/
public function owned($id = null)
public function owned($visibility = all, $sort = full_name, $id = null)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think you missed this comment

@m1guelpf
Copy link
Contributor Author

@Nyholm Done!

@m1guelpf
Copy link
Contributor Author

@Nyholm Fixed the tests. I think it's ready for merge...

@Nyholm
Copy link
Collaborator

Nyholm commented Jan 12, 2017

I just discovered this: https://github.com/KnpLabs/php-github-api/blob/2.0.1/lib/Github/Api/User.php#L168-L180

I do dit not know of that before. It seams like this functionality already exists. Im not too sure what our policy on redundant functions are. I suggest closing this PR.

FYI: It looks good but you missed #501 (comment)

@m1guelpf m1guelpf closed this Jan 12, 2017
@m1guelpf m1guelpf deleted the repos-owned branch January 12, 2017 14:56
@m1guelpf m1guelpf restored the repos-owned branch January 12, 2017 17:01
@m1guelpf m1guelpf reopened this Jan 12, 2017
@m1guelpf
Copy link
Contributor Author

@Nyholm Reopened as myRepositories() doesn't work as expected. Also, I added docs for #501 (comment) on the top of the function.

@m1guelpf
Copy link
Contributor Author

@Nyholm Updates?

* List all repositories owned by the user.
*
* @link https://developer.github.com/v3/repos/#list-your-repositories
*
Copy link
Collaborator

Choose a reason for hiding this comment

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

The order of the phpdoc parameters is wrong, the $id param doc should be moved to the last position

@m1guelpf
Copy link
Contributor Author

@Nyholm Updates?

@Nyholm
Copy link
Collaborator

Nyholm commented Jan 26, 2017

I think this PR should be closed. This functionality is already implemented by https://github.com/KnpLabs/php-github-api/blob/2.0.1/lib/Github/Api/User.php#L168-L180

$github->user()->myRepositories();

@m1guelpf
Copy link
Contributor Author

@Nyholm That function didn't work when I tested it.

@Nyholm
Copy link
Collaborator

Nyholm commented Jan 26, 2017

Let's try to fix that one instead of replacing it.

@Nyholm Nyholm closed this Feb 1, 2017
@m1guelpf m1guelpf deleted the repos-owned branch February 1, 2017 17:04
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