Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix nil handling of octokit.PullRequest #7

Merged
merged 1 commit into from
Oct 29, 2016
Merged

Conversation

haya14busa
Copy link
Contributor

ref: #6

I'm sorry but #6 doesn't handle nil correctly.

url, _ := octokit.PullRequestsURL.Expand(octokit.M{"owner": owner, "repo": repo, "number": num})
pr, r := gh.client.PullRequests(url).One()
if r.HasError() {
        log.Print(r.Err)
        return // <- may return in the middle of function...!
}

But, I guess ghch should fail if one of request fails instead of just
printing error and ignore the pull-request.

What do you think?

@haya14busa
Copy link
Contributor Author

Note that with this pull-request, the behavior should be the same as before #6 except the order.

@Songmu Songmu merged commit dcca96f into Songmu:master Oct 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants