Skip to content
This repository has been archived by the owner on Dec 2, 2022. It is now read-only.

ansibot: keyerror "pull_request" #7

Open
jctanner opened this issue Mar 12, 2014 · 3 comments
Open

ansibot: keyerror "pull_request" #7

jctanner opened this issue Mar 12, 2014 · 3 comments
Labels

Comments

@jctanner
Copy link
Owner

# fetching: https://api.github.com/repos/ansible/ansible/issues?state=open;since=2014-03-12T01:30:59Z
Traceback (most recent call last):
  File "/home/ansibot/venvs/ansibot/bin/triage", line 50, in <module>
    app.run()
  File "/home/ansibot/venvs/ansibot/lib/python2.6/site-packages/cement/core/foundation.py", line 451, in run
    self.controller._dispatch()
  File "/home/ansibot/venvs/ansibot/lib/python2.6/site-packages/cement/core/controller.py", line 340, in _dispatch
    getattr(self, func['label'])()
  File "/home/ansibot/venvs/ansibot/bin/triage", line 36, in descriptions
    tr.triage()
  File "/home/ansibot/venvs/ansibot/lib/python2.6/site-packages/github/triage.py", line 112, in triage
    self._triage()
  File "/home/ansibot/venvs/ansibot/lib/python2.6/site-packages/github/triage.py", line 123, in _triage
    self.issues._get_types()
  File "/home/ansibot/venvs/ansibot/lib/python2.6/site-packages/github/issues2.py", line 213, in _get_types
    if self.datadict[x]['pull_request']['html_url'] is not None:
KeyError: 'pull_request'
@jctanner
Copy link
Owner Author

 207     ##########################
 208     # PROCESSING
 209     ##########################
 210 
 211     def _get_types(self):
 212         for x in self.datadict.keys():
 213             #if self.datadict[x]['pull_request']['html_url'] is not None:
 214             if 'pull_request' in self.datadict[x]:
 215                 if 'html_url' not in self.datadict[x]['pull_request']:
 216                     import epdb; epdb.st()
 217                 self.datadict[x]['type'] = 'pull_request'
 218             else:
 219                 self.datadict[x]['type'] = 'issue'

@jctanner
Copy link
Owner Author

 689     def get_pull_request_patches(self):
 690         for k in self.datadict.keys():
 691             #epdb.st()
 692             i = self.datadict[k]['number']
 693 
 694             if 'pull_request' in self.datadict[k]:
 695                 pr = self.datadict[k]['pull_request']

@jctanner
Copy link
Owner Author

 669     def get_pull_request_commits(self):
 670         # http://developer.github.com/v3/pulls/
 671         # https://api.github.com/repos/ansible/ansible/pulls/2476/commits
 672         #import epdb; epdb.st()
 673         for x in self.datadict.keys():
 674             if 'pull_request' in self.datadict[x]:
 675                 if self.datadict[x]['pull_request']['patch_url'] is not None:

@jctanner jctanner added the bug label Mar 12, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant