Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 10 additions & 12 deletions scripts/dashboard/build-dashboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,9 @@ async function getDiscussions(
}

return result.search.nodes.concat(await getDiscussions(query, pageSize, result.search.pageInfo.endCursor));
} catch (e) {
logger.error(e);

return Promise.reject(e);
} catch (error) {
logger.error(error);
throw error;
}
}

Expand Down Expand Up @@ -138,10 +137,9 @@ async function getDiscussionByID(isPR: boolean, id: string): Promise<PullRequest
});

return result;
} catch (e) {
logger.error(e);

return Promise.reject(e);
} catch (error) {
logger.error(error);
throw error;
}
}

Expand Down Expand Up @@ -193,9 +191,9 @@ async function processHotDiscussions(batch: HotDiscussionsIssuesNode[]): Promise
labels: discussion.labels ? discussion.labels.nodes : [],
score: finalInteractionsCount / (monthsSince(discussion.timelineItems.updatedAt) + 2) ** 1.8
};
} catch (e) {
} catch (error) {
logger.error(`there were some issues while parsing this item: ${JSON.stringify(discussion)}`);
throw e;
throw error;
}
})
);
Expand Down Expand Up @@ -307,9 +305,9 @@ async function start(writePath: string): Promise<void> {
]);

await writeToFile({ hotDiscussions, goodFirstIssues }, writePath);
} catch (e) {
} catch (error) {
logger.error('There were some issues parsing data from github.');
logger.error(e);
logger.error(error);
}
}

Expand Down