import { PostHandler } from '../post_handler' class GithubHandler extends PostHandler { constructor () { super() this.name = 'github' this.type = 'custom' } async handle ( data: any, raw: any, args: any ) { const type = args?.type console.log(JSON.stringify(data)) let author = data.author if (author && typeof author === 'object') { author = author.name } if (type === 'commit' || type === 'release') { const icon = raw['media:thumbnail'][0]['$']?.url data.content = `
Author: @${author}
${data.content}` } else { data.content = `
Author: @${author}
${data.content}` } return { valid: true, content: data } } } export default new GithubHandler()