From 80f988949ad2f8819ee36c037682fcf5b134825d Mon Sep 17 00:00:00 2001 From: Andreas Bielawski Date: Wed, 7 Sep 2016 23:40:50 +0200 Subject: [PATCH] GitHub: Nutze HTML und Autornamen, statt Committer --- otouto/plugins/github.lua | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/otouto/plugins/github.lua b/otouto/plugins/github.lua index 80432d4..83eb754 100644 --- a/otouto/plugins/github.lua +++ b/otouto/plugins/github.lua @@ -23,9 +23,9 @@ end function github:send_github_data(data) if not data.owner then return nil end - local name = '*'..utilities.md_escape(data.name)..'*' - local description = '_'..utilities.md_escape(data.description)..'_' - local owner = utilities.md_escape(data.owner.login) + local name = ''..data.name..'' + local description = ''..data.description..'' + local owner = data.owner.login local clone_url = data.clone_url if data.language == nil or data.language == "" then language = '' @@ -40,17 +40,17 @@ function github:send_github_data(data) if data.homepage == nil or data.homepage == "" then homepage = '' else - homepage = '\n[Homepage besuchen]('..data.homepage..')' + homepage = '\nHomepage besuchen' end - local text = name..' von '..owner..'\n'..description..'\n`git clone '..clone_url..'`'..language..issues..homepage + local text = name..' von '..owner..'\n'..description..'\n
git clone '..clone_url..'
'..language..issues..homepage return text end function github:send_gh_commit_data(gh_code, gh_commit_sha, data) - if not data.committer then return nil end - local committer = data.committer.name + if not data.author then return nil end + local author = data.author.name local message = utilities.md_escape(data.message) - local text = '`'..gh_code..'@'..gh_commit_sha..'` von *'..committer..'*:\n'..message + local text = ''..gh_code..'@'..gh_commit_sha..' von '..author..':\n'..message return text end @@ -63,7 +63,7 @@ function github:action(msg, config, matches) else output = github:send_gh_commit_data(gh_code, gh_commit_sha, data) end - utilities.send_reply(msg, output, true) + utilities.send_reply(msg, output, 'HTML') end return github \ No newline at end of file