octokit-js

Is there a way to list a personal access token's scopes using Octokit/rest.js?

六月ゝ 毕业季﹏ 提交于 2019-12-24 19:34:05
问题 We use Octokit to automate some workflows at work, but most of the time the issues we have is that the users haven't set-up their personal access token correctly, with the right scopes. We would like to have a check before the app runs, to check if the token given has the right scope and give the engineer a meaningful error message right in the beginning, instead of failing later in the process. 回答1: Yes, the scopes for a personal access token is listed in the response header, you can access