Skip to content

Commit c05a7bb

Browse files
committed
bug fixed & lint fixed
1 parent cc453bf commit c05a7bb

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

gitea/issue.go

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ import (
1111
"time"
1212
)
1313

14-
// PRStateType issue state type
15-
type PRStateType string
14+
// StateType issue state type
15+
type StateType string
1616

1717
const (
18-
// PRStateOpen pr is opend
19-
PRStateOpen PRStateType = "open"
20-
// PRStateClosed pr is closed
21-
PRStateClosed PRStateType = "closed"
18+
// StateOpen pr is opend
19+
StateOpen StateType = "open"
20+
// StateClosed pr is closed
21+
StateClosed StateType = "closed"
2222
)
2323

2424
// PullRequestMeta PR info if an issue is a PR
@@ -29,18 +29,18 @@ type PullRequestMeta struct {
2929

3030
// Issue an issue to a repository
3131
type Issue struct {
32-
ID int64 `json:"id"`
33-
Index int64 `json:"number"`
34-
Poster *User `json:"user"`
35-
Title string `json:"title"`
36-
Body string `json:"body"`
37-
Labels []*Label `json:"labels"`
38-
Milestone *Milestone `json:"milestone"`
39-
Assignee *User `json:"assignee"`
40-
State PRStateType `json:"state"`
41-
Comments int `json:"comments"`
42-
Created time.Time `json:"created_at"`
43-
Updated time.Time `json:"updated_at"`
32+
ID int64 `json:"id"`
33+
Index int64 `json:"number"`
34+
Poster *User `json:"user"`
35+
Title string `json:"title"`
36+
Body string `json:"body"`
37+
Labels []*Label `json:"labels"`
38+
Milestone *Milestone `json:"milestone"`
39+
Assignee *User `json:"assignee"`
40+
State StateType `json:"state"`
41+
Comments int `json:"comments"`
42+
Created time.Time `json:"created_at"`
43+
Updated time.Time `json:"updated_at"`
4444

4545
PullRequest *PullRequestMeta `json:"pull_request"`
4646
}

gitea/issue_comment.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ func (c *Client) ListIssueComments(owner, repo string, index int64) ([]*Comment,
3030
}
3131

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

0 commit comments

Comments
 (0)