Skip to content
This repository has been archived by the owner on Aug 1, 2024. It is now read-only.

Commit

Permalink
Knowl ai-pr-code-docs.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
gitcommitshow committed Oct 11, 2023
1 parent e304605 commit 35f31b9
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/ai-pr-code-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Create automated PR summaries as comments in every PR
# Generate code docuemtns for the entire repo by manully running the action
# Keep the code documents up-to-date with every code merge

name: PR Review & Code Documents Sync Knowl

on:
push: # trigger on push events
branches:
- 'main' # trigger for the 'main' branch
pull_request: # trigger on pull request events
branches:
- 'main' # trigger for the 'main' branch
workflow_dispatch: # allow manual triggering of the workflow

jobs:
pr-summary: # Job to create PR Summary
if: github.event_name == 'pull_request' && true # change it to false to disable this job
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Generate PR Summary
uses: knowl-doc/sync-docs@master
with:
OPENAI_API_KEY: ${{secrets.OPENAI_API_KEY}} # optional. action will use Knowl's OpenAI API Key by default

gen-ai-doc: # to generate code documents and keep them updated
if: ((github.event_name == 'push' && github.ref == 'refs/heads/main') || github.event_name == 'workflow_dispatch' ) && true # change it to false to disable this job
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 #
- name: Update Code Documents
uses: knowl-doc/knowl-ai-code-docs@main
env:
KNOWL_API_KEY: ${{secrets.KNOWL_API_KEY}} # get Knowl api key from your Knowl workspace
#OPENAI_API_KEY: ${{secrets.OPENAI_API_KEY}} # optional. action will use Knowl's OpenAI API Key by default
OPENAI_BATCH_SIZE: 40

0 comments on commit 35f31b9

Please sign in to comment.