mntnr / name-your-contributors

Name your GitHub contributors; get commits, issues, and comments
MIT License
73 stars 19 forks source link

Org flag raises GraphQL permissions error #72

Open RichardLitt opened 6 years ago

RichardLitt commented 6 years ago

Using the --org flag causes a GraphQL permissions error.

๐Ÿ•  node src/cli.js -o orbitdb -r example-orbitdb-todomvc
Error: Graphql error: {
  "data": null,
  "errors": [
    {
      "message": "Your token has not been granted the required scopes to execute this query. The 'name' field requires one of the following scopes: ['read:org'], but your token has only been granted the: ['repo', 'user'] scopes. Please modify your token's scopes at: https://github.com/settings/tokens.",
      "locations": [
        {
          "line": 122,
          "column": 1
        }
      ]
    }
  ]
}
    at parseResponse (/Users/richard/src/name-your-contributors/src/graphql.js:414:11)
    at <anonymous>

This works if you use -u instead.

daviddias commented 5 years ago

Hit this issue as well, however, changing to -u doesn't seem to work for github orgs. Were you able to get it working @RichardLitt ?

With -u, I get the following error:

ยป name-your-contributors -u ipfs > contributors.json
Error: Command failed: git config --get remote.origin.url

    at ChildProcess.exithandler (child_process.js:289:12)
    at ChildProcess.emit (events.js:182:13)
    at maybeClose (internal/child_process.js:962:16)
    at Socket.stream.socket.on (internal/child_process.js:381:11)
    at Socket.emit (events.js:182:13)
    at Pipe._handle.close (net.js:606:12)
RichardLitt commented 5 years ago

Hmm. Not sure at the moment. You could use https://github.com/kevva/github-repositories to get a list of all of the repos you need, which could sidestep the issue for now, I think.

Berkmann18 commented 1 year ago

I just tried running ./src/cli.js -o mntnr with a token that had read:project, repo and read:org permissions and got the same error about the INSUFFICIENT_SCOPES.

lynxlynxlynx commented 1 year ago

Started getting this as well (on 3.4.0), even after updating the token with more permissions. Regenerating it didn't help.