Browse Source

Revert "CI(dispatch): Switch to merge commit sha where possible (#43570)"

This reverts commit 3a2e870ce4c2f8ff431a7053a08dd884985cc5b5.

Co-authored-by: mattgauntseo-sentry <112419115+mattgauntseo-sentry@users.noreply.github.com>
getsentry-bot 2 years ago
parent
commit
f2dd50ad1c

+ 1 - 8
.github/workflows/scripts/getsentry-dispatch.js

@@ -26,12 +26,6 @@ module.exports = {
       backend_dependencies: fileChanges.backend_dependencies !== 'true',
     };
 
-    const pr = context.payload.pull_request;
-    // sentrySHA is the sha getsentry should run against.
-    const sentrySHA = pr.merge_commit_sha;
-    // prSHA is the sha actions should post commit statuses too.
-    const prSHA = pr.head.sha;
-
     await Promise.all(
       DISPATCHES.map(({workflow, pathFilterName}) => {
         return github.rest.actions.createWorkflowDispatch({
@@ -42,8 +36,7 @@ module.exports = {
           inputs: {
             pull_request_number: `${context.payload.pull_request.number}`, // needs to be string
             skip: `${shouldSkip[pathFilterName]}`, // even though this is a boolean, it must be cast to a string
-            'sentry-sha': sentrySHA,
-            'sentry-pr-sha': prSHA,
+            'sentry-sha': context.payload.pull_request.head.sha,
           },
         });
       })

+ 1 - 2
.github/workflows/sentry-pull-request-bot.yml

@@ -56,7 +56,6 @@ jobs:
               workflow_id: 'acceptance.yml',
               ref: 'master',
               inputs: {
-                'sentry-sha': '${{ github.event.pull_request.merge_commit_sha }}',
-                'sentry-pr-sha': '${{ github.event.pull_request.head.sha }}',
+                'sentry-sha': '${{ github.event.pull_request.head.sha }}',
               }
             })