@@ -67,10 +67,16 @@ defaultConfig = Config "https://iohk.zendesk.com" "" "daedalus-bug-reports@iohk.
6767knowledgebasePath :: FilePath
6868knowledgebasePath = " ./knowledgebase/knowledge.csv"
6969
70+ tokenPath :: FilePath
71+ tokenPath = " token"
72+
73+ assignToPath :: FilePath
74+ assignToPath = " assign_to"
75+
7076main :: IO ()
7177main = do
72- token <- B8. readFile " token " -- Zendesk token
73- assignto <- B8. readFile " assign_to " -- Select assignee
78+ token <- B8. readFile tokenPath -- Zendesk token
79+ assignto <- B8. readFile assignToPath -- Select assignee
7480 putStrLn " Reading knowledge base"
7581 knowledges <- setupKnowledgebaseEnv knowledgebasePath
7682 putStrLn " Knowledgebase setup complete"
@@ -139,12 +145,12 @@ inspectAttachmentAndPostComment cfg@Config{..} agentId ticketId att = do
139145 (comment, tags, isPublicComment) <- inspectAttachment cfgNumOfLogsToAnalyze cfgKnowledgebase att
140146 postTicketComment cfg agentId ticketId comment tags isPublicComment
141147
142- -- | Given number of file of inspect, knowledge and attachment,
148+ -- | Given number of file of inspect, knowledgebase and attachment,
143149-- analyze the logs and return the results.
144150--
145151-- The results are following:
146152--
147- -- __(comment, tags, bool of wether is should be public comment)__
153+ -- __(comment, tags, bool of whether is should be public comment)__
148154inspectAttachment :: Int -> [Knowledge ] -> Attachment -> IO (Text , [Text ], Bool )
149155inspectAttachment num ks att = do
150156 rawlog <- getAttachment att -- Get attachment
0 commit comments