Skip to content

Commit 8cb7026

Browse files
authored
Refactor advanced qualification check job
Refactor check-advanced-qualification job to include a filter step for better control over execution based on event conditions. Signed-off-by: MontyPokemon <59332150+MonaaEid@users.noreply.github.com>
1 parent f64f040 commit 8cb7026

File tree

1 file changed

+14
-17
lines changed

1 file changed

+14
-17
lines changed

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

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -20,26 +20,23 @@ 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-
#######################################
2623
check-advanced-qualification:
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' ||
34-
(
35-
github.event.action == 'labeled' &&
36-
github.event.label.name == 'advanced' &&
37-
join(github.event.issue.assignees.*.login, ',') != ''
38-
)
39-
)
40-
)
4124
runs-on: ubuntu-latest
4225
steps:
26+
- name: Filter
27+
id: should_run
28+
run: echo "value=true" >> $GITHUB_OUTPUT
29+
if: |
30+
github.event_name == 'workflow_dispatch' ||
31+
(
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+
)
38+
)
39+
4340
- name: Checkout scripts
4441
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # Current v4 tag SHA
4542
with:

0 commit comments

Comments
 (0)