(field string, left any, right any)
| 161 | } |
| 162 | |
| 163 | func mutableStateEqual(field string, left any, right any) bool { |
| 164 | switch field { |
| 165 | case "labels", "assignees": |
| 166 | return slices.Equal(mutableStringSlice(left), mutableStringSlice(right)) |
| 167 | case "draft": |
| 168 | return mutableBool(left) == mutableBool(right) |
| 169 | default: |
| 170 | return strings.TrimSpace(mutableString(left)) == strings.TrimSpace(mutableString(right)) |
| 171 | } |
| 172 | } |
| 173 | |
| 174 | func mutableString(raw any) string { |
| 175 | switch value := raw.(type) { |
no test coverage detected