We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 92927bb commit f40f97dCopy full SHA for f40f97d
.github/workflows/display_pr.yml
@@ -12,16 +12,16 @@ jobs:
12
- name: Checkout code
13
uses: actions/checkout@v2
14
15
- - name: Fetch PR details
16
- id: pr-details
+ - name: Extract PR information
+ id: extract-info
17
run: |
18
PR_NUMBER=${{ github.event.pull_request.number }}
19
PR_TITLE=${{ github.event.pull_request.title }}
20
PR_BODY=${{ github.event.pull_request.body }}
21
PR_USER=${{ github.event.pull_request.user.login }}
22
23
- # 获取标签名称,标签之间用逗号分隔
24
- PR_LABELS=$(echo "${{ github.event.pull_request.labels[*].name }}" | tr " " ",")
+ # 将标签名称提取为以逗号分隔的字符串
+ PR_LABELS=$(echo "${{ toJson(github.event.pull_request.labels) }}" | jq -r 'map(.name) | join(", ")')
25
26
echo "PR_NUMBER=${PR_NUMBER}" >> $GITHUB_ENV
27
echo "PR_TITLE=${PR_TITLE}" >> $GITHUB_ENV
0 commit comments