Skip to content

Commit b9fd93e

Browse files
Update test_cra.yml
1 parent 2e63078 commit b9fd93e

File tree

1 file changed

+17
-8
lines changed

1 file changed

+17
-8
lines changed

.github/workflows/test_cra.yml

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ on:
33
types: [opened, reopened, ready_for_review, review_requested]
44
issue_comment:
55
types: [created]
6+
67
jobs:
78
code_review_job:
89
runs-on: ubuntu-latest
@@ -11,20 +12,28 @@ jobs:
1112
pull-requests: write
1213
contents: write
1314
name: Run code review agent on every pull request, respond to user comments
15+
1416
steps:
17+
- name: Set Options Environment Variable for Issue Comment
18+
if: github.event_name == 'issue_comment'
19+
run: |
20+
echo "OPTIONS=--static_analysis.fb_infer.enabled=True --code_feedback=True --dependency_check.enabled=False --bee.path=/automation-platform --bee.actn_dir=/automation-platform/default_bito_ad/bito_modules --git.access_token=${{ secrets.GIT_ACCESS_TOKEN }} --bito_cli.bito.access_key=${{ secrets.BITO_ACCESS_KEY }}${{ secrets.GIT_DOMAIN && ' --git.domain=' || '' }}${{ secrets.GIT_DOMAIN }}" >> $GITHUB_ENV
1521
- name: Code Review Agent - Issue Comment
16-
id: cra_issues_comment
17-
if: ${{ github.event_name == 'issue_comment' }}
18-
uses: gitbito/codereviewagent@main
22+
if: github.event_name == 'issue_comment'
23+
uses: gitbito/codereviewagent@latest
1924
with:
2025
pr: ${{ github.event.issue.pull_request.html_url }}
2126
command: ${{ github.event.comment.body }}
22-
options: --static_analysis.fb_infer.enabled=True --code_feedback=True --dependency_check.enabled=False --bee.path=/automation-platform --bee.actn_dir=/automation-platform/default_bito_ad/bito_modules --git.access_token=${{ secrets.GIT_ACCESS_TOKEN }} --bito_cli.bito.access_key=${{ secrets.BITO_ACCESS_KEY }}
27+
options: ${{ env.OPTIONS }}
28+
29+
- name: Set Options Environment Variable for Pull Request
30+
if: github.event_name == 'pull_request'
31+
run: |
32+
echo "OPTIONS=--static_analysis.fb_infer.enabled=True --code_feedback=True --dependency_check.enabled=False --bee.path=/automation-platform --bee.actn_dir=/automation-platform/default_bito_ad/bito_modules --git.access_token=${{ secrets.GIT_ACCESS_TOKEN }} --bito_cli.bito.access_key=${{ secrets.BITO_ACCESS_KEY }}${{ secrets.GIT_DOMAIN && ' --git.domain=' || '' }}${{ secrets.GIT_DOMAIN }}" >> $GITHUB_ENV
2333
- name: Code Review Agent action step
24-
id: cra
25-
if: ${{ github.event_name == 'pull_request' }}
26-
uses: gitbito/codereviewagent@main
34+
if: github.event_name == 'pull_request'
35+
uses: gitbito/codereviewagent@latest
2736
with:
2837
pr: ${{ github.event.pull_request.html_url }}
2938
command: review
30-
options: --static_analysis.fb_infer.enabled=True --code_feedback=True --dependency_check.enabled=False --bee.path=/automation-platform --bee.actn_dir=/automation-platform/default_bito_ad/bito_modules --git.access_token=${{ secrets.GIT_ACCESS_TOKEN }} --bito_cli.bito.access_key=${{ secrets.BITO_ACCESS_KEY }}
39+
options: ${{ env.OPTIONS }}

0 commit comments

Comments
 (0)