forked from github/plane
fix: workspace integration github repos issue resolved (#988)
This commit is contained in:
parent
20e400487f
commit
0fa9451633
@ -11,7 +11,7 @@ import { CustomSearchSelect } from "components/ui";
|
||||
// helpers
|
||||
import { truncateText } from "helpers/string.helper";
|
||||
// types
|
||||
import { IWorkspaceIntegration } from "types";
|
||||
import { IWorkspaceIntegration, IGithubRepository } from "types";
|
||||
|
||||
type Props = {
|
||||
integration: IWorkspaceIntegration;
|
||||
@ -54,7 +54,9 @@ export const SelectRepository: React.FC<Props> = ({
|
||||
isValidating,
|
||||
} = useSWRInfinite(getKey, fetchGithubRepos);
|
||||
|
||||
const userRepositories = (paginatedData ?? []).map((data) => data.repositories).flat();
|
||||
let userRepositories = (paginatedData ?? []).map((data) => data.repositories).flat();
|
||||
userRepositories = userRepositories.filter((data) => data?.id);
|
||||
|
||||
const totalCount = paginatedData && paginatedData.length > 0 ? paginatedData[0].total_count : 0;
|
||||
|
||||
const options =
|
||||
|
Loading…
Reference in New Issue
Block a user