bug fixed & lint fixed

This commit is contained in:
Lunny Xiao 2016-11-10 23:08:54 +08:00
parent cc453bfe27
commit c05a7bb741
2 changed files with 19 additions and 19 deletions

View file

@ -11,14 +11,14 @@ import (
"time" "time"
) )
// PRStateType issue state type // StateType issue state type
type PRStateType string type StateType string
const ( const (
// PRStateOpen pr is opend // StateOpen pr is opend
PRStateOpen PRStateType = "open" StateOpen StateType = "open"
// PRStateClosed pr is closed // StateClosed pr is closed
PRStateClosed PRStateType = "closed" StateClosed StateType = "closed"
) )
// PullRequestMeta PR info if an issue is a PR // PullRequestMeta PR info if an issue is a PR
@ -37,7 +37,7 @@ type Issue struct {
Labels []*Label `json:"labels"` Labels []*Label `json:"labels"`
Milestone *Milestone `json:"milestone"` Milestone *Milestone `json:"milestone"`
Assignee *User `json:"assignee"` Assignee *User `json:"assignee"`
State PRStateType `json:"state"` State StateType `json:"state"`
Comments int `json:"comments"` Comments int `json:"comments"`
Created time.Time `json:"created_at"` Created time.Time `json:"created_at"`
Updated time.Time `json:"updated_at"` Updated time.Time `json:"updated_at"`

View file

@ -30,7 +30,7 @@ func (c *Client) ListIssueComments(owner, repo string, index int64) ([]*Comment,
} }
// ListRepoIssueComments list comments for a given repo. // ListRepoIssueComments list comments for a given repo.
func (c *Client) ListRepoIssuecomments(owner, repo string) ([]*Comment, error) { func (c *Client) ListRepoIssueComments(owner, repo string) ([]*Comment, error) {
comments := make([]*Comment, 0, 10) comments := make([]*Comment, 0, 10)
return comments, c.getParsedResponse("GET", fmt.Sprintf("/repos/%s/%s/issues/comments", owner, repo), nil, nil, &comments) return comments, c.getParsedResponse("GET", fmt.Sprintf("/repos/%s/%s/issues/comments", owner, repo), nil, nil, &comments)
} }