Skip to content

Commit

Permalink
more gh action comment
Browse files Browse the repository at this point in the history
  • Loading branch information
pelikhan committed Jun 11, 2024
1 parent 3936480 commit 66e6235
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/genai-commander.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@ jobs:
script: |
const { owner, repo, number } = context.issue;
const pr = await github.pulls.get({ owner, repo, pull_number: number, });
return pr.data.head.sha
console.log(pr)
return { sha: pr.data.head.sha, ref: pr.data.ref }
- name: checkout
uses: actions/checkout@v4
- run: git diff ${{ steps.sha.outputs.result }}
- run: git fetch origin ${{ fromJSON(steps.sha.outputs.result).ref }}
- run: git diff origin/main...${{ fromJSON(steps.sha.outputs.result).ref }}
- uses: actions/setup-node@v4
with:
node-version: "20"
Expand All @@ -44,7 +46,7 @@ jobs:
run: node packages/cli/built/genaiscript.cjs run pr-review --out ./temp/genai/pr-review -prc --out-trace $GITHUB_STEP_SUMMARY
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_COMMIT_SHA: ${{ steps.sha.outputs.result }}
GITHUB_COMMIT_SHA: ${{ fromJSON(steps.sha.outputs.result).sha }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
OPENAI_API_TYPE: ${{ secrets.OPENAI_API_TYPE }}
OPENAI_API_BASE: ${{ secrets.OPENAI_API_BASE }}
Expand Down

0 comments on commit 66e6235

Please sign in to comment.