Skip to content

Commit 44498f1

Browse files
committed
Testing phase1-b
1 parent 8f5a444 commit 44498f1

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

.github/workflows/validate.yaml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11

22
on:
33
pull_request:
4-
# types: [opened, synchronize, reopened, labeled, unlabeled]
54
types: [labeled]
6-
pull_request_target:
7-
types: [labeled]
8-
95

106
permissions:
117
issues: write # Allows the token to modify issues (needed for label management)
@@ -38,15 +34,16 @@ jobs:
3834
# Simulate failure
3935
exit 0
4036
41-
- name: Remove 'needs-validation' label
37+
- name: Remove label
4238
if: always()
4339
run: |
4440
PR_NUMBER=${{ github.event.pull_request.number }}
4541
REPO=${{ github.repository }}
4642
LABEL="full validation"
43+
44+
# URL-encodes the label by replacing special characters with their percent-encoded equivalents.
4745
ENCODED_LABEL=$(printf "%s" "$LABEL" | sed -e 's/ /%20/g' -e 's/:/%3A/g' -e 's/\//%2F/g' -e 's/?/%3F/g' -e 's/&/%26/g' -e 's/=/%3D/g')
4846
49-
echo $ENCODED_LABEL
5047
echo "https://api.github.com/repos/$REPO/issues/$PR_NUMBER/labels/$ENCODED_LABEL"
5148
curl -X DELETE -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
5249
-H "Accept: application/vnd.github.v3+json" \

0 commit comments

Comments
 (0)