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,36 @@ 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
+ 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
15
25
- 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'
18
27
uses : gitbito/codereviewagent@main
19
28
with :
20
29
pr : ${{ github.event.issue.pull_request.html_url }}
21
30
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
23
41
- name : Code Review Agent action step
24
- id : cra
25
- if : ${{ github.event_name == 'pull_request' }}
42
+ if : github.event_name == 'pull_request'
26
43
uses : gitbito/codereviewagent@main
27
44
with :
28
45
pr : ${{ github.event.pull_request.html_url }}
29
46
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