incubrain / feedback-module

Nuxt 3 feedback module that uses GitHub Projects and Issues
https://feedback-module.vercel.app
1 stars 0 forks source link

connect to project through oktokit #5

Open Drew-Macgibbon opened 1 year ago

Drew-Macgibbon commented 1 year ago

oktokit repo

We will be using the graphql API, this will allow for more granualar control and should allow for more calls per hour than the REST API.

This is the project you need to connect to: https://github.com/orgs/incubrain/projects/2

Tasks

Drew-Macgibbon commented 1 year ago

@JapneetRajput I think it would be wise to extract this code:

if (!octokit.value) {
    octokit.value = new Octokit({
      auth: gh.api_key,
      headers: {
        'X-GitHub-Api-Version': '2022-11-28'
      }
    })
  }

Into a githubClient.ts function in the helper folder, we can have a global ref in that file to persist the client. We can then pass any information required for the connection, eg api_key