Skip to content

Commit 0871a1e

Browse files
authored
fix permission check in CICD (#153)
1 parent 3393512 commit 0871a1e

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/workflows/continuous_integration.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,15 @@ jobs:
2828
with:
2929
github_token: ${{ github.token }}
3030
permission: write
31+
- name: Debug Information
32+
if: ${{ github.event_name == 'pull_request_target' }}
33+
run: |
34+
echo "Event Name: ${{ github.event_name }}"
35+
echo "Labels: ${{ toJson(github.event.pull_request.labels) }}"
36+
echo "Permitted: ${{ steps.check.outputs.permitted }}"
37+
echo "Safe to Test Label Present: ${{ contains(github.event.pull_request.labels.*.name, 'safe to test') }}"
3138
- name: Check PR Safe to Run
32-
if: ${{ github.event_name == 'pull_request_target' && (contains(github.event.pull_request.labels.*.name, 'safe to test') == 'false') && steps.check.outputs.permitted == 'false' }}
39+
if: ${{ github.event_name == 'pull_request_target' && !contains(github.event.pull_request.labels.*.name, 'safe to test') && steps.check.outputs.permitted == 'false' }}
3340
run: exit 1
3441
- name: Remove Safe to Test Label # One commit is safe doesn't mean the next commit is safe.
3542
if: ${{ github.event_name == 'pull_request_target' }}

0 commit comments

Comments
 (0)