integrations/github/hub.md
Streamline your development workflow by seamlessly integrating GitHub with Botpress, the open-source conversational AI platform. This integration enables you to effortlessly manage and automate your GitHub repositories, issues, and pull requests directly from Botpress, empowering you to collaborate effectively, track progress, and ensure smooth development cycles. Take advantage of powerful features like real-time notifications, issue management, pull request merging, and more, all within the familiar Botpress environment. Boost productivity, streamline collaboration, and unleash the full potential of your conversational AI projects with the GitHub Integration for Botpress.
0.x to 1.xVersion 1.0 of the GitHub integration introduces several changes and improvements over the previous version. If you are migrating from version 0.x to 1.x, please note the following changes:
The integration now supports both GitHub Apps and personal access tokens for authentication. GitHub Apps are recommended for organizations, while personal access tokens are suitable for individual users. If you wish to continue using a personal access token, you must enable fine-grained personal access tokens for your organization on GitHub. For more information on setting up the integration with a personal access token, refer to the "manual configuration with a personal access token" section.
The "Find Target" action now requires the
repofield to be specified. This field should contain the name of the repository. Furthermore, thediscussionchannel was removed from this action, as it was not implemented and did nothing.
The
numbertag on channels has been removed. Instead, pull requests have apullRequestNumbertag, and issues have anissueNumbertag.
This is the simplest way to set up the integration. To set up the GitHub integration using OAuth, click the authorization button and follow the instructions to connect your Botpress chatbot to GitHub. This method is recommended as it simplifies the configuration process and ensures secure communication between your chatbot and GitHub.
When using this configuration mode, a Botpress-managed GitHub application will be used to connect to your GitHub organizations and repositories. The application will have the necessary permissions to listen to pull request and issue events and to create new comments on issues, pull requests and discussions. If you require more granular control over the permissions or prefer to use your own GitHub application, you can opt for the manual configuration mode instead.
If you prefer to manually configure the integration, you can connect your own GitHub application to Botpress. To set up the GitHub integration manually, follow these steps:
Discussions: select the "Read & write" permission to allow the bot to read and create comments on discussions.Issues: select the "Read & write" permission to allow the bot to read and create comments on issues.Pull requests: select the "Read & write" permission to allow the bot to read and create comments on pull requests.Team discussions: select the "Read & write" permission to allow the bot to read and create comments on team discussions.DiscussionDiscussion commentIssuesIssue commentPull requestPull request reviewPull request review commentPull request review thread/installations/:installation_id. For example, in the URL https://github.com/organizations/.../settings/installations/123456, the installation ID is 123456. Copy the installation ID and paste it into the "GitHub App Installation ID" field in the Botpress integration settings.If you prefer to manually configure the integration, you can provide a personal access token to connect your personal GitHub account to Botpress. Keep in mind that when you use a personal access token, actions taken by the bot will be attributed to your personal GitHub account. If you wish for actions to be attributed to your organization instead of to your personal account, you must use a GitHub App. GitHub applications offer a lot of advantages over personal access tokens and do not consume a seat within your GitHub organization. As such, we do not recommend using personal access tokens.
To set up the GitHub integration using a personal access token, follow these steps:
application/json content type.DiscussionDiscussion commentIssuesIssue commentPull requestPull request reviewPull request review commentPull request review threadDiscussions: select the "Read & write" permission to allow the bot to read and create comments on discussions.Issues: select the "Read & write" permission to allow the bot to read and create comments on issues.Pull requests: select the "Read & write" permission to allow the bot to read and create comments on pull requests.Team discussions: select the "Read & write" permission to allow the bot to read and create comments on team discussions.Standard GitHub API limitations apply to the GitHub integration in Botpress. These limitations include rate limits, message size restrictions, and other constraints imposed by the GitHub platform. Ensure that your chatbot adheres to these limitations to maintain optimal performance and reliability.
More details are available in the GitHub API documentation.