https://github.com/cameronking4/gh-repo-server
Simple deno server to fetch the contents of a github repo and create a single json representation. Created to supply ChatGPT context of my github repositories through Custom GPT function calling.
https://github.com/cameronking4/gh-repo-server
deno denodeploy github gpteezy oak pat
Last synced: 9 months ago
JSON representation
Simple deno server to fetch the contents of a github repo and create a single json representation. Created to supply ChatGPT context of my github repositories through Custom GPT function calling.
- Host: GitHub
- URL: https://github.com/cameronking4/gh-repo-server
- Owner: cameronking4
- Created: 2024-08-03T03:43:42.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-13T05:18:03.000Z (almost 2 years ago)
- Last Synced: 2025-04-10T23:13:31.603Z (about 1 year ago)
- Topics: deno, denodeploy, github, gpteezy, oak, pat
- Language: TypeScript
- Homepage: https://gh-repo.deno.dev/get-repo?repo=""
- Size: 27.3 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Fetch Github Repo for ChatGPT context
Download the OpenAI yaml and add to your gpt or chat to begin fetching public Github repos. Clone this repo and self host using DenoDeploy to pull private Github repos using your PAT.
## Demo
https://github.com/user-attachments/assets/e6bc2ccb-7158-422a-98ae-3da3041b2533
## Deno Deploy Server
This Deno server application uses the Oak framework to create a simple API for fetching and displaying the contents of a GitHub repository. The API exposes an endpoint to retrieve the contents of a specified repository, including files and directories, but excludes certain file types (e.g., images and videos).
## Features
- Fetch contents of a specified GitHub repository.
- Recursively retrieve and display directory contents.
- Exclude certain file types from retrieval.
- Return file contents in JSON format.
## Prerequisites
- Deno runtime installed. [Install Deno](https://deno.land/manual@v1.11.5/getting_started/installation)
- A GitHub Personal Access Token (PAT) with access to the desired repositories.
## Environment Variables
- `GITHUB_PAT`: Your GitHub Personal Access Token.
## Installation
1. **Clone the repository:**
```sh
git clone https://github.com/cameronking4/gh-repo-server.git
cd gh-repo-server