Create congratulations bot (#5404)
- Created congratulations bot : <img width="939" alt="Screenshot 2024-05-14 at 12 47 13" src="https://github.com/twentyhq/twenty/assets/102751374/5138515f-fe4d-4c6d-9c7a-0240accbfca9"> - Modified OG image - Added png extension to OG image route To be noted: The bot will not work until the new API route is not deployed. Please check OG image with Cloudflare cache. --------- Co-authored-by: Ady Beraud <a.beraud96@gmail.com>
This commit is contained in:
@ -1,14 +1,16 @@
|
||||
import { executePartialSync } from '@/github/execute-partial-sync';
|
||||
import { fetchAndSaveGithubData } from '@/github/fetch-and-save-github-data';
|
||||
|
||||
export const githubSync = async () => {
|
||||
const pageLimitFlagIndex = process.argv.indexOf('--pageLimit');
|
||||
let pageLimit = 0;
|
||||
const isFullSyncFlagIndex = process.argv.indexOf('--isFullSync');
|
||||
const isFullSync = isFullSyncFlagIndex > -1;
|
||||
|
||||
if (pageLimitFlagIndex > -1) {
|
||||
pageLimit = parseInt(process.argv[pageLimitFlagIndex + 1], 10);
|
||||
if (isFullSync) {
|
||||
await fetchAndSaveGithubData();
|
||||
} else {
|
||||
await executePartialSync();
|
||||
}
|
||||
|
||||
await fetchAndSaveGithubData({ pageLimit });
|
||||
process.exit(0);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user