Skip to content

Commit 72b0f5e

Browse files
authored
[ci][tvmbot] Search more users when checking usernames (#12491)
To figure out a user's association with the repo this code before searched the associations in the repo filtered by the relevant username. GitHub doesn't return the exact match only though, so we have to instead collect many results and search through all of them. Co-authored-by: driazati <[email protected]>
1 parent 6def53a commit 72b0f5e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/scripts/github_tvmbot.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def to_json_str(obj: Any) -> str:
4949
COLLABORATORS_QUERY = """
5050
query ($owner: String!, $name: String!, $user: String!) {
5151
repository(owner: $owner, name: $name) {
52-
collaborators(query: $user, first: 1) {
52+
collaborators(query: $user, first: 100) {
5353
nodes {
5454
login
5555
}
@@ -61,7 +61,7 @@ def to_json_str(obj: Any) -> str:
6161
MENTIONABLE_QUERY = """
6262
query ($owner: String!, $name: String!, $user: String!) {
6363
repository(owner: $owner, name: $name) {
64-
mentionableUsers(query: $user, first: 1) {
64+
mentionableUsers(query: $user, first: 100) {
6565
nodes {
6666
login
6767
}

0 commit comments

Comments
 (0)