Pull request decline

Issue #43 resolved
Denis Koshechkin created an issue

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)

  1. Alexandru Guzinschi

    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' => ''));
    
  2. Alexandru Guzinschi

    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>>

  3. Alexandru Guzinschi

    Applied patch to fix #43

    If 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>>

  4. Log in to comment