From 8470c3d1dd49b57b8dc6197f2fd6e11448d9bede Mon Sep 17 00:00:00 2001 From: Bhavya U Date: Wed, 31 Jul 2024 22:48:00 -0700 Subject: [PATCH] Log botName and no-op (#305) --- classifier-deep/monitor/index.js | 6 ++++-- classifier-deep/monitor/index.ts | 8 +++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/classifier-deep/monitor/index.js b/classifier-deep/monitor/index.js index 21452254..9150bb4a 100644 --- a/classifier-deep/monitor/index.js +++ b/classifier-deep/monitor/index.js @@ -12,10 +12,12 @@ class DeepClassifierMonitor extends Action_1.Action { this.id = 'Classifier-Deep/Monitor'; } async onAssigned(issue, assignee) { + (0, utils_1.safeLog)(`Assigned to ${assignee}`); const assigner = await issue.getAssigner(assignee); + (0, utils_1.safeLog)(`Assigner is + ${assigner}`); if (assigner !== (0, utils_1.getRequiredInput)('botName')) { - await issue.removeLabel('triage-needed'); - await issue.removeLabel('stale'); + // await issue.removeLabel('triage-needed'); + // await issue.removeLabel('stale'); } } async onUnassigned(_issue, _assignee) { diff --git a/classifier-deep/monitor/index.ts b/classifier-deep/monitor/index.ts index f9621013..8d945299 100644 --- a/classifier-deep/monitor/index.ts +++ b/classifier-deep/monitor/index.ts @@ -5,16 +5,18 @@ import { OctoKitIssue } from '../../api/octokit'; import { Action } from '../../common/Action'; -import { getRequiredInput } from '../../common/utils'; +import { getRequiredInput, safeLog } from '../../common/utils'; class DeepClassifierMonitor extends Action { id = 'Classifier-Deep/Monitor'; protected async onAssigned(issue: OctoKitIssue, assignee: string): Promise { + safeLog(`Assigned to ${assignee}`); const assigner = await issue.getAssigner(assignee); + safeLog(`Assigner is + ${assigner}`); if (assigner !== getRequiredInput('botName')) { - await issue.removeLabel('triage-needed'); - await issue.removeLabel('stale'); + // await issue.removeLabel('triage-needed'); + // await issue.removeLabel('stale'); } }