mirror of
https://github.com/openclaw/clawhub.git
synced 2026-08-14 08:52:21 +00:00
- Enhanced AGENTS.md with clearer project structure and development commands. - Updated CHANGELOG.md to reflect recent fixes and additions. - Improved formatting in CONTRIBUTING.md for better readability. - Adjusted package.json and configuration files for consistent command structure. - Refined README.md and VISION.md for clarity and organization. - Standardized code formatting in various TypeScript files for consistency. These changes aim to enhance documentation clarity and maintainability across the repository.
19 lines
517 B
TypeScript
19 lines
517 B
TypeScript
export const GITHUB_PROFILE_SYNC_WINDOW_MS = 6 * 60 * 60 * 1000;
|
|
|
|
export function shouldScheduleGitHubProfileSync(
|
|
user:
|
|
| {
|
|
deletedAt?: number;
|
|
deactivatedAt?: number;
|
|
githubProfileSyncedAt?: number;
|
|
}
|
|
| null
|
|
| undefined,
|
|
now: number,
|
|
) {
|
|
if (!user || user.deletedAt || user.deactivatedAt) return false;
|
|
const lastSyncedAt = user.githubProfileSyncedAt ?? null;
|
|
if (lastSyncedAt && now - lastSyncedAt < GITHUB_PROFILE_SYNC_WINDOW_MS) return false;
|
|
return true;
|
|
}
|