This repository has been archived by the owner on Aug 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e304605
commit 35f31b9
Showing
1 changed file
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |