File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -12,16 +12,16 @@ jobs:
1212 - name : Checkout code
1313 uses : actions/checkout@v2
1414
15- - name : Fetch PR details
16- id : pr-details
15+ - name : Extract PR information
16+ id : extract-info
1717 run : |
1818 PR_NUMBER=${{ github.event.pull_request.number }}
1919 PR_TITLE=${{ github.event.pull_request.title }}
2020 PR_BODY=${{ github.event.pull_request.body }}
2121 PR_USER=${{ github.event.pull_request.user.login }}
2222
23- # 获取标签名称,标签之间用逗号分隔
24- PR_LABELS=$(echo "${{ github.event.pull_request.labels[*].name }}" | tr " " "," )
23+ # 将标签名称提取为以逗号分隔的字符串
24+ PR_LABELS=$(echo "${{ toJson( github.event.pull_request.labels) }}" | jq -r 'map(.name) | join(", ")' )
2525
2626 echo "PR_NUMBER=${PR_NUMBER}" >> $GITHUB_ENV
2727 echo "PR_TITLE=${PR_TITLE}" >> $GITHUB_ENV
You can’t perform that action at this time.
0 commit comments