So I am getting a 404.
This is the URL: "https://api.github.com/repos/tryswift/trySwiftAppFinal/pulls/62/merge"
JSON response:
▿ 2 elements
▿ 0 : 2 elements
- key : message
- value : Not Found
▿ 1 : 2 elements
- key : documentation_url
- value : https://developer.github.com/v3/pulls/#merge-a-pull-request-merge-button
and a nil error. Can't figure out what's going wrong on our end. 😕
What is the request body? 😕
This is V3 so there is none
Should't this be part of the body?

Oops, of course - you're absolutely right.
I merged the pull request earlier, but I am pretty sure we only provide the merge_method, which, in my case, was merge - set explicitly.
Does it work now @BasThomas ?
Sent with GitHawk
I guess not? Not sure
(Checked: no)
@BasThomas any progress on this?
Not yet
Still failing as of today 😐
OK so the documentation is pretty bad here, but it seems like we need to provide a SHA "that pull request head must match".
We do not do that. Here's the parameters we send:
(lldb) po parameters
▿ Optional<Dictionary<String, Any>>
▿ some : 2 elements
▿ 0 : 2 elements
- key : "merge_method"
- value : "merge"
▿ 1 : 2 elements
- key : "access_token"
- value : "xyz"
Anyone that wants to pick this up?
I don't directly see how we'd get this SHA, but we'd want to add this to the parameters here.
@BasThomas is there a chance you’re trying to merge with a strategy (rebase/squash/merge) not allowed by the repo?
Sent with GitHawk
The SHA part doesn’t seem right because that doesn’t explain why it works in other repos...
Sent with GitHawk
Could be! It was Swift Weekly Brief; I think we squash by default. Will check!
Sent with GitHawk
I’ve been meaning to log that as an issue. I haven’t seen a way to restrict the merge options yet. If anything if this response returns 404 the error should say “can’t merge with x”
Sent with GitHawk
They did add the API! Putting up a PR now. I'm so glad this is a thing now!
Most helpful comment
They did add the API! Putting up a PR now. I'm so glad this is a thing now!