Here is the markdown documentation for the app:
# ChatGPT GitHub Integration App
This app allows users to integrate ChatGPT with GitHub to perform tasks on GitHub repositories based on user prompts. The app provides a simple UI where users can input their GitHub repository details, OpenAI API key, and prompt to execute GitHub API actions.
---
## Features
- **GitHub Integration**:
- Input GitHub repository URL, username, and personal access token.
- Perform actions such as creating issues, managing files, etc.
- **ChatGPT Integration**:
- Use ChatGPT to interpret user prompts into actionable GitHub API requests.
- **Dynamic OpenAI API Key Input**:
- Users can provide their own OpenAI API key for secure and personalized usage.
---
## Tech Stack
- **Frontend**: React.js
- **Backend**: Node.js + Express
- **GitHub SDK**: Octokit
- **AI SDK**: OpenAI API
---
## Setup and Installation
### Prerequisites
- Node.js and npm installed.
- A GitHub personal access token with required permissions.
- An OpenAI API key.
### Clone the Repository
```bash
git clone https://github.com/allyelvis/chatgpt-github-integration.git
cd chatgpt-github-integrationcd frontend
npm installcd backend
npm install- Open
backend/server.js(if applicable) and configure the default port if needed. - Start the server:
node server.js
- Open
frontend/src/App.js(or similar) to modify the API endpoint if the backend runs on a different URL.
cd backend
node server.jscd frontend
npm start-
Input Details:
- Enter the GitHub repository URL, username, personal access token, and OpenAI API key.
-
Enter Prompt:
- Provide a detailed prompt to specify the action, e.g., "Create an issue with the title 'Bug Fix' and description 'Fix the login error.'"
-
Execute:
- Click the Execute button to process the prompt and perform the action.
-
View Output:
- Check the output section to view the result of the action performed.
-
Prompt:
"Create an issue titled 'Documentation Update' with the description 'Update the README file with new setup instructions.'" -
Execution:
- The app interprets the prompt and uses the GitHub API to create the issue.
-
Result:
- Output will display the issue creation status and details.
chatgpt-github-integration/
├── frontend/ # React app for UI
│ ├── src/
│ │ ├── App.js # Main React component
│ │ ├── components/ # Reusable UI components
│ ├── public/ # Static files
│ ├── package.json # React dependencies
│
├── backend/ # Node.js app for API handling
│ ├── server.js # Express server
│ ├── package.json # Backend dependencies
│
├── README.md # Project documentation
-
GitHub API:
-
OpenAI API:
- Add support for more GitHub API actions (e.g., pull requests, branch management).
- Provide better error handling and debugging tools.
- Enhance the UI with real-time action status updates.
This project is licensed under the MIT License.
Contributions are welcome! Please fork the repository and create a pull request with your changes.