diff --git a/.github/scripts/determine-widget-scope.sh b/.github/scripts/determine-widget-scope.sh index e3e886db7..08bd9b0bf 100644 --- a/.github/scripts/determine-widget-scope.sh +++ b/.github/scripts/determine-widget-scope.sh @@ -7,11 +7,15 @@ input_workspace="$2" before_commit="$3" current_commit="$4" -# List of all native widgets -all_widgets='["accordion-native","activity-indicator-native","animation-native","app-events-native","background-gradient-native","background-image-native","badge-native","bar-chart-native","barcode-scanner-native","bottom-sheet-native","carousel-native","color-picker-native","column-chart-native","feedback-native","floating-action-button-native","gallery-native","gallery-text-filter-native","image-native","intro-screen-native","line-chart-native","listview-swipe-native","maps-native","pie-doughnut-chart-native","popup-menu-native","progress-bar-native","progress-circle-native","qr-code-native","radio-buttons-native","range-slider-native","rating-native","repeater-native","safe-area-view-native","signature-native","slider-native","switch-native","toggle-buttons-native","video-player-native","web-view-native"]' +# Dynamically discover all native widgets from the packages/pluggableWidgets directory +# This ensures we don't miss any widgets when new ones are added +script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +repo_root="$(cd "$script_dir/../.." && pwd)" +widget_dirs=$(find "$repo_root/packages/pluggableWidgets" -maxdepth 1 -type d -name "*-native" -exec basename {} \; | sort) +all_widgets=$(echo "$widget_dirs" | jq -R -s -c 'split("\n") | map(select(length > 0))') # Combined widgets and JS actions for default cases -all_widgets_and_js='["accordion-native","activity-indicator-native","animation-native","app-events-native","background-gradient-native","background-image-native","badge-native","bar-chart-native","barcode-scanner-native","bottom-sheet-native","carousel-native","color-picker-native","column-chart-native","feedback-native","floating-action-button-native","gallery-native","gallery-text-filter-native","image-native","intro-screen-native","line-chart-native","listview-swipe-native","maps-native","pie-doughnut-chart-native","popup-menu-native","progress-bar-native","progress-circle-native","qr-code-native","radio-buttons-native","range-slider-native","rating-native","repeater-native","safe-area-view-native","signature-native","slider-native","switch-native","toggle-buttons-native","video-player-native","web-view-native","mobile-resources-native","nanoflow-actions-native"]' +all_widgets_and_js=$(echo "$widget_dirs" | jq -R -s -c 'split("\n") | map(select(length > 0)) + ["mobile-resources-native", "nanoflow-actions-native"]') if [ "$event_name" == "pull_request" ]; then if git cat-file -e "$before_commit" 2>/dev/null; then diff --git a/.github/workflows/NativePipeline.yml b/.github/workflows/NativePipeline.yml index d0a175793..f8b9bd203 100644 --- a/.github/workflows/NativePipeline.yml +++ b/.github/workflows/NativePipeline.yml @@ -24,6 +24,10 @@ on: required: true default: "*-native" type: choice + # NOTE: This list must be kept in sync with packages/pluggableWidgets/*-native folders + # The determine-widget-scope.sh script automatically discovers widgets, but GitHub Actions + # doesn't support dynamic dropdown options, so this list must be updated manually when + # adding or removing widgets. options: - "*-native" - js-actions @@ -49,6 +53,7 @@ on: - line-chart-native - listview-swipe-native - maps-native + - notifications-native - pie-doughnut-chart-native - popup-menu-native - progress-bar-native @@ -68,6 +73,8 @@ on: # Trigger on PR pull_request: + branches: + - version/mx/10 # Use default name in case no input run-name: ${{ github.event.inputs.run_name || 'Run Native Pipeline' }}