mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
fix(GitHub Node): Fix issue with user loading not completing (#17122)
This commit is contained in:
@@ -37,13 +37,23 @@ export async function getUsers(
|
||||
): Promise<INodeListSearchResult> {
|
||||
const page = paginationToken ? +paginationToken : 1;
|
||||
const per_page = 100;
|
||||
const responseData: UserSearchResponse = await githubApiRequest.call(
|
||||
this,
|
||||
'GET',
|
||||
'/search/users',
|
||||
{},
|
||||
{ q: filter, page, per_page },
|
||||
);
|
||||
|
||||
let responseData: UserSearchResponse = {
|
||||
items: [],
|
||||
total_count: 0,
|
||||
};
|
||||
|
||||
try {
|
||||
responseData = await githubApiRequest.call(
|
||||
this,
|
||||
'GET',
|
||||
'/search/users',
|
||||
{},
|
||||
{ q: filter, page, per_page },
|
||||
);
|
||||
} catch {
|
||||
// will fail if the owner does not have any users
|
||||
}
|
||||
|
||||
const results: INodeListSearchItems[] = responseData.items.map((item: UserSearchItem) => ({
|
||||
name: item.login,
|
||||
|
||||
Reference in New Issue
Block a user