Skip to content

Commit

Permalink
Update display_pr.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
supperthomas authored Aug 30, 2024
1 parent 92927bb commit f40f97d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/display_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2

- name: Fetch PR details
id: pr-details
- name: Extract PR information
id: extract-info
run: |
PR_NUMBER=${{ github.event.pull_request.number }}
PR_TITLE=${{ github.event.pull_request.title }}
PR_BODY=${{ github.event.pull_request.body }}
PR_USER=${{ github.event.pull_request.user.login }}
# 获取标签名称,标签之间用逗号分隔
PR_LABELS=$(echo "${{ github.event.pull_request.labels[*].name }}" | tr " " ",")
# 将标签名称提取为以逗号分隔的字符串
PR_LABELS=$(echo "${{ toJson(github.event.pull_request.labels) }}" | jq -r 'map(.name) | join(", ")')
echo "PR_NUMBER=${PR_NUMBER}" >> $GITHUB_ENV
echo "PR_TITLE=${PR_TITLE}" >> $GITHUB_ENV
Expand Down

0 comments on commit f40f97d

Please sign in to comment.