Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 21 additions & 4 deletions .github/workflows/plugin_submission_orchestrator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jobs:
needs_metadata_generation: ${{ steps.detect.outputs.needs_metadata_generation }}
is_automergeable: ${{ steps.detect.outputs.is_automergeable }}
plugin_info_json: ${{ steps.detect.outputs.plugin_info_json }}
is_web_submission: ${{ steps.detect.outputs.is_web_submission }}
steps:
- name: Check out repository code
uses: actions/checkout@v4
Expand Down Expand Up @@ -239,6 +240,13 @@ jobs:
done
fi

# Detect web submission from PR title (user:...) pattern
PR_TITLE="${{ github.event.pull_request.title }}"
IS_WEB_SUBMISSION="false"
if echo "$PR_TITLE" | grep -qE '\(user:[^)]+\)'; then
IS_WEB_SUBMISSION="true"
fi

echo "has_plugins=${HAS_PLUGINS:-false}" >> $GITHUB_OUTPUT
echo "plugin_type=${PLUGIN_TYPE:-}" >> $GITHUB_OUTPUT
echo "plugin_dirs=${PLUGIN_DIRS:-}" >> $GITHUB_OUTPUT
Expand All @@ -248,6 +256,7 @@ jobs:
echo "needs_mapping=${NEEDS_MAPPING:-false}" >> $GITHUB_OUTPUT
echo "needs_metadata_generation=${NEEDS_METADATA_GENERATION:-false}" >> $GITHUB_OUTPUT
echo "is_automergeable=${IS_AUTOMERGEABLE:-false}" >> $GITHUB_OUTPUT
echo "is_web_submission=${IS_WEB_SUBMISSION:-false}" >> $GITHUB_OUTPUT
if [ -n "$PLUGIN_INFO" ]; then
PLUGIN_INFO_B64=$(echo "$PLUGIN_INFO" | base64 | tr -d '\n')
echo "plugin_info_json=${PLUGIN_INFO_B64}" >> $GITHUB_OUTPUT
Expand All @@ -264,6 +273,7 @@ jobs:
echo " Needs scoring: ${NEEDS_SCORING}"
echo " Needs mapping: ${NEEDS_MAPPING}"
echo " Needs metadata generation: ${NEEDS_METADATA_GENERATION}"
echo " Is web submission: ${IS_WEB_SUBMISSION}"
if [ "${#MISSING_METADATA_DIRS[@]}" -gt 0 ]; then
echo " Plugins missing metadata: ${MISSING_METADATA_DIRS[*]}"
fi
Expand All @@ -278,7 +288,8 @@ jobs:
if: |
github.event_name == 'pull_request' &&
needs.detect_changes.outputs.has_plugins == 'true' &&
needs.detect_changes.outputs.metadata_only != 'true'
needs.detect_changes.outputs.metadata_only != 'true' &&
needs.detect_changes.outputs.is_web_submission == 'true'
runs-on: ubuntu-latest
outputs:
is_automergeable: ${{ steps.validate.outputs.is_automergeable }}
Expand Down Expand Up @@ -370,6 +381,8 @@ jobs:
name: "3. Handle Metadata-Only PR"
needs: [detect_changes, validate_pr]
if: |
always() &&
needs.detect_changes.result == 'success' &&
github.event_name == 'pull_request' &&
needs.detect_changes.outputs.metadata_only == 'true'
runs-on: ubuntu-latest
Expand Down Expand Up @@ -411,8 +424,12 @@ jobs:
needs.detect_changes.result == 'success' &&
github.event_name == 'pull_request' &&
(
(needs.detect_changes.outputs.needs_metadata_generation == 'true' && needs.validate_pr.outputs.all_tests_pass == 'true') ||
(needs.detect_changes.outputs.needs_mapping == 'true' && needs.validate_pr.outputs.all_tests_pass == 'true')
needs.detect_changes.outputs.needs_metadata_generation == 'true' ||
needs.detect_changes.outputs.needs_mapping == 'true'
) &&
(
needs.validate_pr.outputs.all_tests_pass == 'true' ||
needs.validate_pr.result == 'skipped'
)
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -611,11 +628,11 @@ jobs:
if: |
always() &&
github.event_name == 'pull_request' &&
needs.detect_changes.outputs.is_web_submission == 'true' &&
needs.detect_changes.outputs.plugin_type != 'benchmarks' &&
(
needs.detect_changes.outputs.metadata_only == 'true' ||
(needs.detect_changes.outputs.metadata_only != 'true' &&
needs.validate_pr.result != 'skipped' &&
needs.validate_pr.outputs.is_automergeable == 'true' &&
needs.validate_pr.outputs.all_tests_pass == 'true')
) &&
Expand Down