There was a lot of copy-pasta code between the finder and pr status. After some investigation it was clear that the prSelectorForCurrentBranch code was really just a duplicate of the finder's code without actually making the API call for the PR. Since the ParsePRRefs helper had already extracted much of the logic for determining a PR's head ref branch, I was able to reuse it in gh pr status with a small refactor. |
||
|---|---|---|
| .. | ||
| fixtures | ||
| http.go | ||
| http_test.go | ||
| status.go | ||
| status_test.go | ||