|
17 | 17 | - ready_for_review |
18 | 18 | push: |
19 | 19 | branches: [main] |
20 | | - issue_comment: |
21 | | - types: |
22 | | - - created |
23 | | - - edited |
24 | 20 | issues: |
25 | 21 | types: |
26 | 22 | - opened |
@@ -103,60 +99,6 @@ jobs: |
103 | 99 | comment-summary-in-pr: always |
104 | 100 | allow-ghsas: GHSA-w8v5-vhqr-4h9v # diskcache pickle - no patch, transitive dep of llama-cpp-python |
105 | 101 |
|
106 | | - ai_pr_review: |
107 | | - name: Qodo AI Code Review |
108 | | - if: >- |
109 | | - ( |
110 | | - github.event_name == 'issue_comment' |
111 | | - && github.event.sender.type != 'Bot' |
112 | | - ) || ( |
113 | | - github.event_name == 'pull_request_target' |
114 | | - && github.event.sender.type != 'Bot' |
115 | | - && github.event.pull_request.user.login != 'n24q02m' |
116 | | - ) |
117 | | - runs-on: ubuntu-latest |
118 | | - permissions: |
119 | | - issues: write |
120 | | - pull-requests: write |
121 | | - contents: read |
122 | | - id-token: write |
123 | | - steps: |
124 | | - - name: Checkout repo |
125 | | - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 |
126 | | - |
127 | | - - name: Load custom instructions |
128 | | - run: | |
129 | | - if [ -f ".github/best_practices.md" ]; then |
130 | | - INSTRUCTIONS=$(cat .github/best_practices.md) |
131 | | - RANDOM_EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64) |
132 | | - echo "CUSTOM_INSTRUCTIONS<<$RANDOM_EOF" >> "$GITHUB_ENV" |
133 | | - echo "$INSTRUCTIONS" >> "$GITHUB_ENV" |
134 | | - echo "$RANDOM_EOF" >> "$GITHUB_ENV" |
135 | | - fi |
136 | | -
|
137 | | - - name: Authenticate to GCP (Vertex AI) |
138 | | - uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3 |
139 | | - with: |
140 | | - workload_identity_provider: ${{ vars.VERTEX_WIF_PROVIDER }} |
141 | | - service_account: ${{ vars.VERTEX_SERVICE_ACCOUNT }} |
142 | | - |
143 | | - - name: PR Agent action step |
144 | | - uses: qodo-ai/pr-agent@d82f7d3e696cd00822694aaa3096265d3889f3f1 |
145 | | - env: |
146 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
147 | | - VERTEXAI_PROJECT: ${{ vars.VERTEX_PROJECT }} |
148 | | - VERTEXAI_LOCATION: global |
149 | | - PR_REVIEWER__EXTRA_INSTRUCTIONS: ${{ env.CUSTOM_INSTRUCTIONS }} |
150 | | - PR_CODE_SUGGESTIONS__EXTRA_INSTRUCTIONS: ${{ env.CUSTOM_INSTRUCTIONS }} |
151 | | - PR_DESCRIPTION__EXTRA_INSTRUCTIONS: ${{ env.CUSTOM_INSTRUCTIONS }} |
152 | | - GITHUB_ACTION_CONFIG__AUTO_REVIEW: "true" |
153 | | - GITHUB_ACTION_CONFIG__AUTO_DESCRIBE: "true" |
154 | | - GITHUB_ACTION_CONFIG__AUTO_IMPROVE: "true" |
155 | | - GITHUB_ACTION_CONFIG__HANDLE_PR_ACTIONS: '["opened", "reopened", "ready_for_review", "synchronize"]' |
156 | | - |
157 | | - # ============================================================================ |
158 | | - # Email Notification (External Contributors) |
159 | | - # ============================================================================ |
160 | 102 | email-notify: |
161 | 103 | name: Email Notification |
162 | 104 | if: >- |
|
0 commit comments