File tree Expand file tree Collapse file tree 1 file changed +1
-7
lines changed Expand file tree Collapse file tree 1 file changed +1
-7
lines changed Original file line number Diff line number Diff line change @@ -135,17 +135,11 @@ module Project_owners = struct
135
135
| _ :: _ ->
136
136
let pr_labels_set = List. map ~f: (fun (l : Github_t.label ) -> l.name) pr_labels |> SS. of_list in
137
137
let do_match { label; labels; owners } =
138
- let labels =
139
- match labels with
140
- | [] -> Option. value_map label ~f: (fun l -> [ l ]) ~default: []
141
- | labels -> labels
142
- in
143
138
match owners with
144
139
| [] -> false
145
140
| _ :: _ ->
146
- match labels with
141
+ match Option. to_list label @ labels with
147
142
| [] -> false
148
- | [ label ] -> SS. mem label pr_labels_set
149
143
| labels -> SS. subset (SS. of_list labels) pr_labels_set
150
144
in
151
145
List. find ~f: do_match rules |> Option. value_map ~default: [] ~f: (fun l -> l.owners)
You can’t perform that action at this time.
0 commit comments