Browse Source

fix ineffassign in Tests & set Version v0.13.0 (#345)

increment version

fix ineffassign

Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/345
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-by: Andrew Thornton <art27@cantab.net>
pull/353/head
6543 1 month ago
parent
commit
e7c56d8f50
6 changed files with 8 additions and 1 deletions
  1. +1
    -1
      gitea/client.go
  2. +1
    -0
      gitea/issue_comment_test.go
  3. +1
    -0
      gitea/issue_milestone_test.go
  4. +1
    -0
      gitea/org_member_test.go
  5. +2
    -0
      gitea/pull_review_test.go
  6. +2
    -0
      gitea/pull_test.go

+ 1
- 1
gitea/client.go View File

@@ -22,7 +22,7 @@ var jsonHeader = http.Header{"content-type": []string{"application/json"}}

// Version return the library version
func Version() string {
return "0.12.0"
return "0.13.0"
}

// Client represents a Gitea API client.


+ 1
- 0
gitea/issue_comment_test.go View File

@@ -22,6 +22,7 @@ func TestIssueComment(t *testing.T) {
repo, err := createTestRepo(t, "TestIssueCommentRepo", c)
assert.NoError(t, err)
issue1, err := c.CreateIssue(user.UserName, repo.Name, CreateIssueOption{Title: "issue1", Body: "body", Closed: false})
assert.NoError(t, err)
assert.EqualValues(t, 1, issue1.Index)
issue2, err := c.CreateIssue(user.UserName, repo.Name, CreateIssueOption{Title: "issue1", Body: "body", Closed: false})
assert.EqualValues(t, 2, issue2.Index)


+ 1
- 0
gitea/issue_milestone_test.go View File

@@ -53,5 +53,6 @@ func TestMilestones(t *testing.T) {
_, err = c.GetMilestone(repo.Owner.UserName, repo.Name, m4.ID)
assert.Error(t, err)
m, err := c.GetMilestone(repo.Owner.UserName, repo.Name, m1.ID)
assert.NoError(t, err)
assert.EqualValues(t, m1, m)
}

+ 1
- 0
gitea/org_member_test.go View File

@@ -36,6 +36,7 @@ func TestOrgMembership(t *testing.T) {
assert.True(t, check)

err = c.SetPublicOrgMembership(newOrg.UserName, user.UserName, true)
assert.NoError(t, err)
check, err = c.CheckPublicOrgMembership(newOrg.UserName, user.UserName)
assert.NoError(t, err)
assert.True(t, check)


+ 2
- 0
gitea/pull_review_test.go View File

@@ -58,6 +58,8 @@ func TestPullReview(t *testing.T) {
},
},
})
assert.NoError(t, err)
assert.NotNil(t, r3)

// ListPullReviews
c.SetSudo("")


+ 2
- 0
gitea/pull_test.go View File

@@ -104,6 +104,8 @@ func TestPull(t *testing.T) {
Title: "confl",
State: &state,
})
assert.NoError(t, err)
assert.EqualValues(t, state, pr.State)

pulls, err = c.ListRepoPullRequests(user.UserName, repoName, ListPullRequestsOptions{
State: StateClosed,


Loading…
Cancel
Save