Skip to content

Commit 10efa35

Browse files
committed
Push to right branch
1 parent e9c8c33 commit 10efa35

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

.github/workflows/evaluate.yaml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,12 +193,25 @@ jobs:
193193
body: `${summary}\n\n[Check the workflow run for more details](${actionsUrl}).`
194194
})
195195
196+
- name: Get PR branch name
197+
id: get_pr_branch
198+
uses: actions/github-script@v7
199+
with:
200+
script: |
201+
const prNumber = context.issue.number;
202+
const { data: pr } = await github.pulls.get({
203+
owner: context.repo.owner,
204+
repo: context.repo.repo,
205+
pull_number: prNumber
206+
});
207+
return { branch: pr.head.ref };
208+
196209
- name: Commit and push eval results
197210
if: ${{ success() }}
198211
run: |
199212
git config --global user.name "github-actions[bot]"
200213
git config --global user.email "github-actions[bot]@users.noreply.github.com"
201-
git checkout ${{ github.head_ref }}
214+
git checkout -b temp-branch
202215
git add evals/results/pr${{ github.event.issue.number }}
203216
git commit -m "Add evaluation results for PR #${{ github.event.issue.number }}"
204-
git push
217+
git push origin temp-branch:${{ steps.get_pr_branch.outputs.branch }}

docs/evaluation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Evaluating the RAG answer quality
22

3-
Follow these steps to evaluate the quality of the answers generated by the RAG.
3+
Follow these steps to evaluate the quality of the answers generated by the RAG flow.
44

55
* [Deploy a GPT-4 model](#deploy-a-gpt-4-model)
66
* [Setup the evaluation environment](#setup-the-evaluation-environment)

0 commit comments

Comments
 (0)