-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* native glob api * missing comma * add pr-describe task * updated pr-describer * updated permissions * comment delete log * fetch main * extract proper comment * more yaml fun * more git stuff * fix delete url * use bullet points * renamed cli option * fix delurl * fix some logging
- Loading branch information
Showing
12 changed files
with
152 additions
and
79 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,39 @@ | ||
name: genai pull request describe | ||
on: | ||
pull_request: | ||
paths: | ||
- yarn.lock | ||
- ".github/workflows/ollama.yml" | ||
- "packages/core/**/*" | ||
- "packages/cli/**/*" | ||
- "packages/samples/**/*" | ||
permissions: | ||
pull-requests: write | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
actions: read | ||
contents: write | ||
pull-requests: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: "recursive" | ||
fetch-depth: 10 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: "20" | ||
cache: yarn | ||
- run: yarn install --frozen-lockfile | ||
- name: compile | ||
run: yarn compile | ||
- name: git stuff | ||
run: git fetch origin && git pull origin main:main | ||
- name: genaiscript run | ||
run: node packages/cli/built/genaiscript.cjs run pr-describe --out ./temp -prc pr-describe | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | ||
OPENAI_API_TYPE: ${{ secrets.OPENAI_API_TYPE }} | ||
OPENAI_API_BASE: ${{ secrets.OPENAI_API_BASE }} |
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
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
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,29 @@ | ||
script({ | ||
model: "openai:gpt-4", | ||
files: [], | ||
title: "pr-describe", | ||
system: ["system", "system.fs_find_files", "system.fs_read_file"], | ||
}) | ||
const { stdout: changes } = await host.exec("git", [ | ||
"diff", | ||
"main", | ||
"--", | ||
":!**/genaiscript.d.ts", | ||
]) | ||
|
||
def("GIT_DIFF", changes, { maxTokens: 20000 }) | ||
|
||
$`You are an expert software developer and architect. | ||
## Task | ||
- Describe the changes in GIT_DIFF in a way that a software engineer will understand. | ||
## Instructions | ||
- use bullet points to list the changes | ||
- use emojis to make the description more engaging | ||
- if needed inline code snippets can be used. The code snippets should be taken | ||
from the changes in GIT_DIFF. | ||
` |
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
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
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
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
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
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
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
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