@@ -14,7 +14,10 @@ permissions:
14
14
15
15
jobs :
16
16
evaluate :
17
- if : ${{ github.event.issue.pull_request && contains(github.event.comment.body, '/evaluate') }}
17
+ if : |
18
+ contains('["OWNER", "CONTRIBUTOR", "COLLABORATOR", "MEMBER"]', github.event.comment.author_association) &&
19
+ github.event.issue.pull_request &&
20
+ github.event.comment.body == '/evaluate'
18
21
runs-on : ubuntu-latest
19
22
env :
20
23
UV_SYSTEM_PYTHON : 1
41
44
AZURE_OPENAI_EVAL_DEPLOYMENT : ${{ vars.AZURE_OPENAI_EVAL_DEPLOYMENT }}
42
45
AZURE_OPENAI_EVAL_MODEL : ${{ vars.AZURE_OPENAI_EVAL_MODEL }}
43
46
steps :
44
- - name : Check for evaluate hash tag
45
- if : contains(github.event.comment.body, '#evaluate')
46
- run : |
47
- echo "Comment contains #evaluate hashtag"
48
47
49
48
- name : Comment on pull request
50
49
uses : actions/github-script@v7
@@ -193,3 +192,13 @@ jobs:
193
192
repo: context.repo.repo,
194
193
body: `${summary}\n\n[Check the workflow run for more details](${actionsUrl}).`
195
194
})
195
+
196
+ - name : Commit and push eval results
197
+ if : ${{ success() }}
198
+ run : |
199
+ git config --global user.name "github-actions[bot]"
200
+ git config --global user.email "github-actions[bot]@users.noreply.github.com"
201
+ git checkout ${{ github.head_ref }}
202
+ git add evals/results/pr${{ github.event.issue.number }}
203
+ git commit -m "Add evaluation results for PR #${{ github.event.issue.number }}"
204
+ git push
0 commit comments