33 types : [opened, reopened, ready_for_review, review_requested]
44 issue_comment :
55 types : [created]
6+
67jobs :
78 code_review_job :
89 runs-on : ubuntu-latest
@@ -11,20 +12,36 @@ 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+ GIT_DOMAIN_OPTION=""
21+ if [[ -n "${{ vars.GIT_DOMAIN }}" ]]; then
22+ GIT_DOMAIN_OPTION=" --git.domain=${{ vars.GIT_DOMAIN }}"
23+ fi
24+ 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 }}${GIT_DOMAIN_OPTION}" >> $GITHUB_ENV
1525 - name : Code Review Agent - Issue Comment
16- id : cra_issues_comment
17- if : ${{ github.event_name == 'issue_comment' }}
26+ if : github.event_name == 'issue_comment'
1827 uses : gitbito/codereviewagent@main
1928 with :
2029 pr : ${{ github.event.issue.pull_request.html_url }}
2130 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 }}
31+ options : ${{ env.OPTIONS }}
32+
33+ - name : Set Options Environment Variable for Pull Request
34+ if : github.event_name == 'pull_request'
35+ run : |
36+ GIT_DOMAIN_OPTION=""
37+ if [[ -n "${{ vars.GIT_DOMAIN }}" ]]; then
38+ GIT_DOMAIN_OPTION=" --git.domain=${{ vars.GIT_DOMAIN }}"
39+ fi
40+ 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 }}${GIT_DOMAIN_OPTION}" >> $GITHUB_ENV
2341 - name : Code Review Agent action step
24- id : cra
25- if : ${{ github.event_name == 'pull_request' }}
42+ if : github.event_name == 'pull_request'
2643 uses : gitbito/codereviewagent@main
2744 with :
2845 pr : ${{ github.event.pull_request.html_url }}
2946 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 }}
47+ options : ${{ env.OPTIONS }}
0 commit comments