Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add formatted links to build status notification #8

Closed
dblandin opened this issue Dec 11, 2014 · 9 comments
Closed

Add formatted links to build status notification #8

dblandin opened this issue Dec 11, 2014 · 9 comments

Comments

@dblandin
Copy link

Currently, build status notifications from hubot-circleci are formatted like this:

Success in build ### of https://github.com/owner/repo [branch/ref] Author: Commit Message - github

We're using Slack at work and it would be great to include some formatted links within the message. Particularly, having a link to quickly access the CircleCI build page would be awesome.

This is the format I'm thinking of:

Success in <https://circleci.com/gh/owner/repo/tree/branch|build ###> of <https://github.com/owner/repo|owner/repo> [branch/ref] Author: Commit Message - github

This final result would look like:

Success in build ### of owner/repo [branch/ref] Author: Commit Message - github

Would be happy to create a PR for this.

@Linuturk
Copy link
Contributor

We use Slack as well, and we have the CircleCI integration enabled. This does the pretty formatting for us.

I'd be careful about sending links to Circle through the bot, as the link expansion and really fudge with your results and make them unreadable. A good example is the circle list failed command. In IRC, this formats really well, but in Slack it really adds a lot of extra space.

@dblandin
Copy link
Author

Not really sure what you mean. A PR for this issue would update the formatting of messages sent to the chatroom. The goal would be to format links and to reduce that extra space in Slack.

@Linuturk
Copy link
Contributor

Oh, I think I understand now. I'd love to see an example of this to improve the output I just mentioned for a few of my commands. The owner of the org loves pull requests!

@dblandin
Copy link
Author

Sounds good! I'll put a PR together.

@dblandin
Copy link
Author

Looks like Slack is still fixing formatted links and attachments in their new adapter so I'll have to revisit this a little later.

slackapi/hubot-slack#114
slackapi/hubot-slack#108

@dylanlingelbach
Copy link
Contributor

@dblandin - awesome, thanks for looking at this. Do you know how this will work with other chat adapters (we use HipChat for example)?

@dblandin
Copy link
Author

We could modify the formatting rules based on the current adapter. The name of the adapter is exposed as of hubotio/hubot#663

@dylanlingelbach
Copy link
Contributor

👍

@dblandin
Copy link
Author

Unfortunately, I never got around to a PR for this. Seems like the work is still blocked by slackapi/hubot-slack#114 unless you wanted to integrate directly with the incoming webhooks API.

Going to close the issue for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants