-
assigned issue to
- changed version to 0.4.x
Unable to open a PR
I'm having a really hard time trying to open PR with the API. Basically everything do gives an UNAUTHORIZED error, with no useful message.
The following scripts gives a 200 for the pull request list, but once I try to open a new PR it fails with no useful error message what so ever.
The credentials are correct as I'm able to get a list of PR's, and this is a private repository. So why I cant open PR, is a big mystery.
<?php
require __DIR__.'/../vendor/autoload.php';
$oauth_params = [
'oauth_consumer_key' => '',
'oauth_consumer_secret' => ''
];
$pull = new Bitbucket\API\Repositories\PullRequests();
$pull->setCredentials(new \Bitbucket\API\Authentication\OAuth($oauth_params));
$listener = new \Bitbucket\API\Http\Listener\OAuthListener($oauth_params);
$pull->getClient()->addListener($listener);
$response = $pull->all(
'sstok',
'gush-sandbox'
);
print_r($response);
$response = $pull->all(
'sstok',
'gush-sandbox'
);
print_r($response);
$response = $pull->create('sstok', 'gush-sandbox', '{
"title": "Testing",
"source": {
"branch": {
"name": "6-testing"
}
},
"description": " \n|Q |A |\n|--- |---|\n|Bug Fix? |n |\n|New Feature? |n |\n|BC Breaks? |n |\n|Deprecations?|n |\n|Tests Pass? |n |\n|Fixed Tickets| |\n|License |MIT|\n|Doc PR | |\n \n\n\n Sent using [Gush](https://github.com/gushphp/gush)",
"destination": {
"branch": {
"name": "master"
}
}
}');
print_r($response);
I'm using the 0.4.0 version and v0.10 of Buzz.
Comments (5)
-
-
- changed status to resolved
Fixes
#18OAuthListener: Parameters may be included from the body if the content-type is urlencoded.
TODO: This should be covered in tests.
→ <<cset baf156afca52>>
-
Bug fixed in v0.4.1
If you have the time, please confirm that new version fixes this bug.
-
reporter Its working, thanks for the fix.
-
reporter And now merging fails with UNAUTHORIZED. When I reverted the changed code its working again.
found it, will open a PR.
- Log in to comment