@@ -238,6 +238,16 @@ jobs:
238238 - uses : actions/checkout@v6
239239 with :
240240 ref : ${{ github.event.pull_request.head.sha }}
241+ # A push-triggered build has no pull_request for Eyes to correlate it with, so the
242+ # commit must be announced explicitly or it is never tied to the repo's branch —
243+ # see the Applitools GitHub Actions docs, "Preparing For Commit Push Action".
244+ # BranchName is owner/repo/ref by their convention, not the bare ref.
245+ - name : Notify Applitools of the commit push
246+ if : github.event_name == 'push' && env.APPLITOOLS_API_KEY
247+ run : |
248+ curl -sS -L -d '' -X POST \
249+ "https://eyesapi.applitools.com/api/externals/github/push?apiKey=$APPLITOOLS_API_KEY&CommitSha=$APPLITOOLS_BATCH_ID&BranchName=$GITHUB_REPOSITORY/$GITHUB_REF_NAME" \
250+ -o /dev/null -w 'push-notify HTTP %{http_code}\n'
241251 - name : Configure blocked external hosts
242252 uses : ./.github/actions/block-network
243253 - name : Prepare for Testing
@@ -275,6 +285,16 @@ jobs:
275285 - uses : actions/checkout@v6
276286 with :
277287 ref : ${{ github.event.pull_request.head.sha }}
288+ # A push-triggered build has no pull_request for Eyes to correlate it with, so the
289+ # commit must be announced explicitly or it is never tied to the repo's branch —
290+ # see the Applitools GitHub Actions docs, "Preparing For Commit Push Action".
291+ # BranchName is owner/repo/ref by their convention, not the bare ref.
292+ - name : Notify Applitools of the commit push
293+ if : github.event_name == 'push' && env.APPLITOOLS_API_KEY
294+ run : |
295+ curl -sS -L -d '' -X POST \
296+ "https://eyesapi.applitools.com/api/externals/github/push?apiKey=$APPLITOOLS_API_KEY&CommitSha=$APPLITOOLS_BATCH_ID&BranchName=$GITHUB_REPOSITORY/$GITHUB_REF_NAME" \
297+ -o /dev/null -w 'push-notify HTTP %{http_code}\n'
278298 - name : Configure blocked external hosts
279299 uses : ./.github/actions/block-network
280300 - name : Prepare for Testing
0 commit comments