Open kavin-kr opened 2 years ago
If needed, we can use Into<Option>
impl for ReposListVisibility
and ReposListType
to maintain backward compatibility.
@augustuswm Can you take a look into this PR? This PR was opened a long ago. If there are any changes needed, feel free to mention it, I'll do it
Same problem here.
I'm running into this issue too e.g:
let repos = github
.repos()
.list_all_for_authenticated_user(
ReposListVisibility::All,
"",
ReposListType::Member,
octorust::types::ReposListOrgSort::FullName,
octorust::types::Order::Asc,
None,
None,
)
.await
.unwrap()
.body;
Error:
Error HTTP Error. Code: 422 Unprocessable Entity, message: {"message":"If you specify visibility or affiliation, you cannot specify type.","documentation_url":"https://docs.github.com/rest/reference/repos#list-repositories-for-the-authenticated-user","status":"422"}
In GitHub's list repo for authenticated user api, using
type
parameter along withvisibility
oraffiliation
will cause 422 error. Hence markedReposListVisibility
andReposListType
as optional params to skip in query params.ref: https://docs.github.com/en/rest/repos/repos#list-repositories-for-the-authenticated-user