Skip to content

Commit

Permalink
Fixed incomplete GitHub sync (twentyhq#5310)
Browse files Browse the repository at this point in the history
- Added await when fetching Github data to prevent the process from
exiting before saving to database

Co-authored-by: Ady Beraud <a.beraud96@gmail.com>
  • Loading branch information
ady-beraud and ady-test committed May 7, 2024
1 parent 43cd8cc commit 3052b49
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 59 deletions.
57 changes: 0 additions & 57 deletions packages/twenty-website/src/app/contributors/api/update/route.tsx

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ export const fetchAndSaveGithubData = async () => {
[],
)) as Array<IssueNode>;

savePRsToDB(fetchedPRs, assignableUsers);
saveIssuesToDB(fetchedIssues, assignableUsers);
await savePRsToDB(fetchedPRs, assignableUsers);
await saveIssuesToDB(fetchedIssues, assignableUsers);

console.log('data synched!');
};

0 comments on commit 3052b49

Please sign in to comment.