mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-11-14 08:17:26 +01:00
274 lines
4.5 KiB
JSON
274 lines
4.5 KiB
JSON
[
|
|
{
|
|
"user": {
|
|
"_id": "local-owner",
|
|
"externalIDs": {}
|
|
},
|
|
"expected": {
|
|
"$or": [
|
|
{
|
|
"owner": "local-owner"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"user": {
|
|
"_id": "local-owner",
|
|
"externalIDs": {
|
|
"github": null
|
|
}
|
|
},
|
|
"expected": {
|
|
"$or": [
|
|
{
|
|
"owner": "local-owner"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"user": {
|
|
"_id": "local-owner",
|
|
"externalIDs": {
|
|
"github": ""
|
|
}
|
|
},
|
|
"expected": {
|
|
"$or": [
|
|
{
|
|
"owner": "local-owner"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"user": {
|
|
"_id": "local-owner",
|
|
"externalIDs": {
|
|
"github": "12345"
|
|
}
|
|
},
|
|
"expected": {
|
|
"$or": [
|
|
{
|
|
"owner": "local-owner"
|
|
},
|
|
{
|
|
"coauthors.githubId": "12345"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"user": {
|
|
"_id": "local-owner",
|
|
"username": "",
|
|
"externalIDs": {}
|
|
},
|
|
"expected": {
|
|
"$or": [
|
|
{
|
|
"owner": "local-owner"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"user": {
|
|
"_id": "local-owner",
|
|
"username": "",
|
|
"externalIDs": {
|
|
"github": null
|
|
}
|
|
},
|
|
"expected": {
|
|
"$or": [
|
|
{
|
|
"owner": "local-owner"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"user": {
|
|
"_id": "local-owner",
|
|
"username": "",
|
|
"externalIDs": {
|
|
"github": ""
|
|
}
|
|
},
|
|
"expected": {
|
|
"$or": [
|
|
{
|
|
"owner": "local-owner"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"user": {
|
|
"_id": "local-owner",
|
|
"username": "",
|
|
"externalIDs": {
|
|
"github": "12345"
|
|
}
|
|
},
|
|
"expected": {
|
|
"$or": [
|
|
{
|
|
"owner": "local-owner"
|
|
},
|
|
{
|
|
"coauthors.githubId": "12345"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"user": {
|
|
"_id": "local-owner",
|
|
"username": "alice",
|
|
"externalIDs": {}
|
|
},
|
|
"expected": {
|
|
"$or": [
|
|
{
|
|
"owner": "local-owner"
|
|
},
|
|
{
|
|
"coauthors": {
|
|
"$elemMatch": {
|
|
"username": "alice",
|
|
"$or": [
|
|
{
|
|
"githubId": {
|
|
"$exists": false
|
|
}
|
|
},
|
|
{
|
|
"githubId": null
|
|
},
|
|
{
|
|
"githubId": ""
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"user": {
|
|
"_id": "local-owner",
|
|
"username": "alice",
|
|
"externalIDs": {
|
|
"github": null
|
|
}
|
|
},
|
|
"expected": {
|
|
"$or": [
|
|
{
|
|
"owner": "local-owner"
|
|
},
|
|
{
|
|
"coauthors": {
|
|
"$elemMatch": {
|
|
"username": "alice",
|
|
"$or": [
|
|
{
|
|
"githubId": {
|
|
"$exists": false
|
|
}
|
|
},
|
|
{
|
|
"githubId": null
|
|
},
|
|
{
|
|
"githubId": ""
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"user": {
|
|
"_id": "local-owner",
|
|
"username": "alice",
|
|
"externalIDs": {
|
|
"github": ""
|
|
}
|
|
},
|
|
"expected": {
|
|
"$or": [
|
|
{
|
|
"owner": "local-owner"
|
|
},
|
|
{
|
|
"coauthors": {
|
|
"$elemMatch": {
|
|
"username": "alice",
|
|
"$or": [
|
|
{
|
|
"githubId": {
|
|
"$exists": false
|
|
}
|
|
},
|
|
{
|
|
"githubId": null
|
|
},
|
|
{
|
|
"githubId": ""
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"user": {
|
|
"_id": "local-owner",
|
|
"username": "alice",
|
|
"externalIDs": {
|
|
"github": "12345"
|
|
}
|
|
},
|
|
"expected": {
|
|
"$or": [
|
|
{
|
|
"owner": "local-owner"
|
|
},
|
|
{
|
|
"coauthors.githubId": "12345"
|
|
},
|
|
{
|
|
"coauthors": {
|
|
"$elemMatch": {
|
|
"username": "alice",
|
|
"$or": [
|
|
{
|
|
"githubId": {
|
|
"$exists": false
|
|
}
|
|
},
|
|
{
|
|
"githubId": null
|
|
},
|
|
{
|
|
"githubId": ""
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|