-
-
Notifications
You must be signed in to change notification settings - Fork 598
Show repos owned by user #501
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
Conversation
[ci skip] [skip ci]
There was a problem hiding this 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. | ||
* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is wrong link. Should be: https://developer.github.com/v3/repos/#list-your-repositories
* @param int|null $id The integer ID of the last Repository that you’ve seen. | ||
* | ||
* @return array list of users found | ||
*/ |
There was a problem hiding this comment.
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
lib/Github/Api/Repo.php
Outdated
* @return array list of users found | ||
*/ | ||
public function owned($id = null) | ||
public function owned($visibility = all, $sort = full_name, $id = null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets to a $param
like other endpoints: https://github.com/KnpLabs/php-github-api/blob/master/lib/Github/Api/Issue.php#L32
There was a problem hiding this comment.
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
@Nyholm Done! |
@Nyholm Fixed the tests. I think it's ready for merge... |
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) |
@Nyholm Reopened as myRepositories() doesn't work as expected. Also, I added docs for #501 (comment) on the top of the function. |
@Nyholm Updates? |
* List all repositories owned by the user. | ||
* | ||
* @link https://developer.github.com/v3/repos/#list-your-repositories | ||
* |
There was a problem hiding this comment.
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
@Nyholm Updates? |
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(); |
@Nyholm That function didn't work when I tested it. |
Let's try to fix that one instead of replacing it. |
Shows repos owned by the logged-in user