- edited description
command for pull requests
i'd be extremely useful if we could:
$ bitbucket pull-request owner/repo
i'm not very familiar with the bitbucket (rest) api, but i may take a stab at if if you're interested
Comments (15)
-
Account Deleted -
repo owner Go for it
-
Account Deleted there's no api for it :(
see https://bitbucket.org/site/master/issue/8195/rest-api-for-creating-pull-requests
-
Account Deleted as this isn't currently possible, should i close?
-
Account Deleted nevermind, it's now possible. i'll take a look at writing the command.
-
Would love to get notified on this once its released.
-
Hey folks, turns out pull requests only exist in V2 of the API. I added a pull request which gives us a pull_request command, but it's not very robust right not.
Add to this that the API docs are either out of date or there's a bug in the API, but my properly formated data dict for the API is being rejected.
TL;DR, every thing is in pull request #11 to make this work, but Atlassian needs to get back to me as to why their API is rejecting the requests.
-
repo owner Cool, thanks Colin. Tell me when Atlassian fixes the issue and I will merge this PR.
-
Well ... Bb got back to me and it turns out the APIv2 requires a content-type header, which because I based my command of the others, was missing.
So now with a content-type header in there, it's at least giving me a proper response. But now it just responds with 400s. So I'll debug that hopefully update the pull request in the next day or two with a command that works, woot!
-
@powellc any luck with this? :)
-
any updates?
-
I've opened pull request #14 for this issue.
For those watching who don't want to wait:
git clone git@bitbucket.org:zhemao/bitbucket-cli.git cd bitbucket-cli git remote add com4 git@bitbucket.org:com4/bitbucket-cli.git git fetch com4 git checkout -t com4/feature/add-pull-requests sudo rm /usr/local/bin/bb /usr/bin/bb # Remove the old link. sudo ln -s `pwd`/_bbcli /usr/local/bin/bb
Then when it's included in the mainline, you can just remove the symlink and repository and
pip install -U bitbucket-cli
. -
Thanks, @com4 - very helpful!
-
FYI its easier to install this version using
pip install git+https://bitbucket.org/com4/bitbucket-cli.git@feature/add-pull-requests
-
repo owner - changed status to resolved
- Log in to comment