Make WordPress Core


Ignore:
Timestamp:
12/10/2023 10:34:12 AM (10 months ago)
Author:
zieladam
Message:

Build/Test Tools: Fix the workflow that posts a preview link on every Pull Request

Fixes a 403 error in the pull-request-comments.yml job by switching from a custom workflow dispatch call to the pull_request_target trigger.

Follow up to [57124], [57174].
Props ockham.
See #59416.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/.github/workflows/test-build-processes.yml

    r57125 r57178  
    107107      directory: ${{ matrix.directory }}
    108108
    109   # Calls the Pull Request Commenting workflow to leave a comment detailing how to test the PR within WordPress Playground.
    110   playground-comment:
    111     name: Leave WordPress Playground details
    112     runs-on: ubuntu-latest
    113     permissions:
    114       actions: write
    115     continue-on-error: true
    116     needs: [ test-core-build-process, test-core-build-process-macos, test-gutenberg-build-process, test-gutenberg-build-process-macos ]
    117     if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name == 'pull_request' }}
    118 
    119     steps:
    120       - name: Dispatch workflow run
    121         uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1
    122         with:
    123           retries: 2
    124           retry-exempt-status-codes: 418
    125           script: |
    126             github.rest.actions.createWorkflowDispatch({
    127               owner: context.repo.owner,
    128               repo: context.repo.repo,
    129               workflow_id: 'pull-request-comments.yml',
    130               ref: 'trunk',
    131               inputs: {
    132                 pr_number: '${{ github.event.number }}'
    133               }
    134             });
    135109
    136110  slack-notifications:
     
    140114      actions: read
    141115      contents: read
    142     needs: [ test-core-build-process, test-core-build-process-macos, test-gutenberg-build-process, test-gutenberg-build-process-macos, playground-comment ]
     116    needs: [ test-core-build-process, test-core-build-process-macos, test-gutenberg-build-process, test-gutenberg-build-process-macos ]
    143117    if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }}
    144118    with:
     
    155129    permissions:
    156130      actions: write
    157     needs: [ playground-comment ]
     131    needs: [ slack-notifications ]
    158132    if: |
    159133      always() &&
Note: See TracChangeset for help on using the changeset viewer.