Create GitHub Issues Feed

Create GitHub Issues feed to ingest issues and issue attachments.

Graphlit supports ingesting issues and issue attachments from GitHub.

The createFeed mutation enables the creation of a feed by accepting the feed name, type and issue feed parameters and it returns essential details, including the ID, name, state, and type of the newly generated feed.

You will need to opt-in to extracting issue attachments from issues, which will be ingested as new content objects, by assigning includeAttachments to true.

Reading issues from GitHub requires a GitHub personal access token (PAT), which must be requested by your application for the user's GitHub account. Graphlit stores this PAT, and will use it to authenticate to your user's GitHub account. Alternately, you can provide an OAuth refresh token.

Also, you will need to specify the GitHub repository owner and name, where the issues can be found. For example, for the repo https://github.com/graphlit/graphlit-client-python, the repository owner is graphlit and the repository name is graphlit-client-python.

Optionally, you can specify the uri for a GitHub Enterprise repository.

If you would like to read issues from multiple GitHub repositories, you can create multiple GitHub feeds.

Mutation:

mutation CreateFeed($feed: FeedInput!) {
  createFeed(feed: $feed) {
    id
    name
    state
    type
  }
}

Variables:

{
  "feed": {
    "type": "ISSUE",
    "issue": {
      "type": "GITHUB_ISSUES",
      "includeAttachments": true,
      "github": {
        "repositoryOwner": "redacted",
        "repositoryName": "redacted",
        "personalAccessToken": "redacted",
      },
      "readLimit": 50
    },
    "name": "GitHub Issues"
  }
}

Response:

{
  "type": "ISSUE",
  "id": "70cf882a-9cd9-45c1-b5a0-88606938248a",
  "name": "GitHub Issues",
  "state": "ENABLED"
}

Last updated