Uploaded image for project: 'Bitbucket Cloud'
  1. Bitbucket Cloud
  2. BCLOUD-9255

"Pull Request POST" hook not sending any data in request

    XMLWordPrintable

Details

    Description

      I am receiving http request, but no post data is present. Same thing when creating PR, approving or commenting.
      When using same script with "POST" hook it works fine, all data is received, so i guess its not problem with php script.

      I was testing those hooks in repo eyveer/testing.

      Receiveing script:

      #!php
      
      <?php 
      
      
      file_put_contents(&#x27;logpost&#x27;, "\n\nRequest received\n" , FILE_APPEND);
      file_put_contents(&#x27;logpost&#x27;, "\n\n" . var_export($_POST, true) . "\n" , FILE_APPEND);
      
      $json = isset($_POST[&#x27;payload&#x27;]) ? str_replace(&#x27;\\&#x27;,&#x27;&#x27;,$_POST[&#x27;payload&#x27;]) : false;
      if (!$json) {
      	return false;
      }
      
      $data = json_decode($json);
      file_put_contents(&#x27;logpost&#x27;, var_export($data, true) , FILE_APPEND);
      

      Attachments

        Activity

          People

            77a35538877a belak
            10e9218e88ad baartosz
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: