({ accessToken })
| 79 | } |
| 80 | |
| 81 | function getAPI({ accessToken }) { |
| 82 | const github = new GithubAPI({ |
| 83 | // debug: true, |
| 84 | timeout: 0, |
| 85 | baseUrl: 'https://api.github.com', |
| 86 | headers: { |
| 87 | accept: 'application/json', |
| 88 | }, |
| 89 | requestMedia: 'application/json', |
| 90 | }); |
| 91 | |
| 92 | github.authenticate({ |
| 93 | type: 'oauth', |
| 94 | token: accessToken, |
| 95 | }); |
| 96 | |
| 97 | return github; |
| 98 | } |
| 99 | |
| 100 | function getRepos({ accessToken }) { |
| 101 | const github = getAPI({ accessToken }); |
no outgoing calls
no test coverage detected