Skip to content

allyelvis/chatgpt-github-integration

Repository files navigation

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-integration

Install Dependencies

Frontend

cd frontend
npm install

Backend

cd backend
npm install

Configuration

Backend

  1. Open backend/server.js (if applicable) and configure the default port if needed.
  2. Start the server:
    node server.js

Frontend

  1. Open frontend/src/App.js (or similar) to modify the API endpoint if the backend runs on a different URL.

Running the App

Start the Backend Server

cd backend
node server.js

Start the Frontend Server

cd frontend
npm start

Usage

  1. Input Details:

    • Enter the GitHub repository URL, username, personal access token, and OpenAI API key.
  2. 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.'"
  3. Execute:

    • Click the Execute button to process the prompt and perform the action.
  4. View Output:

    • Check the output section to view the result of the action performed.

Example Workflow

  1. Prompt:
    "Create an issue titled 'Documentation Update' with the description 'Update the README file with new setup instructions.'"

  2. Execution:

    • The app interprets the prompt and uses the GitHub API to create the issue.
  3. Result:

    • Output will display the issue creation status and details.

File Structure

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

APIs Used


Future Enhancements

  • 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.

License

This project is licensed under the MIT License.


Contributing

Contributions are welcome! Please fork the repository and create a pull request with your changes.

About

I

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •