sourcegraph / sourcegraph-public-snapshot

Code AI platform with Code Search & Cody
https://sourcegraph.com
Other
10.12k stars 1.29k forks source link

Repositories added via "repos" incorrectly show up as BOTH forks and not forks in search #4106

Closed slimsag closed 5 years ago

slimsag commented 5 years ago

Repositories added via the repos field incorrectly show up as both forks and not forks in search when using the fork:yes and fork:no filters.

image

image

With the following Bitbucket Server external service configuration:

{
  "url": "http://<redacted>",
  "username": "<redacted>",
  "token": "<redacted>",

  "repositoryQuery": [
    "none"
  ],

  "repos": [
    "TEST/00benallen--gui_core_00",
    "TEST/057a3dd61f99517a3afea0051a49cb27994f94d--rslinux",
    "TEST/0ang3el--hibernate-injection-study",
    "TEST/0ops--ctfs",
    "TEST/0ovicero0--serverspeeder_install",
    "TEST/0rkgrrr1--hello-world",
    "TEST/0x09al--cve-2018-8174-msf",
    "TEST/0x27--ciscorv320dump",
    "TEST/0x27--linux.mirai",
    "TEST/0x5e--wechat-deleted-friends",
    "TEST/0x90--android-arsenal",
    "TEST/0x90--lpe-arsenal",
    "TEST/0x90--vpn-arsenal",
    "TEST/0x90--wifi-arsenal",
    "TEST/0xacid--shadowbrokers",
    "TEST/0xax--build-system",
    "TEST/0xax--linux-insides",
    "TEST/0xm3r--cgpwn",
    "TEST/100--cranium",
    "TEST/10se1ucgo--disablewintracking",
    "TEST/10thtardis--cobol_projects_spring_2017",
    "TEST/10up--wp-local-docker",
    "TEST/11os--grpc-mp",
    "TEST/1234554321a--yrui",
    "TEST/128technology--protobuf_dissector",
    "TEST/1337r00t--bruteforce-facebook",
    "TEST/1337r00t--snapbrute",
    "TEST/133spider--aqlite",
    "TEST/18f--accessibility",
    "TEST/18f--identity-idp",
    "TEST/18f--jekyll-get",
    "TEST/18f--laptop",
    "TEST/18f--open-data-maker",
    "TEST/19d-orca--orca_driveless",
    "TEST/1adrianb--2d-and-3d-face-alignment",
    "TEST/1adrianb--binary-face-alignment",
    "TEST/1adrianb--binary-human-pose-estimation",
    "TEST/1adrianb--face-alignment-training",
    "TEST/1adrianb--human-pose-estimation",
    "TEST/1aim--derefable",
    "TEST/1n3--brutex",
    "TEST/1n3--findsploit",
    "TEST/1n3--goohak",
    "TEST/1n3--privesc",
    "TEST/1n3--reverseapk",
    "TEST/1n3--sn1per",
    "TEST/1vank--funnyfish",
    "TEST/1vank--urho3dmodelsdissolving",
    "TEST/1vank--urho3dopenworld",
    "TEST/1vank--urho3doutline",
  ]
}

It is unclear to me yet whether or not this only affects repositories added via explicit selection in the repos field or not (I haven't tested) and whether or not the bug is in search or repo-updater somewhere.

slimsag commented 5 years ago

Confirmed this also happens with GitHub repositories added via the same repos field (in a different external service, of course). The behavior is weirder there:

image

image

slimsag commented 5 years ago

Uhg, it turns out this isn't an issue but is just confusing syntax on our part.

I guess that makes sense in retrospect. Not sure we can do anything to improve this, I should've read the docs. Closing.