Managing open-source communities can be daunting, especially tracking community questions and providing timely answers. That's why we created the GitHub Command Centre. It's a powerful tool that leverages OpenAI's GPT-3 API to help open-source organizations manage their GitHub Discussions with greater efficiency. 💪
The GitHub Command Centre streamlines the process of handling community questions, automating responses via the OpenAI GPT-3 API and providing first-level triaging. This is a game-changing feature that makes managing open-source communities easier than ever before. In this blog post, we'll explore how the Command Centre works and how it can benefit your organization.
GitHub Discussions - An Overview
GitHub Discussions is a built-in feature that allows open source project communities to have threaded conversations and Q&A sessions. Discussions are essential for open source projects, as they provide a platform for community members to ask questions, share ideas, and offer feedback to project maintainers.
As open source projects grow and their communities expand, managing the discussions within them can become overwhelming for maintainers. That's where the GitHub Command Centre comes in, offering powerful tools to help streamline process of handling community questions and automating responses.
- A Rowy Account with Rowy Run set up. If you don’t have one, you can easily create an account at www.rowy.app. If you need help setting up Rowy, check out our documentation here.
- A GitHub repository with Discussions enabled. If you're not sure how to enable Discussions, you can follow GitHub's documentation at https://docs.github.com/en/discussions.
Once you have these prerequisites in place, you're ready to start using the GitHub Command Centre to manage your open-source community discussions with greater ease and efficiency! 🎯
Setting up the Command Centre ✨
Follow these easy steps to get your GitHub Command Centre set up:
1. Getting Started with Rowy!
The first step is to visit www.rowy.io and click on the "Sign In" button. Once you have created your Workspace and set up your Project, you need to select the GitHub Command Centre template from the "Create a Table" section located at the top of the page.
The template setup wizard will guide you through the steps to set up your table, add your secret keys, and deploy your cloud functions – all in one go! This streamlined process will save you time and effort. 🚀
2. Setting up your Secrets 🤫
As part of the template setup process, you'll be prompted to add two secrets: your OpenAI API Key and your GitHub Personal Access Token. Here's how to retrieve these secret keys for your project:
1. Retrieving the OpenAI API Key ✅
- Go to the OpenAI Account Dashboard and create an account if you haven’t already.
- Click on Create a new secret key.
Add a name for your secret key, Let's use "Command Centre" as an example. Finally, click "Create" to save your new secret key.
Great! You've generated your OpenAI API Key. 🎉 Make sure to copy and store it in a safe and accessible location, as you'll be needing it later.
In the Template Setup Wizard, when prompted to add your OpenAI API Key, click on the Add a key in Secret Manager button. This will redirect you to the GCP Secret Manager. Add your OpenAI API Key as shown below and click Create a Secret.
Now, you can go back to the setup process. Simply click on the Secret dropdown and select your newly generated API Key. If you can't see it, try clicking Refresh.
2. Retrieving the GitHub Personal Access Token ✅
Using a Personal Access Token allows the suggested answers generated by the GitHub Command Centre to be sent as comments on behalf of the token owner. This feature helps to streamline the process of managing GitHub Discussions for open-source projects.
Please note that we are currently using the beta version of the GitHub Discussions API, which has some limitations. Specifically, we can only use Personal Access Tokens to send suggested answers as comments on behalf of users. We hope that GitHub will introduce more versatile ways of using the API soon.
QUICK TIP! 💡
You have two options for using Personal Access Tokens to send suggested answers as comments. You can either use your own token or create a new account specifically for a bot that will answer questions about your organization.
How to retrieve your Personal Access Token? 🤔
To retrieve your Personal Access Token, follow these steps:
Go to your GitHub Account and click on your profile picture in the upper-right corner of the homepage. Then, click on Settings.
In the left sidebar, click on Developer Settings.
In the left sidebar, under Personal access tokens, click on Tokens (classic).
Click Generate new token.
Set an expiration for the token and select the following scopes under the Select Scopes category:
Click Generate Token and store it somewhere temporarily. You have successfully generated your Personal Access Token! 🥳
In the GCP Secret Manager, add your GitHub Personal Access Token as shown below and click Create a Secret.
Post which, you can go back to the setup process and click on the Secret dropdown to select your newly generated GitHub Token. If you can't see it, try clicking Refresh.
Setting up the Webhook 🕸️
After setting up your GitHub Command Centre template, you can configure the GitHub Discussions Webhook to listen for any changes in the discussion section of a specific repository.
To set up the webhook, follow these steps:
- Go to the Webhooks section in the top-right menu of your Command Centre template.
Copy the Endpoint URL provided for the GitHub Discussions Webhook.
Navigate to the repository you want to set up the Command Centre for on GitHub (https://github.com/).
Go to the repository settings → Webhooks and click on "Add a Webhook".
Authenticate if prompted, then add the Endpoint URL to the Payload URL field. Set the content type to
Under the "Which events would you like to trigger this Webhook?" section, select "Let me Select Individual Events" and check the Discussions checkbox. This ensures that the webhook listens to changes in the repository's discussion section.
Save the webhook, and now it's ready to use! 🚀
Managing your Discussions Better 💯
The Command Centre allows you to easily manage your discussions through a well-organized Rowy Table. This provides all the necessary information such as:
Status of the Discussion
The Status column records the current state of the discussion, including whether it has been created, pinned, or answered. There are 13 different categories available to describe the status of GitHub Discussions.
Discussion Title and Description
Both the Title and Description fields are formatted in GitHub-Flavored Markdown, displaying the discussion's details in an easily readable format.
Category of the Discussion
Currently, GitHub Discussions are divided into six categories: General, Announcements, Polls, Show and Tell, Support/Q&A, and Idea/Feature Requests.
URL of the Discussion
The table includes the URL of each incoming discussion, providing easy access to the discussion.
The Question Type field is a Derivative field type that utilizes the power of the GPT-3 API to perform first-level triaging of the discussion. The API classifies the discussion into one of three categories: Technical, Theoretical, or Unsure.
This categorization helps to quickly identify the type of question and provide appropriate answers, streamlining the process of managing discussions.
Updated At Timestamp
The Updated At field is a derived column that stores the updated timestamp, if available. If the value is not available, it stores the created timestamp of the discussion.
QUICK TIP! 💡
By clicking once on the arrow on the column name you can sort the table in descending order by the Updated At field so that the most frequent discussions are more easily accessible by staying on top.
The Suggested Answer field can be highly customized, enabling open-source project maintainers to save time and streamline the process of managing discussions.
Additionally, the Suggested Answer field can be highly customized to suit your specific needs. For instance, you can train your model on your product data to provide more accurate answers to discussions. This level of customization enhances the Command Centre's utility and makes it an even more powerful tool for managing open-source communities.
Sending the Suggested Answer
Finally, the Send Comment toggle, when turned on, sends the Suggested Answer as a comment on the Discussion. This toggle triggers an extension that uses the GitHub Discussions API to send the answer. The beauty of this triggered extension is that it allows you to modify the Suggested Answer column according to your expertise, resulting in a more accurate and personalized response to the discussion
In conclusion, the GitHub Command Centre is a game-changing solution for open-source projects. Its innovative features and customizable options make it an essential tool for managing discussions and building a thriving community on GitHub.
By integrating the GPT-3 API and the GitHub Discussions API, the Command Centre can provide suggested answers to discussions and automate repetitive tasks. With its highly customizable features, the Command Centre can be tailored to the needs of each individual project. By using the GitHub Command Centre, project maintainers can save time and effort, and build a more engaged and productive community around their projects. 🚀