Skip to content

Commit

Permalink
chore: update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mattzcarey committed Jul 15, 2024
1 parent 1785138 commit 2203888
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,17 @@ jobs:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}

steps:
- uses: actions/checkout@v4
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 20

- name: Setup bun
uses: oven-sh/setup-bun@v1
uses: oven-sh/setup-bun@v2
with:
bun-version: latest

Expand All @@ -50,4 +53,4 @@ jobs:
run: bun run start:review --ci=github --model=gpt-4o --debug

- name: Run prompt tests
run: bun run dev:test
run: bun run start:test
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"gpt3",
"openai",
"gpt4",
"gpt4o",
"vertexai",
"huggingface",
"ai",
Expand Down
3 changes: 3 additions & 0 deletions src/common/git/getFilesWithChanges.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,14 @@ export const getFilesWithChanges = async (isCi: string | undefined): Promise<Rev
fileNames.map(async fileName => {
const fileContent = await readFile(fileName, "utf8")
const changedLines = await getChangedFileLines(isCi, fileName)
logger.debug(`Changed lines for file: ${fileName}. Got ${changedLines.length} lines.`)

return { fileName, fileContent, changedLines }
})
)

logger.debug(`Found ${files.length} files with changes.`)

return files
} catch (error) {
throw new Error(`Failed to get files with changes: ${error}`)
Expand Down

0 comments on commit 2203888

Please sign in to comment.