AllMyChanges / original.allmychanges.com

A project for Django Dash 2013
BSD 2-Clause "Simplified" License
42 stars 9 forks source link

Post the changes on slack integration #43

Closed danielgomezrico closed 8 years ago

danielgomezrico commented 8 years ago

The actual slack integration just print

Look, new version of clojure/icepick was found: 3.2.0

Will be cool to see all the changelog for that version too.

svetlyak40wt commented 8 years ago

It is not always possible to overcome Slack's markup limitations. In general case, release notes can have any HTML markup including images other elements. I don't know way how to insert such content into the slack.

Do you have any ideas?

danielgomezrico commented 8 years ago

I sent a help request to slack to see if this is posible

svetlyak40wt commented 8 years ago

Ok, update this issue if you'll find out a way to post html into the slack. May be the have some sort of converter which will do the job.

danielgomezrico commented 8 years ago

@svetlyak40wt what about using tools like this https://github.com/domchristie/to-markdown?

svetlyak40wt commented 8 years ago

This could be the option. But I have to sind similar library for Python or to wrap https://github.com/domchristie/to-markdown into a microservice. Probably, will do some investigations on this holidays.

On Fri, Feb 26, 2016 at 6:53 PM, Daniel Gomez Rico <notifications@github.com

wrote:

@svetlyak40wt https://github.com/svetlyak40wt what about using tools like this https://github.com/domchristie/to-markdown?

— Reply to this email directly or view it on GitHub https://github.com/AllMyChanges/allmychanges.com/issues/43#issuecomment-189336063 .

Alexander Artemenko (a.k.a. Svetlyak 40wt) Blog: http://dev.svetlyak.ru Photos: http://svetlyak.ru Jabber: svetlyak.40wt@gmail.com

danielgomezrico commented 8 years ago

:+1:

dpwiz commented 8 years ago

I guess that was implemented recently... Now I need a checkbox to turn it back into abbreviated form.

This is not how a usable changelog looks: https://imgur.com/pKEEqz7

svetlyak40wt commented 8 years ago

@wiz sure, a adding settings will be useful. But in this case another "issue" should be created – we need to reformat markdown links into the format which Slack understands.

danielgomezrico commented 8 years ago

Slack support click "here for more" to enable autocollapsed posts, not sure if that works for web hooks but some integrations post like 4 lines and "click here for more" and then expands.

svetlyak40wt commented 8 years ago

Right. This uses "attachments" under the hood. But I've checked this feature and attachments dont support Slack's markup – only the links. No "bold", no code snippets. In this case, attachments looks worse than plain message without "here for more" link.

If you noticed, I've released new version of AllMyChanges today. It fixed most markup issues for Slack integration.

svetlyak40wt commented 8 years ago

@wiz do you really want an option to return back short notifications that some version was released? Or current version with fixed markup is OK?

dpwiz commented 8 years ago

Or current version with fixed markup is OK?

Some more fixes needed https://imgur.com/vDlDIuY

I'll wait for more samples now and report back :smile:

svetlyak40wt commented 8 years ago

BTW, Slack's support replied me with a way how to turn on markup support inside attachements. Probably, I'll try to switch to them soon if will have a free time.

svetlyak40wt commented 8 years ago

About images, I need to expreiment with them. Slack's markup is very restricted and took only some elements from markdown. Probably the only way to insert images into the text, is to insert it url as is.

svetlyak40wt commented 8 years ago

BTW, I've fixed slack notification representation to use attachments now they should be more usable.

danielgomezrico commented 8 years ago

@svetlyak40wt on which version?

svetlyak40wt commented 8 years ago

@danielgomezrico currently, AllMyChanges should send all notifications to slack as attachments. But there is still a problem with embedding images because they aren't supported inside attachments.

dpwiz commented 8 years ago

Inline link markup is a little wonky... https://imgur.com/kXy3PAC

svetlyak40wt commented 8 years ago

Seems, by stupid regex don't like spaces in the link's text. Will fix it. Thank you, @wiz!

dpwiz commented 8 years ago

https://imgur.com/g13AEho

Perhaps more readability could be gained by extracting links to "footnotes"?

svetlyak40wt commented 8 years ago

@wiz these links should be real links in Slack. Probably my markup converter wasn't able to handle them. Thank you.

dpwiz commented 8 years ago

So far, so good...

svetlyak40wt commented 8 years ago

Well, I'll close this issue. If you'll encounter other problems, please, open separate issues.