11name : PythonBot - Advanced Requirement Check
2-
32on :
43 issues :
54 types : [assigned, labeled]
6-
75 workflow_dispatch :
86 inputs :
97 dry_run :
1513 description : " GitHub username to dry-run qualification check"
1614 required : true
1715 type : string
18-
1916permissions :
20- contents : read # required for actions/checkout
17+ contents : read
2118 issues : write
22-
2319concurrency :
2420 group : ${{ github.workflow }}-${{ github.event.issue.number || github.run_id }}
2521 cancel-in-progress : true
26-
2722jobs :
2823 # ######################################
2924 # Automatic enforcement + manual dry-run
3025 # ######################################
3126 check-advanced-qualification :
32- if : >
27+ # Skip the entire job (no run steps, no checkout, minimal visibility) when not relevant
28+ if : |-
29+ github.event_name == 'workflow_dispatch' ||
3330 (
34- github.event_name == 'issues' &&
3531 contains(github.event.issue.labels.*.name, 'advanced') &&
3632 (
3733 github.event.action == 'assigned' ||
3834 (
3935 github.event.action == 'labeled' &&
4036 github.event.label.name == 'advanced' &&
41- github.event.issue.assignees[0] != null
37+ join( github.event.issue.assignees.*.login, ',') != ''
4238 )
4339 )
44- ) ||
45- github.event_name == 'workflow_dispatch'
46-
40+ )
4741 runs-on : ubuntu-latest
48-
4942 steps :
5043 - name : Checkout scripts
51- uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
44+ uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # Current v4 tag SHA
5245 with :
53- sparse-checkout : .github/scripts
46+ sparse-checkout : |
47+ .github/scripts
48+ sparse-checkout-cone-mode : false
5449
5550 - name : Verify User Qualification
5651 env :
5752 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
5853 REPO : ${{ github.repository }}
59-
60- # Issue-driven execution
6154 TRIGGER_ASSIGNEE : ${{ github.event.assignee.login || '' }}
6255 ISSUE_NUMBER : ${{ github.event.issue.number || '' }}
63-
64- # Manual execution (workflow_dispatch)
6556 DRY_RUN : ${{ github.event_name == 'workflow_dispatch' && inputs.dry_run || 'false' }}
6657 DRY_RUN_USER : ${{ github.event_name == 'workflow_dispatch' && inputs.username || '' }}
67-
6858 run : |
6959 chmod +x .github/scripts/bot-advanced-check.sh
70- ./. github/scripts/bot-advanced-check.sh
60+ .github/scripts/bot-advanced-check.sh
0 commit comments