MCPcopy Create free account
hub / github.com/dailydotdev/apps / isFridayDeploy

Function isFridayDeploy

packages/shared/src/features/patchy/patchyTriggers.ts:43–53  ·  view source on GitHub ↗
(
  now: Date,
  tags: string[] | undefined,
  { tags: deployTags, ...window }: PatchyConfig['fridayDeploy'],
)

Source from the content-addressed store, hash-verified

41const FRIDAY = 5;
42
43export const isFridayDeploy = (
44 now: Date,
45 tags: string[] | undefined,
46 { tags: deployTags, ...window }: PatchyConfig['fridayDeploy'],
47): boolean => {
48 if (getWindowStartDay(now, window)?.getDay() !== FRIDAY) {
49 return false;
50 }
51 const deploy = new Set(deployTags.map((tag) => tag.toLowerCase()));
52 return !!tags?.some((tag) => deploy.has(tag.toLowerCase()));
53};
54
55// Away = the last counted read is older than `awayMs` and nothing today yet.
56export const isAway = (

Callers 2

usePatchyCompanionFunction · 0.90

Calls 1

getWindowStartDayFunction · 0.85

Tested by

no test coverage detected