3
3
types : [opened, reopened, ready_for_review, review_requested]
4
4
issue_comment :
5
5
types : [created]
6
+
6
7
jobs :
7
8
code_review_job :
8
9
runs-on : ubuntu-latest
@@ -11,20 +12,28 @@ jobs:
11
12
pull-requests : write
12
13
contents : write
13
14
name : Run code review agent on every pull request, respond to user comments
15
+
14
16
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
15
21
- 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
19
24
with :
20
25
pr : ${{ github.event.issue.pull_request.html_url }}
21
26
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
23
33
- 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
27
36
with :
28
37
pr : ${{ github.event.pull_request.html_url }}
29
38
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