Reset base branch when URL is used

This commit is contained in:
Corey Johnson 2020-06-03 14:34:13 -07:00
parent de6b1e0786
commit 4c75c8bccc
7 changed files with 36 additions and 75 deletions

View file

@ -205,9 +205,9 @@ func (pr *PullRequest) ChecksStatus() (summary PullRequestChecksStatus) {
return
}
func (c Client) PullRequestDiff(baseRepo ghrepo.Interface, pr *PullRequest) (string, error) {
func (c Client) PullRequestDiff(baseRepo ghrepo.Interface, prNumber int) (string, error) {
url := fmt.Sprintf("https://api.github.com/repos/%s/pulls/%d",
ghrepo.FullName(baseRepo), pr.Number)
ghrepo.FullName(baseRepo), prNumber)
req, err := http.NewRequest("GET", url, nil)
if err != nil {
return "", err