imdone / imdone-atom-github

Search for github issues and link them with TODO comments.
https://atom.io/packages/imdone-atom-github
MIT License
10 stars 4 forks source link

Uncaught TypeError: Cannot read property 'number' of undefined #9

Open twoodby opened 8 years ago

twoodby commented 8 years ago

[Enter steps to reproduce below:]

  1. Have pre existing repo ( forked )
  2. Added a TODO to the code
  3. Open the task for that project
  4. Selected the task for the above TODO
  5. Clicked Find Issues and nothing is found ( even though I have issues on the site )
  6. Clicked New Issue and then I receive the error below

Atom Version: 1.4.1 System: Ubuntu 14.04.3 Thrown From: imdone-atom-github package, v0.1.9

Stack Trace

Uncaught TypeError: Cannot read property 'number' of undefined

At /home/twoodby/.atom/packages/imdone-atom-github/lib/imdone-atom-github-view.coffee:89

TypeError: Cannot read property 'number' of undefined
    at /home/twoodby/.atom/packages/imdone-atom-github/lib/imdone-atom-github-view.coffee:89:51
    at Object.proto.sendError (/home/twoodby/.atom/packages/imdone-atom-github/node_modules/github/api/v3.0.0/index.js:32:13)
    at /home/twoodby/.atom/packages/imdone-atom-github/node_modules/github/api/v3.0.0/issues.js:198:29
    at callCallback (/home/twoodby/.atom/packages/imdone-atom-github/node_modules/github/index.js:743:17)
    at IncomingMessage.<anonymous> (/home/twoodby/.atom/packages/imdone-atom-github/node_modules/github/index.js:793:25)
    at emitNone (events.js:72:20)
    at IncomingMessage.emit (events.js:166:7)
    at endReadableNT (_stream_readable.js:893:12)
    at doNTCallback2 (node.js:441:9)
    at process._tickCallback (node.js:355:17)

Commands

  2x -8:20 imdone-atom:tasks (span.name.icon.icon-file-directory)
     -6:18.8.0 core:paste (atom-text-editor#imdone-atom-github.accessToken.editor.mini.is-focused)
  3x -5:28.1.0 imdone-atom:tasks (div.imdone-atom.pane-item)
     -0:11.9.0 core:save (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "themes": [
      "one-dark-ui",
      "base16-tomorrow-dark-theme"
    ]
  },
  "imdone-atom-github": {
    "accessToken": "49a0b14c57cf4818597aaac4ff911c3fd6f7618b"
  }
}

Installed Packages

# User
atom-beautify, v0.28.21
atom-pair, v2.0.10
go-plus, v3.5.2
imdone-atom, v1.3.25
imdone-atom-github, v0.1.9
language-docker, v1.1.6
language-protobuf, v0.5.0
linter, v1.11.3
linter-phpcs, v1.3.0
project-manager, v2.7.5

# Dev
No dev packages
docbobo commented 8 years ago

I had the same issue and it turned out that the GitHub token I was using didn't have the proper scopes.

ChrisChinchilla commented 8 years ago

@docbobo Hmm, the token I am testing with has all scopes enabled :/

calmcl1 commented 8 years ago

@docbobo - which scopes did you find that you had to enable for it to start working correctly?

ChrisChinchilla commented 8 years ago

@calmcl1 If you look at the https://atom.io/packages/github-issues package it seems to return issues if it's a company or personal repo.

I started looking at the differences between code but haven't finished yet.