diff --git a/.github/workflows/plugin_submission_orchestrator.yml b/.github/workflows/plugin_submission_orchestrator.yml index 37662caa..af398a7d 100644 --- a/.github/workflows/plugin_submission_orchestrator.yml +++ b/.github/workflows/plugin_submission_orchestrator.yml @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 }} @@ -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 @@ -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: @@ -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') ) &&