-
-
Notifications
You must be signed in to change notification settings - Fork 597
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 sort and direction for fetching organizations repos #863
Conversation
lib/Github/Api/Organization.php
Outdated
* | ||
* @return array the repositories | ||
*/ | ||
public function repositories($organization, $type = 'all', $page = 1) | ||
public function repositories($organization, $type = 'all', $page = 1, $sort = 'created', $direction = 'desc') |
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 would change this so the default value is null
. Then check if the parameter is different from null
and then add it to a $parameters
array and pass it to the request.
This way we always use the default value of github and it won't cause BC breaks when github decided to change this default value
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.
Alright, I updated my PR. 😄
Thank you @pgrimaud |
No problem! This library is great! Thank you too! I got a micro income on GitHub sponsors. If you had a lower tier on GitHub sponsors ($1), I would like to sponsor you to share my income because you deserve it 🙏. |
The problem with such a small rate is the costs to accept it are pretty much the same as the payment value. |
Thanks for the kind words and the feedback! I've added a 2 dollar tier, because every little bit helps! 🎉 |
@GrahamCampbell Which fees? |
Hi,
It's possible to sort repositories of organizations here : https://developer.github.com/v3/repos/#list-organization-repositories.
I added
$sort
and$direction
parameters after actual parameters to avoid BC.Associated tests are updated too.