Add early exit templates and skip pattern presets
Summary
Centralizes skip/early-exit patterns that were duplicated across HAF apps.
New Templates
Early Exit Templates
These let jobs run but exit immediately when no work is needed (show as "passed" vs "skipped"):
-
.haf_app_early_exit_on_skip- Exit when AUTO_SKIP_SYNC/BUILD is true -
.haf_app_early_exit_on_quick_test- Exit when QUICK_TEST is true -
.haf_app_early_exit_on_cached- Exit on either condition
Usage:
sync:
script:
- !reference [.haf_app_early_exit_on_cached, script]
- # Actual sync logic
Skip Pattern Presets
Pre-configured HAF_APP_SKIP_PATTERNS for common app types:
-
.haf_app_skip_patterns_standard- tests/, docs/, *.md, README, etc. -
.haf_app_skip_patterns_with_gui- Standard plus gui/
Usage:
detect_changes:
extends:
- .haf_app_detect_changes
- .haf_app_skip_patterns_with_gui
Benefits
- Reduces duplication of early exit logic across repos
- Standardizes skip patterns
- Easier maintenance (changes in one place)
Test plan
- Templates parse correctly (CI validates YAML)
- Can be tested by updating balance_tracker to use new templates