Ask Your Question

Revision history [back]

To use the GraphQL API to filter issues created by a GitHub App, you can use the following steps:

  1. Authenticate with GitHub using an access token generated for the App.

  2. Write a query to retrieve the issues created by the App. The query can include the following fields:

    • repository: The repository containing the issues
    • issues: The list of issues matching the filter
    • createdByApp: A Boolean filter to check whether the issue was created by the App or not

Here is an example query to retrieve issues created by a specific App:

query AppCreatedIssues($owner: String!, $repo: String!) {
  repository(owner: $owner, name: $repo) {
    issues(filterBy: { createdByApp: true }) {
      nodes {
        title
        bodyText
        author {
          login
        }
      }
    }
  }
}
  1. Pass in the variables for the owner and repo values and execute the query.

The response will include the information of the issues created by the App in the specified repository.