Bug 242927 - [git-webkit] Use graphQL API to search for pull requests
Summary: [git-webkit] Use graphQL API to search for pull requests
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jonathan Bedard
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-07-19 17:21 PDT by Jonathan Bedard
Modified: 2022-07-20 16:18 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Bedard 2022-07-19 17:21:52 PDT
GitHub's GraphQL API is way better at searching for pull requests and issues than its REST API is. We should use that to API to search for pull requests instead of the REST API.
Comment 1 Radar WebKit Bug Importer 2022-07-19 17:22:08 PDT
<rdar://problem/97290312>
Comment 2 Jonathan Bedard 2022-07-19 17:23:08 PDT
Need to integrate the call to existing tooling, but the query we're looking for should be this one:

query {
  search(query: "repo:<owner>/<repository> is:pr head:<branch-name>", type: ISSUE, last: 100) {
    edges {
      node {
        ... on PullRequest {
          number
          url
          state
          title
          body
          isDraft
          author {
            login
          }
          baseRefName
          headRefName
          headRepository {
            nameWithOwner
          }
        }
      }
    }
  }
}
Comment 3 Jonathan Bedard 2022-07-20 12:13:12 PDT
Pull request: https://github.com/WebKit/WebKit/pull/2586
Comment 4 EWS 2022-07-20 15:38:44 PDT
Committed 252661@main (500b3dbc7c61): <https://commits.webkit.org/252661@main>

Reviewed commits have been landed. Closing PR #2586 and removing active labels.
Comment 5 EWS 2022-07-20 16:18:24 PDT
Committed 252432.19@safari-7614-branch (f2e163351dd9): <https://commits.webkit.org/252432.19@safari-7614-branch>

Reviewed commits have been landed. Closing PR #22 and removing active labels.