- edited description
Pull request decline
There something wrong with pull requests decline method. I can create pull requests, so I think all configured correctly, but when I'm trying to decline it, I got this:
{"error": {"message": "'list' object has no attribute 'copy'", "id": "630036e9f7cc4dc9a72e865148785787"}}
Removing "Content-Type" header from decline method solve my problem, but I'm not sure that it's correct solution.
Comments (7)
-
reporter -
It looks like a 500 status is returned if you close a PR without a message.
Considering that the default Content-Type for version 2 of the API is JSON, the header should not be a problem. The problem is that the BB application chokes if no message is specified when you decline a PR and because that message is documented as optional I would say that this bug should also be reported upstream.
I will leave this open, because we can also fix the issue from the library and I will push a patch in the next few days.
Until a patch is available, you can circumvent this issue by specifying an empty message when you decline a PR:
$pr->decline($owner, $repo, $prID, array('message' => ''));
-
reporter Very helpful! Thanks for quick and detailed response.
-
- changed status to closed
Provide default message on PR decline.
When a PR is declined without a
message
parameter, add an empty message to the payload.Fix & close
#43→ <<cset f7d26bc612e4>>
-
- changed status to resolved
-
Applied patch to fix
#43If a PR was declined without specifying a message, a 500 error will occcur.
If no message is specified when a PR is declined, an empty message is added to the payload.
→ <<cset 364ddd391e24>>
-
Fix is available in 0.8.1.
- Log in to comment