issue-subscriber: Fix handling of labels with spaces
authorTom Stellard <tstellar@redhat.com>
Mon, 21 Feb 2022 12:02:55 +0000 (04:02 -0800)
committerTom Stellard <tstellar@redhat.com>
Mon, 21 Feb 2022 12:04:47 +0000 (04:04 -0800)
Fixes #53288

Reviewed By: mehdi_amini, asl, Quuxplusone

Differential Revision: https://reviews.llvm.org/D117745

.github/workflows/issue-subscriber.yml

index 3801eec..43014e4 100644 (file)
@@ -18,9 +18,12 @@ jobs:
         pip install -r requirements.txt
 
     - name: Update watchers
+      # https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable
+      env:
+        LABEL_NAME: ${{ github.event.label.name }}
       run: |
         ./github-automation.py \
-          --token ${{ secrets.ISSUE_SUBSCRIBER_TOKEN }} \
+          --token '${{ secrets.ISSUE_SUBSCRIBER_TOKEN }}' \
           issue-subscriber \
-          --issue-number ${{ github.event.issue.number }} \
-          --label-name ${{ github.event.label.name }}
+          --issue-number '${{ github.event.issue.number }}' \
+          --label-name "$LABEL_NAME"