This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/node_modules/cypress-image-snapshot/plugin.js b/node_modules/cypress-image-snapshot/plugin.js | |
index 106d726..4ca37b5 100644 | |
--- a/node_modules/cypress-image-snapshot/plugin.js | |
+++ b/node_modules/cypress-image-snapshot/plugin.js | |
@@ -96,7 +96,9 @@ function matchImageSnapshotPlugin({ path: screenshotPath }) { | |
// remove the cypress v5+ native retries suffix from the file name | |
const snapshotIdentifier = name.replace(/ \(attempt [0-9]+\)/, ''); | |
- const relativePath = _path2.default.relative(screenshotsFolder, screenshotDir); | |
+ // always write snapshot images to root snapshots directory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { google } from 'googleapis'; | |
import { Injectable, HttpService } from '@nestjs/common'; | |
import { InjectSchedule, Schedule } from 'nest-schedule'; | |
import { LoggerService } from '../logger/logger.service'; | |
interface GoogleCalendarEvent { | |
id: string; | |
summary: string; | |
description: string; | |
// ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async processEvent(event: GoogleCalendarEvent) { | |
// Test event for a summary in the format of '[#channel] ...' | |
const regex = /^\[(#[a-z0-9-_]+)\]/; | |
const elements = regex.exec(event.summary); | |
// This event does not match format (could have been processed before) | |
if (elements === null) { | |
return; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface GoogleCalendarEvent { | |
id: string; | |
summary: string; | |
description: string; | |
} | |
async pollCalendarEvents() { | |
// Define a range of twice the polling interval (in case of polling delays) | |
const timeNow = new Date(); | |
const timeMin = new Date(timeNow.getTime() - this.POLLING_INTERVAL * 2); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create a new GoogleAuth instance with service-account credentials from a json file. | |
// Note: credential file location must be set in GOOGLE_APPLICATION_CREDENTIALS env variable | |
const auth = new google.auth.GoogleAuth({ | |
scopes: ['https://www.googleapis.com/auth/calendar'], | |
clientOptions: { | |
// Overwrite JWT subject to 'impersonate' calendar user | |
subject: '[email protected]' | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create a new GoogleAuth instance with service-account credentials from a json file. | |
// Note: credential file location must be set in GOOGLE_APPLICATION_CREDENTIALS env variable | |
const auth = new google.auth.GoogleAuth({ | |
scopes: ['https://www.googleapis.com/auth/calendar'], | |
clientOptions: { | |
// Overwrite JWT subject to 'impersonate' calendar user | |
subject: '[email protected]' | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |