{"id":17990,"date":"2017-04-24T15:06:55","date_gmt":"2017-04-24T15:06:55","guid":{"rendered":"http:\/\/developer.kore.ai\/?post_type=docs&#038;p=11327"},"modified":"2019-07-09T11:15:03","modified_gmt":"2019-07-09T10:15:03","slug":"github-sample-bot","status":"publish","type":"post","link":"https:\/\/multisite.korebots.com\/v9-0\/docs\/bots\/advanced-topics\/sample-bots\/github-sample-bot\/","title":{"rendered":"Github Sample Bot"},"content":{"rendered":"<section class=\"l-section wpb_row height_auto\"><div class=\"l-section-h i-cf\"><div class=\"g-cols vc_row via_grid cols_1 laptops-cols_inherit tablets-cols_inherit mobiles-cols_1 valign_top type_default stacking_default\"><div class=\"wpb_column vc_column_container\"><div class=\"vc_column-inner\"><div class=\"wpb_text_column\"><div class=\"wpb_wrapper\"><p>The <em>GitHub Sample<\/em> bot contains the basic configuration for registering an app with GitHub, generating authentication tokens, and then adding those tokens to the bot in Bot Builder. After configuration, you can test the bot using the <strong>Talk to Bot\u00a0<\/strong>feature to test any of the following configured alerts and actions.<\/p>\n<ul>\n<li><strong>Alert Tasks<\/strong>\n<ul>\n<li>Commit update<\/li>\n<li>Issue created<\/li>\n<li>Pull Request Notification<\/li>\n<\/ul>\n<\/li>\n<li><strong>Action Tasks<\/strong>\n<ul>\n<li>Create Pull Request<\/li>\n<li>Comment Issue<\/li>\n<li>Create Issue<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"Installing_the_GitHub_Sample_Bot\"><\/span>Installing the GitHub Sample Bot<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The <em>GitHub Sample<\/em> Bot is only available in Bot Builder and must be added as a new bot. It has a limited design specifically configured to demonstrate certain bot features.<\/p>\n<div class=\"alert alert-info\"><strong>Note<\/strong>: This sample bot is similar but not the same as the built-in bot for GitHub available at the Kore.ai Bot Store.<\/div>\n<\/div><\/div><div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div><div class=\"wpb_text_column\"><div class=\"wpb_wrapper\"><h3 id=\"step1\"><span class=\"ez-toc-section\" id=\"Step_1_Install_the_GitHub_Sample_Bot\"><\/span>Step 1: Install the GitHub Sample Bot<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ol>\n<li>To view your sample bots, click the\u00a0<strong>down-arrow<\/strong>\u00a0next to the\u00a0\u00a0<strong>+New Bot<\/strong>\u00a0and select\u00a0<strong>Install Sample Bots.<\/strong><\/li>\n<li>Hover over the <em>GitHub Sample<\/em>\u00a0bot, and then click the\u00a0<strong>Install<\/strong>\u00a0button.<br \/>\n<a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/22\/Install-button-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-13418 size-full alignnone\" src=\"\/wp-content\/uploads\/sites\/22\/Install-button-1.png\" alt=\"\" width=\"948\" height=\"175\" \/><\/a><\/li>\n<li>On the <strong>GitHub Sample<\/strong> page,\u00a0on the <strong>Instructions<\/strong> tab, note the callback URL <span style=\"color: #0000ff\">https:\/\/idp.kore.ai\/workflows\/callback.<\/span>\u00a0 You need to\u00a0paste into your Github App registration later.<\/li>\n<\/ol>\n<\/div><\/div><div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div><div class=\"wpb_text_column\"><div class=\"wpb_wrapper\"><h3 id=\"step2\"><span class=\"ez-toc-section\" id=\"Step_2_Register_your_GitHub_App\"><\/span>Step 2: Register your GitHub App<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ol>\n<li>To register your Github App, log on to GitHub at\u00a0<a href=\"https:\/\/github.com\/settings\/developers\">https:\/\/github.com\/settings\/developers<\/a>.<\/li>\n<li>Select <strong>OAuth applications<\/strong> on the lefthand navigation menu, and then click <strong>Register a new application<\/strong>.<\/li>\n<li>In the <strong>Application name<\/strong> field, enter the name of your GitHub App, for example, <em><span style=\"color: #0000ff\">My GitHub App<\/span><\/em>.<\/li>\n<li>Optionally, add a <strong>Homepage URL<\/strong> and <strong>Application description<\/strong>.<\/li>\n<li>Paste the URL copied from Bot Builder, <span style=\"color: #0000ff\">https:\/\/idp.kore.ai\/workflows\/callback<\/span>, into the <strong>Authorization callback URL<\/strong> field as shown in the following illustration.<br \/>\n<a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/22\/Register-New-Applicaiton.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-13419 alignnone\" src=\"\/wp-content\/uploads\/sites\/22\/Register-New-Applicaiton.png\" alt=\"\" width=\"692\" height=\"616\" \/><\/a><\/li>\n<li>Click <strong>Register application<\/strong>. The <strong>&lt; <em>My GitHub App name<\/em> &gt;<\/strong> page is displayed as shown in the following illustration with client credentials.<br \/>\n<a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/22\/Client-ID-Secret.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-13420 alignnone\" src=\"\/wp-content\/uploads\/sites\/22\/Client-ID-Secret.png\" alt=\"\" width=\"1012\" height=\"480\" \/><\/a><\/li>\n<li>Copy the GitHub <strong>Client ID<\/strong> and <strong>Client Secret<\/strong><\/li>\n<li>Go back to the Bot Builder, Sample Bot Installation page.<\/li>\n<li>Copy the above values into the <strong>ClientID<\/strong> and <strong>ClientSecret<\/strong> fields on the <strong>Configuration<\/strong> tab, and click <strong>Done<\/strong>.<\/li>\n<li>The <em>GitHub Sample successfully installed<\/em> message is displayed.<\/li>\n<\/ol>\n<\/div><\/div><div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div><div class=\"wpb_text_column\"><div class=\"wpb_wrapper\"><h3 id=\"step3\"><span class=\"ez-toc-section\" id=\"Step_3_Authorize_the_Bot\"><\/span>Step 3: Authorize the Bot<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ol>\n<li>From the Bot Builder <strong>Home<\/strong> page, select your bot, and then click the\u00a0<strong>Talk to Bot<\/strong>\u00a0<img loading=\"lazy\" decoding=\"async\" class=\"icon alignnone wp-image-13421 \" src=\"\/wp-content\/uploads\/sites\/22\/talk-to-bot.png\" alt=\"\" width=\"41\" height=\"42\" \/>\u00a0icon to test the <em>GitHub Sample<\/em> bot.<\/li>\n<li>A link to authorize Kore.ai to access your GitHub repository is displayed on first use of the bot.<\/li>\n<li>Click the link, and then complete a one-time authorization for the user with GitHub.<\/li>\n<\/ol>\n<\/div><\/div><div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div><div class=\"wpb_text_column\"><div class=\"wpb_wrapper\"><h3 id=\"step4\"><span class=\"ez-toc-section\" id=\"Step_4_Customizing_the_Sample_Bot\"><\/span>Step 4: Customizing the Sample Bot<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Try out your bot using\u00a0<strong>Talk to Bot<\/strong>\u00a0and test all the alerts and actions. Then review the configuration tabs of the bot in Bot Builder:<\/p>\n<p><strong>Bot Tasks<\/strong> &#8211; Add or modify tasks. This bot is configured with 3 alert tasks and 3 actions task. You can also add dialog tasks, information tasks, knowledge tasks, and configure flows. <a href=\"\/docs\/bots\/chatbot-overview\/bot-tasks\/\">Know more<\/a><\/p>\n<p><strong>Natural Language<\/strong> &#8211; Review and optimize natural language processing and machine language understanding of your bot. <a href=\"\/docs\/bots\/nlp\/optimizing-bots\/\">Know more<\/a>.<\/p>\n<p><strong>Channels<\/strong> &#8211; Enable this bot for one or more communication channels. This bot is enabled for the Kore channel by default. <a href=\"\/docs\/bots\/bot-builder-tool\/channel-enablement\/adding-channels-to-your-bot\/\">Know more<\/a>.<\/p>\n<p><strong>Settings<\/strong> &#8211; Edit or define bot settings, such as name, icon, and other settings. <a href=\"\/docs\/bots\/advanced-topics\/bot-settings\/general-settings\/\">Know more<\/a>.<\/p>\n<p><strong>Publishing<\/strong> &#8211; You can publish alert, action, or dialog tasks for Standard Bots for an enterprise or to the Kore.ai <a href=\"https:\/\/bots.kore.ai\/\">Bot Store<\/a>. For more information, see <a href=\"\/docs\/bots\/publish\/publishing-bot\/#Publishing_Tasks\">Publishing Tasks<\/a>.<\/p>\n<p><strong>Analyze<\/strong> &#8211;\u00a0You can review the full conversation between the Bots Platform and a user using <strong>Chat History<\/strong>. For more detail, you can review\u00a0and analyze both successful, and unsuccessful interactions\u00a0between a Bot and a user in the <strong>Chat Logs<\/strong> section. If necessary, based on the interaction, you can initiate Bot training to better handle future communication transactions. For more information, see <a href=\"\/docs\/bots\/bot-builder-tool\/analyzing-your-bot\/analyzing-your-bot\/\">Analyzing Your Bot<\/a>.<\/p>\n<\/div><\/div><div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div><\/div><\/div><\/div><\/div><\/section>\n","protected":false},"excerpt":{"rendered":"The GitHub Sample bot contains the basic configuration for registering an app with GitHub, generating authentication tokens, and then adding those tokens to the bot in Bot Builder. After configuration, you can test the bot using the Talk to Bot\u00a0feature to test any of the following configured alerts and actions. Alert Tasks Commit update Issue...","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[55],"tags":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/multisite.korebots.com\/v9-0\/wp-json\/wp\/v2\/posts\/17990"}],"collection":[{"href":"https:\/\/multisite.korebots.com\/v9-0\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/multisite.korebots.com\/v9-0\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/multisite.korebots.com\/v9-0\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/multisite.korebots.com\/v9-0\/wp-json\/wp\/v2\/comments?post=17990"}],"version-history":[{"count":5,"href":"https:\/\/multisite.korebots.com\/v9-0\/wp-json\/wp\/v2\/posts\/17990\/revisions"}],"predecessor-version":[{"id":21981,"href":"https:\/\/multisite.korebots.com\/v9-0\/wp-json\/wp\/v2\/posts\/17990\/revisions\/21981"}],"wp:attachment":[{"href":"https:\/\/multisite.korebots.com\/v9-0\/wp-json\/wp\/v2\/media?parent=17990"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/multisite.korebots.com\/v9-0\/wp-json\/wp\/v2\/categories?post=17990"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/multisite.korebots.com\/v9-0\/wp-json\/wp\/v2\/tags?post=17990"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}