fix(config-ui): cherry-pick and fixed #4439 and #4448 (#4467)

* fix(config-ui): github does not list private repositories (#4451)

* fix(config-ui): github does not list private membership organizations (#4453)
diff --git a/config-ui/src/plugins/github/api.ts b/config-ui/src/plugins/github/api.ts
index d174fe6..bb6bd00 100644
--- a/config-ui/src/plugins/github/api.ts
+++ b/config-ui/src/plugins/github/api.ts
@@ -25,8 +25,8 @@
 
 export const getUser = (prefix: string) => request(`${prefix}/user`);
 
-export const getUserOrgs = (prefix: string, username: string, params: PaginationParams) =>
-  request(`${prefix}/users/${username}/orgs`, {
+export const getUserOrgs = (prefix: string, params: PaginationParams) =>
+  request(`${prefix}/user/orgs`, {
     method: 'get',
     data: params,
   });
@@ -37,10 +37,13 @@
     data: params,
   });
 
-export const getUserRepos = (prefix: string, username: string, params: PaginationParams) =>
-  request(`${prefix}/users/${username}/repos`, {
+export const getUserRepos = (prefix: string, params: PaginationParams) =>
+  request(`${prefix}/user/repos`, {
     method: 'get',
-    data: params,
+    data: {
+      ...params,
+      type: 'owner',
+    },
   });
 
 type SearchRepoParams = {
diff --git a/config-ui/src/plugins/github/components/miller-columns/use-miller-columns.ts b/config-ui/src/plugins/github/components/miller-columns/use-miller-columns.ts
index 9210477..af986c4 100644
--- a/config-ui/src/plugins/github/components/miller-columns/use-miller-columns.ts
+++ b/config-ui/src/plugins/github/components/miller-columns/use-miller-columns.ts
@@ -85,7 +85,7 @@
   useEffect(() => {
     (async () => {
       const user = await API.getUser(prefix);
-      const orgs = await API.getUserOrgs(prefix, user.login, {
+      const orgs = await API.getUserOrgs(prefix, {
         page: 1,
         per_page: DEFAULT_PAGE_SIZE,
       });
@@ -114,7 +114,7 @@
 
       const isUser = item.id === user.login;
       const repos = isUser
-        ? await API.getUserRepos(prefix, user.login, {
+        ? await API.getUserRepos(prefix, {
             page: 1,
             per_page: DEFAULT_PAGE_SIZE,
           })
@@ -135,7 +135,7 @@
     const page = mapPage[column.parentId ?? 'root'];
     const isUser = column.parentId === user.login;
     const orgs = !column.parentId
-      ? await API.getUserOrgs(prefix, user.login, {
+      ? await API.getUserOrgs(prefix, {
           page,
           per_page: DEFAULT_PAGE_SIZE,
         })
@@ -143,7 +143,7 @@
 
     const repos = column.parentId
       ? isUser
-        ? await API.getUserRepos(prefix, user.login, {
+        ? await API.getUserRepos(prefix, {
             page,
             per_page: DEFAULT_PAGE_SIZE,
           })