Milestone Functions accept name to identify #388

Closed
6543 wants to merge 11 commits from 6543:GetMilestones_add-name-to-id-resove-function into main
Showing only changes of commit 7711771bf5 - Show all commits

View File

@ -30,6 +30,7 @@ type ListMilestoneOption struct {
ListOptions
// open, closed, all
State StateType
Name string
}
// QueryEncode turns options into querystring argument
@ -38,6 +39,9 @@ func (opt *ListMilestoneOption) QueryEncode() string {
if opt.State != "" {
query.Add("state", string(opt.State))
}
if len(opt.Name) != 0 {
query.Add("name", opt.Name)
}
return query.Encode()
}