Repository: astralapp/astral (language: php)

Issue:
Smart filters do not correctly filter my starred repositories
When I build a smart filter where I want to get all repositories with 2 tags, I have incorrect results.

![image](https://user-images.githubusercontent.com/15186176/143784397-0bd7b781-57fd-481b-998d-27e24e08e63d.png)

This smart filter returns some repositories with only one of the tags and some without any tag.

I think the problem is in the [predicate.js](https://github.com/astralapp/astral/blob/master/resources/assets/js/filters/predicate.js)  file.
I think the source should be the tags from the predicate and not the starred repositories in order to verify that each tag of the smart filter is included in the starred repositories.

![image](https://user-images.githubusercontent.com/15186176/143784509-e20943f7-3545-4c28-8922-e09e1945f89b.png)



Discussion / hints:

Fix patch:
diff --git a/resources/assets/js/filters/predicate.js b/resources/assets/js/filters/predicate.js
index 6afdf87f..a0912e34 100644
--- a/resources/assets/js/filters/predicate.js
+++ b/resources/assets/js/filters/predicate.js
@@ -38,10 +38,10 @@ const operators = {
     return parseInt(source, 10) <= parseInt(target, 10)
   },
   hasAllTags(source, target) {
-    return source.map(t => t.name).every(val => target.map(t => t.name).includes(val))
+    return target.map(t => t.name).every(val => source.map(t => t.name).includes(val))
   },
   hasAnyTags(source, target) {
-    return source.map(t => t.name).some(val => target.map(t => t.name).includes(val))
+    return target.map(t => t.name).some(val => source.map(t => t.name).includes(val))
   },
   hasNoneTags(source, target) {
     return !source.map(t => t.name).some(val => target.map(t => t.name).includes(val))


Test patch: