diff --git a/.github/workflows/ok-to-test.yml b/.github/workflows/ok-to-test.yml index 3d7f155..a9c35c8 100644 --- a/.github/workflows/ok-to-test.yml +++ b/.github/workflows/ok-to-test.yml @@ -1,4 +1,4 @@ -# If someone with write access comments "/ok-to-test" on a pull request, emit a repository_dispatch event +# If someone with write access comments "/ok-to-test sha=" on a pull request, emit a repository_dispatch event name: Ok To Test on: diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index f079a7e..086de5f 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -89,10 +89,7 @@ jobs: if: | github.event_name == 'repository_dispatch' && github.event.client_payload.slash_command.args.named.sha != '' && - contains( - github.event.client_payload.pull_request.head.sha, - github.event.client_payload.slash_command.args.named.sha - ) + github.event.client_payload.slash_command.args.named.sha == github.event.client_payload.pull_request.head.sha steps: # Check out merge commit @@ -104,7 +101,7 @@ jobs: - name: Fork based /ok-to-test checkout uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 with: - ref: ${{ github.event.client_payload.pull_request.head.sha }} + ref: ${{ github.event.client_payload.slash_command.args.named.sha }} - name: Set up Python uses: actions/setup-python@7f4fc3e22c37d6ff65e88745f38bd3157c663f7c # v4.9.1 @@ -135,7 +132,7 @@ jobs: if: ${{ always() }} env: job: ${{ github.job }} - ref: ${{ github.event.client_payload.pull_request.head.sha }} + ref: ${{ github.event.client_payload.slash_command.args.named.sha }} # Conveniently, job.status maps to https://developer.github.com/v3/checks/runs/#update-a-check-run conclusion: ${{ job.status }} with: