SDK's MergePullRequest returns (bool, *Response, error) where the bool is status == 200. err is nil for HTTP 4xx/5xx, so 405 (branch protection), 409 (conflict), and 403 (forbidden) all looked like successful merges. Capture and check the bool; on false (and not merge_when_checks_succeed), return the actual HTTP status in the error. Thanks to @synath for the fix. |
||
|---|---|---|
| .. | ||
| pull.go | ||
| review.go | ||