grokify / chathooks

Service to convert webhook messages to your favorite chat / team messaging format. Run transparently as a formatting webhook proxy.

Home Page:https://grokify.github.io/chathooks/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support stripping Stack inbound webhook code block auto URL links

grokify opened this issue Β· comments

Support removing auto URL link in code block because Glip [code] block cannot interpret links with in the block.

Example:

"curl -gkvL -H 'User-Agent: updown.io daemon 2.2' -H 'Accept: */*' -H 'Connection: Close' -H 'Accept-Language: en' -m 30 --connect-timeout 5 \u003chttp://example.com|http://example.com\u003e"

https://github.com/grokify/chathooks/blob/master/docs/handlers/slack/event-example_link-emoji.json

{
  "username":"updown.io",
  "attachments":[
    {
      "text":"Down since *20:17:29 (CEST)*, reason: *Couldn't find the string*",
      "fallback":"DOWN ALERT: http://example.com Down since 20:17:29 (CEST), reason: Couldn't find the string",
      "mrkdwn_in":[
        "text",
        "pretext",
        "fields"
      ],
      "pretext":"DOWN ALERT: :frowning:",
      "author_name":"http://example.com",
      "author_icon":"https://staging.updown.io/checks/mycheck/favicon",
      "author_link":"http://example.com",
      "color":"#e43",
      "fields":[
        {
          "title":"String match:",
          "value":"_β€œ12345”_",
          "short":true
        },
        {
          "title":"πŸ”‡ Mute alerts:",
          "value":"\u003chttps://staging.updown.io/checks/mycheck/mute#1h|For 1 hour\u003e, \u003chttps://staging.updown.io/checks/mycheck/mute#1d|for 1 day\u003e, \u003chttps://staging.updown.io/checks/mycheck/mute#1w|for 1 week\u003e, \u003chttps://staging.updown.io/checks/mycheck/mute#recovery|until recovery\u003e or \u003chttps://staging.updown.io/checks/mycheck/mute#forever|forever\u003e"
        },
        {
          "title":"↻ Reproduce request:",
          "value":"```curl -gkvL -H 'User-Agent: updown.io daemon 2.2' -H 'Accept: */*' -H 'Connection: Close' -H 'Accept-Language: en' -m 30 --connect-timeout 5 \u003chttp://example.com|http://example.com\u003e```"
        }
      ]
    }
  ],
  "icon_url":"https://updown.io/square-logo.png"
}

Before and after screenshots:

Before

Screen Shot 2019-06-20 at 12 01 54 PM

After

Screen Shot 2019-06-20 at 12 02 10 PM