mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 08:03:30 +02:00
fix all vulnerabilities in the production code (#817)
Signed-off-by: Denis barbaron <denis.barbaron@orange.com>
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
/**
|
||||
* Copyright © 2024 contains code contributed by Orange SA, authors: Denis Barbaron - Licensed under the Apache license 2.0
|
||||
**/
|
||||
|
||||
var util = require('util')
|
||||
|
||||
var WebClient = require('@slack/client').WebClient
|
||||
var WebClient = require('@slack/web-api')
|
||||
var Promise = require('bluebird')
|
||||
|
||||
var logger = require('../../util/logger')
|
||||
@@ -41,7 +45,9 @@ module.exports = function(options) {
|
||||
var format = entry.message.indexOf('\n') === -1 ? '`%s`' : '```%s```'
|
||||
var message = util.format(format, entry.message)
|
||||
|
||||
client.chat.postMessage(options.channel, util.format(
|
||||
client.chat.postMessage({
|
||||
channel: options.channel
|
||||
, text: util.format(
|
||||
'>>> *%s/%s* %d [*%s*] %s'
|
||||
, logger.LevelLabel[entry.priority]
|
||||
, entry.tag
|
||||
@@ -49,11 +55,9 @@ module.exports = function(options) {
|
||||
, entry.identifier
|
||||
, message
|
||||
)
|
||||
, {
|
||||
username: 'STF'
|
||||
, icon_url: 'https://openstf.io/favicon.png'
|
||||
}
|
||||
)
|
||||
, username: 'STF'
|
||||
, icon_url: 'https://openstf.io/favicon.png'
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user