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 Kibela WebHook #75

Merged
merged 7 commits into from Apr 4, 2017
Merged

Add Kibela WebHook #75

merged 7 commits into from Apr 4, 2017

Conversation

@yoshiori
Copy link
Contributor

yoshiori commented Mar 24, 2017

Add support for Kibela WebHook

idobata_2017-03-24_19-24-19

@hibariya
Copy link
Member

hibariya commented Mar 27, 2017

@yoshiori Thank you for the Pull Request! I'll confirm the details as soon as possible.

module Idobata::Hook
class Kibela < Base
screen_name 'kibe.la'
icon_url hook_image_url('icon.png')

This comment has been minimized.

Copy link
@hibariya

hibariya Mar 27, 2017

Member

It seems there is not the icon.png here but icon.jpg is. I'd like to use png format rather than jpg as far as possible. How about replacing icon.jpg with this ? (It can be found in this article).

This comment has been minimized.

Copy link
@yoshiori

yoshiori Mar 27, 2017

Author Contributor

🙏 Sorry. Fix it. db277f0

This comment has been minimized.

Copy link
@hibariya

hibariya Mar 27, 2017

Member

Thank you 😸

Yoshiori SHOJI
@yoshiori yoshiori force-pushed the yoshiori:add_support_kibela branch from f9b5a88 to db277f0 Mar 27, 2017
Copy link
Member

hibariya left a comment

I've tried this branch on my development environment. Could you please check the comments?

</span>
kibe
deleted
<a href='https://docs.kibe.la/@kibe/1#comment_1'></a>

This comment has been minimized.

Copy link
@hibariya

hibariya Mar 27, 2017

Member

I think that we will want to know the link of the comment when the notification comes. Although a comment doesn't have its title, we can use the title of it's entry (blog entry or wiki page) like this:

on created:
selection_614

on deleted:
selection_615

💭 I guess that a payload of comment event includes information about either Blog or Wiki, and both of them has title.

This comment has been minimized.

Copy link
@hibariya

hibariya Mar 27, 2017

Member

Additionally, leading <i> and 【comment】 may unnecessary. Even if without them, (in my opinion) the notifications look informative enough.

This comment has been minimized.

Copy link
@yoshiori

yoshiori Mar 31, 2017

Author Contributor

I modified notification message. c171eb0

This comment has been minimized.

Copy link
@hibariya

hibariya Apr 4, 2017

Member

That looks very good!

class Kibela < Base
screen_name 'kibe.la'
icon_url hook_image_url('icon.png')
template_name { "#{action}.html.haml" }

This comment has been minimized.

Copy link
@hibariya

hibariya Mar 27, 2017

Member

Kibela sends a test notification. Notifying user either the hook setting succeeded or not seems important. Could you support that?

📝 For your information: When I clicked the "Send Test" on Webhook page on Kibela,

selection_593

Then I got a payload like this:

{
  "team": {
    "name": "idobata",
    "url": "https://idobata.kibe.la/"
  },
  "resource_type": "test",
  "action": "send",
  "action_user": {
    "id": 2,
    "account": "hibariya",
    "real_name": "",
    "url": "https://idobata.kibe.la/@hibariya",
    "avatar_photo": {
      "url": "https://cdn.kibe.la/media/public/1600/W1siZiIsInB1YmxpYy9kZWZhdWx0X2F2YXRhcnMvYXZhdGFyMkAyeC5wbmciXSxbInAiLCJlbmNvZGUiLCJwbmciXSxbInAiLCJjb252ZXJ0IiwiLWFscGhhIHNldCAtYmFja2dyb3VuZCBub25lIC12aWduZXR0ZSAweDArMCswIl0sWyJwIiwidGh1bWIiLCI0MHg0MCJdXQ/6a6e944cbdd1681b/file.png"
    }
  }
}

This comment has been minimized.

Copy link
@yoshiori

yoshiori Mar 31, 2017

Author Contributor

Fix 0901b39

This comment has been minimized.

Copy link
@hibariya

hibariya Apr 4, 2017

Member

Thanks!

payload.action
end

def hide_body?

This comment has been minimized.

Copy link
@hibariya

hibariya Mar 27, 2017

Member

This looks nice option 👍

@hibariya hibariya merged commit ce5d0ae into idobata:master Apr 4, 2017
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@yoshiori
Copy link
Contributor Author

yoshiori commented Apr 4, 2017

🎉

@hibariya
Copy link
Member

hibariya commented Apr 4, 2017

I've deployed this to https://idobata.io 🎉 @yoshiori Thank you again!

@yoshiori yoshiori deleted the yoshiori:add_support_kibela branch Apr 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.