Properly check if a url match is a project / repository

This commit is contained in:
Rohid
2024-08-26 16:11:15 +06:00
parent 410ccc0f78
commit 3d1038de01
17 changed files with 242 additions and 77 deletions

View File

@@ -112,7 +112,7 @@ class WakaTimeCore {
* Depending on various factors detects the current active tab URL or domain,
* and sends it to WakaTime for logging.
*/
async recordHeartbeat(payload: Record<string, unknown> = {}): Promise<void> {
async recordHeartbeat(html: string, payload: Record<string, unknown> = {}): Promise<void> {
const apiKey = await getApiKey();
if (!apiKey) {
return changeExtensionState('notLogging');
@@ -164,7 +164,7 @@ class WakaTimeCore {
}
// Checks dev websites
const project = generateProjectFromDevSites(url);
const project = generateProjectFromDevSites(url, html);
// Check if code reviewing
const codeReviewing = isCodeReviewing(url);