mirror of
https://github.com/RockChinQ/QChatGPT.git
synced 2024-11-16 11:42:44 +08:00
test: 完善issues_comment时的pr分支获取逻辑
This commit is contained in:
parent
bf5ebc9245
commit
4e71a08b57
14
.github/workflows/test-pr.yml
vendored
14
.github/workflows/test-pr.yml
vendored
|
@ -40,7 +40,21 @@ jobs:
|
|||
cd qcg-tester
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r requirements.txt
|
||||
- name: Get PR details
|
||||
if: github.event_name == 'issue_comment'
|
||||
id: get-pr
|
||||
uses: octokit/request-action@v2.x
|
||||
with:
|
||||
route: GET /repos/${{ github.repository }}/pulls/${{ github.event.issue.number }}
|
||||
mediaType: '{"previews": ["shadow-cat"]}'
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Set Got PR Branch as bash env
|
||||
if: github.event_name == 'issue_comment'
|
||||
run: |
|
||||
echo "BRANCH=${{ steps.get-pr.outputs.data.head.ref }}" >> $GITHUB_ENV
|
||||
- name: Set PR Branch as bash env
|
||||
if: github.event_name != 'issue_comment'
|
||||
run: |
|
||||
echo "BRANCH=${{ github.head_ref }}" >> $GITHUB_ENV
|
||||
- name: Set OpenAI API Key from Secrets
|
||||
|
|
Loading…
Reference in New Issue
Block a user