Skip to content

Commit

Permalink
chore: remove telegram weekly update
Browse files Browse the repository at this point in the history
  • Loading branch information
0x4007 committed Sep 25, 2023
1 parent 7f374c6 commit 3da0c0e
Show file tree
Hide file tree
Showing 21 changed files with 5 additions and 665 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@
"parse5": "^7.1.2",
"prettier": "^2.7.1",
"probot": "^12.2.4",
"telegraf": "^4.11.2",
"tsx": "^3.12.7",
"yaml": "^2.2.2"
},
Expand Down
3 changes: 0 additions & 3 deletions src/adapters/index.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
import { Telegraf } from "telegraf";
import { BotConfig } from "../types";
import { Adapters } from "../types/adapters";
import { supabase } from "./supabase";
export * from "./telegram";

export const createAdapters = (config: BotConfig): Adapters => {
return {
supabase: supabase(config?.supabase?.url ?? process.env.SUPABASE_URL, config?.supabase?.key ?? process.env.SUPABASE_KEY),
telegram: new Telegraf(config?.telegram?.token ?? process.env.TELEGRAM_BOT_TOKEN).telegram,
};
};
57 changes: 0 additions & 57 deletions src/adapters/telegram/helpers/client.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/adapters/telegram/helpers/index.ts

This file was deleted.

2 changes: 0 additions & 2 deletions src/adapters/telegram/index.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/adapters/telegram/types/index.ts

This file was deleted.

45 changes: 0 additions & 45 deletions src/adapters/telegram/types/payload.ts

This file was deleted.

6 changes: 1 addition & 5 deletions src/bindings/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import ms from "ms";

import { BotConfig, BotConfigSchema, LogLevel } from "../types";
import {
DEFAULT_BOT_DELAY,
DEFAULT_DISQUALIFY_TIME,
DEFAULT_FOLLOWUP_TIME,
DEFAULT_PERMIT_BASE_URL,
Expand Down Expand Up @@ -80,10 +79,7 @@ export const loadConfig = async (context: Context): Promise<BotConfig> => {
url: process.env.SUPABASE_URL ?? "",
key: process.env.SUPABASE_KEY ?? "",
},
telegram: {
token: process.env.TELEGRAM_BOT_TOKEN ?? "",
delay: process.env.TELEGRAM_BOT_DELAY ? Number(process.env.TELEGRAM_BOT_DELAY) : DEFAULT_BOT_DELAY,
},

mode: {
permitMaxPrice: permitMaxPrice,
disableAnalytics: disableAnalytics,
Expand Down
2 changes: 1 addition & 1 deletion src/bindings/event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export const bindEvents = async (context: Context): Promise<void> => {
}

// Create adapters for telegram, supabase, twitter, discord, etc
logger.info("Creating adapters for supabase, telegram, twitter, etc...");
logger.info("Creating adapters for supabase, twitter, etc...");

logger.info(`Config loaded! config: ${JSON.stringify(botConfig)}`);

Expand Down
1 change: 0 additions & 1 deletion src/configs/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ export const COLORS = {
price: "1f883d",
};
// cspell:enable
export const DEFAULT_BOT_DELAY = 100; // 100ms
export const DEFAULT_TIME_RANGE_FOR_MAX_ISSUE = 24;
export const DEFAULT_TIME_RANGE_FOR_MAX_ISSUE_ENABLED = true;

Expand Down
4 changes: 2 additions & 2 deletions src/handlers/processors.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { GithubEvent, Handler, ActionHandler } from "../types";
import { closePullRequestForAnIssue, commentWithAssignMessage } from "./assign";
import { pricingLabelLogic, validatePriceLabels } from "./pricing";
import { checkTasksToUnassign, collectAnalytics, checkWeeklyUpdate } from "./wildcard";
import { checkTasksToUnassign, collectAnalytics } from "./wildcard";
import { nullHandler } from "./shared";
import { handleComment, issueClosedCallback, issueCreatedCallback, issueReopenedCallback } from "./comment";
import { checkPullRequests } from "./assign/auto";
Expand Down Expand Up @@ -75,4 +75,4 @@ export const processors: Record<string, Handler> = {
/**
* @dev The handlers which will run on every event hooked
*/
export const wildcardProcessors: ActionHandler[] = [checkTasksToUnassign, collectAnalytics, checkWeeklyUpdate];
export const wildcardProcessors: ActionHandler[] = [checkTasksToUnassign, collectAnalytics];
1 change: 0 additions & 1 deletion src/handlers/wildcard/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
export * from "./unassign";
export * from "./analytics";
export * from "./weekly";
24 changes: 0 additions & 24 deletions src/handlers/wildcard/weekly.ts

This file was deleted.

Loading

0 comments on commit 3da0c0e

Please sign in to comment.