Convos::Plugin::Bot::Action::Github - Act on GitHub webhooks
SYNOPSIS
Config file
---
actions:
- class: Convos::Plugin::Bot::Action::Github
repositories:
'convos-chat/convos':
- events: [ create, fork, issues, milestone, pull_request, star ]
to: 'irc-localhost/#convos'
Github webhook config
Github have to be configured to send webhooks to Convos.
Payload URL
"Payload URL" must be sent to the https://convos.chat/api.html#op-post--webhook--provider_name- endpoint, with "provider_name" set to "github". Example:
https://convos.example.com/api/webhook/github
Content type
"Content type" must be set to "application/json".
Secret
"Secret" can be left blank since Convos will check
CONVOS_WEBHOOK_NETWORKS
for a valid source IP instead.Note: This might change in the future.
Which events would you like to trigger this webhook?
Supported triggers are currently: "Branch or tag creation", "Forks", "Issues", "Milestones", "Pull requests" and "Stars". You can however just send "anything" since the bot will filter out the supported "events".
DESCRIPTION
Convos::Plugin::Bot::Action::Github is enables Convos to receive and act on GitHub webhooks.
ATTRIBUTES
description
See "description" in Convos::Plugin::Bot::Action.
METHODS
handle_webhook_github_event
my $res = $action->handle_webhook_github_event($event_name, $payload);
Will try to render a message based on a GitHub event and payload.