From 878df980b6173d99c95e27e97b8c8eb395fbcda2 Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Fri, 8 Jul 2016 12:32:12 -0300 Subject: [PATCH] Add missing ID fields to PullRequest and Issue structs In [events](https://developer.github.com/v3/activity/events/types/#pullrequestevent), the `id` field is present both in the Issue and PullRequest objects. This PR adds them. --- github/issues.go | 1 + github/pulls.go | 1 + 2 files changed, 2 insertions(+) diff --git a/github/issues.go b/github/issues.go index 3957f22..58a85ec 100644 --- a/github/issues.go +++ b/github/issues.go @@ -18,6 +18,7 @@ type IssuesService service // Issue represents a GitHub issue on a repository. type Issue struct { + ID *int `json:"id,omitempty"` Number *int `json:"number,omitempty"` State *string `json:"state,omitempty"` Title *string `json:"title,omitempty"` diff --git a/github/pulls.go b/github/pulls.go index fe3dc3b..0900766 100644 --- a/github/pulls.go +++ b/github/pulls.go @@ -18,6 +18,7 @@ type PullRequestsService service // PullRequest represents a GitHub pull request on a repository. type PullRequest struct { + ID *int `json:"id,omitempty"` Number *int `json:"number,omitempty"` State *string `json:"state,omitempty"` Title *string `json:"title,omitempty"`