(title string)
| 937 | } |
| 938 | |
| 939 | func (m *RepoMetadataResult) MilestoneToID(title string) (string, error) { |
| 940 | for _, m := range m.Milestones { |
| 941 | if strings.EqualFold(title, m.Title) { |
| 942 | return m.ID, nil |
| 943 | } |
| 944 | } |
| 945 | return "", fmt.Errorf("'%s' not found", title) |
| 946 | } |
| 947 | |
| 948 | func (m *RepoMetadataResult) Merge(m2 *RepoMetadataResult) { |
| 949 | if len(m2.AssignableUsers) > 0 || len(m.AssignableUsers) == 0 { |