Commit 1dcb219c authored by Clayton Carter's avatar Clayton Carter Committed by Patrick Rice
Browse files

fix(issues): use AssigneeIDValue for ListProjectIssuesOptions.AssigneeID

Changelog: Improvements
parent 39c1b6a9
Loading
Loading
Loading
Loading
+35 −31
Original line number Diff line number Diff line
@@ -349,7 +349,11 @@ type ListProjectIssuesOptions struct {
	AuthorUsername    *string       `url:"author_username,omitempty" json:"author_username,omitempty"`
	NotAuthorUsername *string       `url:"not[author_username],omitempty" json:"not[author_username],omitempty"`
	NotAuthorID       *int64        `url:"not[author_id],omitempty" json:"not[author_id],omitempty"`
	AssigneeID          *int64        `url:"assignee_id,omitempty" json:"assignee_id,omitempty"`

	// AssigneeID is defined as an int in the documentation, however, the field
	// must be able to accept Assignee IDs and the words 'None' and 'Any'.  Use
	// *AssigneeIDValue instead of *int.
	AssigneeID          *AssigneeIDValue `url:"assignee_id,omitempty" json:"assignee_id,omitempty"`
	NotAssigneeID       *int64           `url:"not[assignee_id],omitempty" json:"not[assignee_id],omitempty"`
	AssigneeUsername    *string          `url:"assignee_username,omitempty" json:"assignee_username,omitempty"`
	NotAssigneeUsername *string          `url:"not[assignee_username],omitempty" json:"not[assignee_username],omitempty"`
+1 −1
Original line number Diff line number Diff line
@@ -446,7 +446,7 @@ func TestListProjectIssues(t *testing.T) {

	listProjectIssue := &ListProjectIssuesOptions{
		AuthorID:   Ptr(int64(0o1)),
		AssigneeID: Ptr(int64(0o2)),
		AssigneeID: AssigneeID(0o2),
	}
	issues, _, err := client.Issues.ListProjectIssues("1", listProjectIssue)
	if err != nil {