File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff 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 }}
You can’t perform that action at this time.
0 commit comments