Skip to content

Commit 52dc48c

Browse files
authored
Update bot-advanced-check.yml
Signed-off-by: MontyPokemon <59332150+MonaaEid@users.noreply.github.com>
1 parent 9bd8e14 commit 52dc48c

File tree

1 file changed

+17
-16
lines changed

1 file changed

+17
-16
lines changed

.github/workflows/bot-advanced-check.yml

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,33 +20,34 @@ concurrency:
2020
group: ${{ github.workflow }}-${{ github.event.issue.number || github.run_id }}
2121
cancel-in-progress: true
2222
jobs:
23+
#######################################
24+
# Automatic enforcement + manual dry-run
25+
#######################################
2326
check-advanced-qualification:
24-
runs-on: ubuntu-latest
25-
steps:
26-
- name: Filter
27-
id: should_run
28-
run: echo "value=true" >> $GITHUB_OUTPUT
29-
if: |
30-
github.event_name == 'workflow_dispatch' ||
27+
# Skip the entire job (no run steps, no checkout, minimal visibility) when not relevant
28+
if: |-
29+
github.event_name == 'workflow_dispatch' ||
30+
(
31+
contains(github.event.issue.labels.*.name, 'advanced') &&
32+
(
33+
github.event.action == 'assigned' ||
3134
(
32-
github.event_name == 'issues' &&
33-
contains(github.event.issue.labels.*.name, 'advanced') &&
34-
(
35-
github.event.action == 'assigned' ||
36-
(github.event.action == 'labeled' && github.event.label.name == 'advanced' && github.event.issue.assignees[0] != null)
37-
)
35+
github.event.action == 'labeled' &&
36+
github.event.label.name == 'advanced' &&
37+
join(github.event.issue.assignees.*.login, ',') != ''
3838
)
39-
39+
)
40+
)
41+
runs-on: ubuntu-latest
42+
steps:
4043
- name: Checkout scripts
41-
if: steps.should_run.outcome == 'success'
4244
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # Current v4 tag SHA
4345
with:
4446
sparse-checkout: |
4547
.github/scripts
4648
sparse-checkout-cone-mode: false
4749

4850
- name: Verify User Qualification
49-
if: steps.should_run.outcome == 'success'
5051
env:
5152
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5253
REPO: ${{ github.repository }}

0 commit comments

Comments
 (0)