Added GitHub init (#5317)
- Added github:init to allow full import, as opposed to gitHub:sync which allows partial sync and therefore respecting Github API Limit quota. --------- Co-authored-by: Ady Beraud <a.beraud96@gmail.com>
This commit is contained in:
15
packages/twenty-website/src/github/github-sync.ts
Normal file
15
packages/twenty-website/src/github/github-sync.ts
Normal file
@ -0,0 +1,15 @@
|
||||
import { fetchAndSaveGithubData } from '@/github/fetch-and-save-github-data';
|
||||
|
||||
export const githubSync = async () => {
|
||||
const pageLimitFlagIndex = process.argv.indexOf('--pageLimit');
|
||||
let pageLimit = 0;
|
||||
|
||||
if (pageLimitFlagIndex > -1) {
|
||||
pageLimit = parseInt(process.argv[pageLimitFlagIndex + 1], 10);
|
||||
}
|
||||
|
||||
await fetchAndSaveGithubData({ pageLimit });
|
||||
process.exit(0);
|
||||
};
|
||||
|
||||
githubSync();
|
||||
Reference in New Issue
Block a user