(user: str, repo: str, cursor: str | None = None)
| 35 | |
| 36 | |
| 37 | def prs_query(user: str, repo: str, cursor: str | None = None): |
| 38 | after = "" |
| 39 | if cursor is not None: |
| 40 | after = f', before:"{cursor}"' |
| 41 | time_keys = "createdAt updatedAt lastEditedAt publishedAt" |
| 42 | return f""" |
| 43 | {{ |
| 44 | repository(name: "{repo}", owner: "{user}") {{ |
| 45 | pullRequests(states: [OPEN], last: 10{after}) {{ |
| 46 | edges {{ |
| 47 | cursor |
| 48 | }} |
| 49 | nodes {{ |
| 50 | number |
| 51 | url |
| 52 | body |
| 53 | {time_keys} |
| 54 | isDraft |
| 55 | author {{ |
| 56 | login |
| 57 | }} |
| 58 | reviews(last:100) {{ |
| 59 | nodes {{ |
| 60 | {time_keys} |
| 61 | bodyText |
| 62 | author {{ login }} |
| 63 | comments(last:100) {{ |
| 64 | nodes {{ |
| 65 | {time_keys} |
| 66 | bodyText |
| 67 | }} |
| 68 | }} |
| 69 | }} |
| 70 | }} |
| 71 | comments(last:100) {{ |
| 72 | nodes {{ |
| 73 | authorAssociation |
| 74 | bodyText |
| 75 | {time_keys} |
| 76 | author {{ |
| 77 | login |
| 78 | }} |
| 79 | }} |
| 80 | }} |
| 81 | }} |
| 82 | }} |
| 83 | }} |
| 84 | }} |
| 85 | """ |
| 86 | |
| 87 | |
| 88 | def find_reviewers(body: str) -> list[str]: |
no outgoing calls
no test coverage detected
searching dependent graphs…