Skip to content

todoengineering/EvergreenDocs

Repository files navigation

Evergreen Docs

Features (Current & Planned)

  • Automatically generate updated documentation for your repository using Chat GPT and open a Pull Request with the changes
  • Generate comments on your code using Chat GPT and open a Pull Request with the updated code
  • Use a chat bot assistant for answering questions about your repository

Getting Started With The GitHub App

Installing

To install Evergreen Docs, simply visit the GitHub Marketplace and click the "Install" button. From there, you can choose the repositories you want to install the app on and complete the installation process.

Preparing Your Repository

evergreeen.config.json file

Before you can use Evergreen Docs, you'll need to create a evergreen.config.json file in the root of your repository. This file contains the configuration settings for the app, such as the repository's name, description, and the sections of the documentation to be generated.

Here's an example of a evergreen.config.json file:

{
  "name": "Evergreen Docs",
  "description": "Your description here",
  "generates": [
    {
      "preset": "readme",
      "path": "README.md",
      "sections": [
        { "name": "Overview" }
        // ...
      ]
    }
  ]
}

Once you've created the evergreen.config.json file, simply commit it to your repository in the main branch. The app will automatically generate a Pull Request with your updated documentation within 10 minutes.

Running Locally

Prerequisites

Installation

  1. Clone the repo
git clone https://github.com/EvergreenDocs/EvergreenDocs
  1. Install NPM packages
yarn install
  1. Set environment variables (make sure your aws cli environment is configured)
export OPENAI_API_KEY=<your OpenAI API key>
export SST_STAG=<one of the development stages>
  1. Run the app
yarn sst:dev
  1. Trigger GitHub events

Deployment

To deploy the app, you must have the Serverless Stack CLI installed. Once you have the CLI installed, you can deploy the app by running the following command:

yarn deploy

Architecture

graph LR
  subgraph GitHub
    githubRepo[GitHub Repository]
  end

  subgraph AWS
    ingest[Ingest Lambda]
    defaultEventBridge[Default EventBridge]
    workflowProcessor[Workflow Processor Lambda]
  end

  openAi[Open AI]


  githubRepo -- via GitHub app webhook --> ingest --> defaultEventBridge -- filtered using rule --> workflowProcessor <--> openAi
  workflowProcessor -- create pull requests, commit files --> githubRepo
Loading

License

Distributed under the MIT License. See LICENSE for more information