Retrieving a repository's issues


In [1]:
import github3

In [2]:
repo = github3.repository('sigmavirus24', 'github3.py')

In [4]:
for issue in repo.issues():
    print('{0}#{1.number}: "{1.title}"\n\t{1.html_url}'.format(repo, issue))


sigmavirus24/github3.py#270: "IPython docs"
	https://github.com/sigmavirus24/github3.py/pull/270
sigmavirus24/github3.py#269: "Deprecate old team members API. Add new API"
	https://github.com/sigmavirus24/github3.py/issues/269
sigmavirus24/github3.py#263: "Replace Repository#comments_on_commit with RepoCommit#comments"
	https://github.com/sigmavirus24/github3.py/issues/263
sigmavirus24/github3.py#262: "iter_notifications(all=[bool]) should work passing True"
	https://github.com/sigmavirus24/github3.py/issues/262
sigmavirus24/github3.py#258: "User Keys Are Now Immutable"
	https://github.com/sigmavirus24/github3.py/issues/258
sigmavirus24/github3.py#257: "New attributes for PullRequestReviewComment events"
	https://github.com/sigmavirus24/github3.py/issues/257
sigmavirus24/github3.py#256: "[New] Statuses"
	https://github.com/sigmavirus24/github3.py/issues/256
sigmavirus24/github3.py#255: "Malformed Tag Causes AttributeError in models.py"
	https://github.com/sigmavirus24/github3.py/issues/255
sigmavirus24/github3.py#253: "Pull request commits fields are not set"
	https://github.com/sigmavirus24/github3.py/issues/253
sigmavirus24/github3.py#248: "Switch to (absolute) relative imports to allow for vendoring"
	https://github.com/sigmavirus24/github3.py/issues/248
sigmavirus24/github3.py#241: "removed duplicate documentation"
	https://github.com/sigmavirus24/github3.py/pull/241
sigmavirus24/github3.py#226: "ETag support for single objects"
	https://github.com/sigmavirus24/github3.py/issues/226
sigmavirus24/github3.py#217: "API does not handle unicode well"
	https://github.com/sigmavirus24/github3.py/issues/217
sigmavirus24/github3.py#206: "Better documentation regarding a repo's issues"
	https://github.com/sigmavirus24/github3.py/issues/206
sigmavirus24/github3.py#191: "Start a branch for updating the docs"
	https://github.com/sigmavirus24/github3.py/pull/191
sigmavirus24/github3.py#187: "Document two factor auth"
	https://github.com/sigmavirus24/github3.py/issues/187
sigmavirus24/github3.py#186: "Support SNI for Releases API"
	https://github.com/sigmavirus24/github3.py/issues/186
sigmavirus24/github3.py#159: "Create documentation for testing github3.py"
	https://github.com/sigmavirus24/github3.py/issues/159
sigmavirus24/github3.py#122: "Roadmap for 1.0"
	https://github.com/sigmavirus24/github3.py/issues/122
sigmavirus24/github3.py#79: "Caching support!"
	https://github.com/sigmavirus24/github3.py/issues/79

You can also list closed issues.


In [5]:
repo = github3.repository('sigmavirus24', 'requests-toolbelt')

In [6]:
for issue in repo.issues(state='closed'):
    print('{0}#{1.number}: "{1.title}"\n\t{1.html_url}'.format(repo, issue))


sigmavirus24/requests-toolbelt#36: "Some fields do not get uploaded"
	https://github.com/sigmavirus24/requests-toolbelt/issues/36
sigmavirus24/requests-toolbelt#35: "Add ssl_version to the list of attributes"
	https://github.com/sigmavirus24/requests-toolbelt/pull/35
sigmavirus24/requests-toolbelt#34: "SSLAdapter crashes if used with multiprocessing"
	https://github.com/sigmavirus24/requests-toolbelt/issues/34
sigmavirus24/requests-toolbelt#33: "Add support for multipart/mixed"
	https://github.com/sigmavirus24/requests-toolbelt/issues/33
sigmavirus24/requests-toolbelt#31: "MultipartEncoder.read() returns less than 8192 bytes even when more bytes are left"
	https://github.com/sigmavirus24/requests-toolbelt/issues/31
sigmavirus24/requests-toolbelt#29: "Multipart encoder cannot be reused"
	https://github.com/sigmavirus24/requests-toolbelt/issues/29
sigmavirus24/requests-toolbelt#28: "GuessAuth"
	https://github.com/sigmavirus24/requests-toolbelt/pull/28
sigmavirus24/requests-toolbelt#27: "Request for Comments: Implement RFC 5987"
	https://github.com/sigmavirus24/requests-toolbelt/issues/27
sigmavirus24/requests-toolbelt#25: "Import authors to setup.py"
	https://github.com/sigmavirus24/requests-toolbelt/pull/25
sigmavirus24/requests-toolbelt#24: "Import metadata from package to setup.py"
	https://github.com/sigmavirus24/requests-toolbelt/pull/24
sigmavirus24/requests-toolbelt#23: "Add encoding comment to `*.py`"
	https://github.com/sigmavirus24/requests-toolbelt/pull/23
sigmavirus24/requests-toolbelt#22: "Add Monitor for MultipartEncoder"
	https://github.com/sigmavirus24/requests-toolbelt/pull/22
sigmavirus24/requests-toolbelt#20: "README.rst: minor edits, syntax highlighting"
	https://github.com/sigmavirus24/requests-toolbelt/pull/20
sigmavirus24/requests-toolbelt#18: "Slightly refactored MultipartEncoder + improved unit tests"
	https://github.com/sigmavirus24/requests-toolbelt/pull/18
sigmavirus24/requests-toolbelt#17: "MultipartEncoder sometimes add bytes"
	https://github.com/sigmavirus24/requests-toolbelt/issues/17
sigmavirus24/requests-toolbelt#16: "`MultipartEncoder` not fully compliant with RFC 1521"
	https://github.com/sigmavirus24/requests-toolbelt/issues/16
sigmavirus24/requests-toolbelt#15: "Adding Multipart Decoder, redux"
	https://github.com/sigmavirus24/requests-toolbelt/pull/15
sigmavirus24/requests-toolbelt#14: "Added MultipartDecoder."
	https://github.com/sigmavirus24/requests-toolbelt/pull/14
sigmavirus24/requests-toolbelt#13: "add explicit utf-8 encoding"
	https://github.com/sigmavirus24/requests-toolbelt/pull/13
sigmavirus24/requests-toolbelt#12: "MultipartEncoder: added callback support and bytes read counter"
	https://github.com/sigmavirus24/requests-toolbelt/pull/12
sigmavirus24/requests-toolbelt#11: "Get version info from a file that actually exists"
	https://github.com/sigmavirus24/requests-toolbelt/pull/11
sigmavirus24/requests-toolbelt#10: "pip install fails with requests 1.2.3"
	https://github.com/sigmavirus24/requests-toolbelt/issues/10
sigmavirus24/requests-toolbelt#9: "'file' does not have the buffer interface"
	https://github.com/sigmavirus24/requests-toolbelt/issues/9
sigmavirus24/requests-toolbelt#8: "Invalid multipart encoding with a file"
	https://github.com/sigmavirus24/requests-toolbelt/pull/8
sigmavirus24/requests-toolbelt#7: "Many docs updates"
	https://github.com/sigmavirus24/requests-toolbelt/pull/7
sigmavirus24/requests-toolbelt#6: "Mention SSLAdapter in README."
	https://github.com/sigmavirus24/requests-toolbelt/pull/6
sigmavirus24/requests-toolbelt#5: "Include the ever-popular SSLAdapter."
	https://github.com/sigmavirus24/requests-toolbelt/pull/5
sigmavirus24/requests-toolbelt#4: "Attempt to limit how much is ever actually in memory"
	https://github.com/sigmavirus24/requests-toolbelt/pull/4
sigmavirus24/requests-toolbelt#3: "User agent constructor."
	https://github.com/sigmavirus24/requests-toolbelt/pull/3
sigmavirus24/requests-toolbelt#2: "README fixes"
	https://github.com/sigmavirus24/requests-toolbelt/pull/2
sigmavirus24/requests-toolbelt#1: "Uploader does not really stream"
	https://github.com/sigmavirus24/requests-toolbelt/issues/1

Finally, you can list all issues. This time, let's change the direction in which we list them.


In [7]:
for issue in repo.issues(state='all', direction='asc'):
    print('{0}#{1.number}: "{1.title}"\n\t{1.html_url}'.format(repo, issue))


sigmavirus24/requests-toolbelt#1: "Uploader does not really stream"
	https://github.com/sigmavirus24/requests-toolbelt/issues/1
sigmavirus24/requests-toolbelt#2: "README fixes"
	https://github.com/sigmavirus24/requests-toolbelt/pull/2
sigmavirus24/requests-toolbelt#3: "User agent constructor."
	https://github.com/sigmavirus24/requests-toolbelt/pull/3
sigmavirus24/requests-toolbelt#4: "Attempt to limit how much is ever actually in memory"
	https://github.com/sigmavirus24/requests-toolbelt/pull/4
sigmavirus24/requests-toolbelt#5: "Include the ever-popular SSLAdapter."
	https://github.com/sigmavirus24/requests-toolbelt/pull/5
sigmavirus24/requests-toolbelt#6: "Mention SSLAdapter in README."
	https://github.com/sigmavirus24/requests-toolbelt/pull/6
sigmavirus24/requests-toolbelt#7: "Many docs updates"
	https://github.com/sigmavirus24/requests-toolbelt/pull/7
sigmavirus24/requests-toolbelt#8: "Invalid multipart encoding with a file"
	https://github.com/sigmavirus24/requests-toolbelt/pull/8
sigmavirus24/requests-toolbelt#9: "'file' does not have the buffer interface"
	https://github.com/sigmavirus24/requests-toolbelt/issues/9
sigmavirus24/requests-toolbelt#10: "pip install fails with requests 1.2.3"
	https://github.com/sigmavirus24/requests-toolbelt/issues/10
sigmavirus24/requests-toolbelt#11: "Get version info from a file that actually exists"
	https://github.com/sigmavirus24/requests-toolbelt/pull/11
sigmavirus24/requests-toolbelt#12: "MultipartEncoder: added callback support and bytes read counter"
	https://github.com/sigmavirus24/requests-toolbelt/pull/12
sigmavirus24/requests-toolbelt#13: "add explicit utf-8 encoding"
	https://github.com/sigmavirus24/requests-toolbelt/pull/13
sigmavirus24/requests-toolbelt#14: "Added MultipartDecoder."
	https://github.com/sigmavirus24/requests-toolbelt/pull/14
sigmavirus24/requests-toolbelt#15: "Adding Multipart Decoder, redux"
	https://github.com/sigmavirus24/requests-toolbelt/pull/15
sigmavirus24/requests-toolbelt#16: "`MultipartEncoder` not fully compliant with RFC 1521"
	https://github.com/sigmavirus24/requests-toolbelt/issues/16
sigmavirus24/requests-toolbelt#17: "MultipartEncoder sometimes add bytes"
	https://github.com/sigmavirus24/requests-toolbelt/issues/17
sigmavirus24/requests-toolbelt#18: "Slightly refactored MultipartEncoder + improved unit tests"
	https://github.com/sigmavirus24/requests-toolbelt/pull/18
sigmavirus24/requests-toolbelt#19: "IPv6 Transport Adapter"
	https://github.com/sigmavirus24/requests-toolbelt/issues/19
sigmavirus24/requests-toolbelt#20: "README.rst: minor edits, syntax highlighting"
	https://github.com/sigmavirus24/requests-toolbelt/pull/20
sigmavirus24/requests-toolbelt#21: "WIP: AuthHandler"
	https://github.com/sigmavirus24/requests-toolbelt/pull/21
sigmavirus24/requests-toolbelt#22: "Add Monitor for MultipartEncoder"
	https://github.com/sigmavirus24/requests-toolbelt/pull/22
sigmavirus24/requests-toolbelt#23: "Add encoding comment to `*.py`"
	https://github.com/sigmavirus24/requests-toolbelt/pull/23
sigmavirus24/requests-toolbelt#24: "Import metadata from package to setup.py"
	https://github.com/sigmavirus24/requests-toolbelt/pull/24
sigmavirus24/requests-toolbelt#25: "Import authors to setup.py"
	https://github.com/sigmavirus24/requests-toolbelt/pull/25
sigmavirus24/requests-toolbelt#26: "illegal seek uploading data stream"
	https://github.com/sigmavirus24/requests-toolbelt/issues/26
sigmavirus24/requests-toolbelt#27: "Request for Comments: Implement RFC 5987"
	https://github.com/sigmavirus24/requests-toolbelt/issues/27
sigmavirus24/requests-toolbelt#28: "GuessAuth"
	https://github.com/sigmavirus24/requests-toolbelt/pull/28
sigmavirus24/requests-toolbelt#29: "Multipart encoder cannot be reused"
	https://github.com/sigmavirus24/requests-toolbelt/issues/29
sigmavirus24/requests-toolbelt#30: "File object not closed"
	https://github.com/sigmavirus24/requests-toolbelt/issues/30
sigmavirus24/requests-toolbelt#31: "MultipartEncoder.read() returns less than 8192 bytes even when more bytes are left"
	https://github.com/sigmavirus24/requests-toolbelt/issues/31
sigmavirus24/requests-toolbelt#32: "Duplicated content in user.rst and README.rst?"
	https://github.com/sigmavirus24/requests-toolbelt/issues/32
sigmavirus24/requests-toolbelt#33: "Add support for multipart/mixed"
	https://github.com/sigmavirus24/requests-toolbelt/issues/33
sigmavirus24/requests-toolbelt#34: "SSLAdapter crashes if used with multiprocessing"
	https://github.com/sigmavirus24/requests-toolbelt/issues/34
sigmavirus24/requests-toolbelt#35: "Add ssl_version to the list of attributes"
	https://github.com/sigmavirus24/requests-toolbelt/pull/35
sigmavirus24/requests-toolbelt#36: "Some fields do not get uploaded"
	https://github.com/sigmavirus24/requests-toolbelt/issues/36
sigmavirus24/requests-toolbelt#37: "Improve documentation"
	https://github.com/sigmavirus24/requests-toolbelt/issues/37
sigmavirus24/requests-toolbelt#38: "Add from_file classmethod to StreamingIterator"
	https://github.com/sigmavirus24/requests-toolbelt/issues/38
sigmavirus24/requests-toolbelt#39: "MultipartEncoder int encoding issues"
	https://github.com/sigmavirus24/requests-toolbelt/issues/39

An alternative method to retrieving issues on a repository


In [1]:
import github3

In [3]:
for issue in github3.issues_on('sigmavirus24', 'requests-toolbelt'):
        print('sigmavirus24/requests-toolbelt#{0.number}: "{0.title}"\n\t{0.html_url}'.format(issue))


sigmavirus24/requests-toolbelt#39: "MultipartEncoder int encoding issues"
	https://github.com/sigmavirus24/requests-toolbelt/issues/39
sigmavirus24/requests-toolbelt#38: "Add from_file classmethod to StreamingIterator"
	https://github.com/sigmavirus24/requests-toolbelt/issues/38
sigmavirus24/requests-toolbelt#37: "Improve documentation"
	https://github.com/sigmavirus24/requests-toolbelt/issues/37
sigmavirus24/requests-toolbelt#32: "Duplicated content in user.rst and README.rst?"
	https://github.com/sigmavirus24/requests-toolbelt/issues/32
sigmavirus24/requests-toolbelt#30: "File object not closed"
	https://github.com/sigmavirus24/requests-toolbelt/issues/30
sigmavirus24/requests-toolbelt#26: "illegal seek uploading data stream"
	https://github.com/sigmavirus24/requests-toolbelt/issues/26
sigmavirus24/requests-toolbelt#21: "WIP: AuthHandler"
	https://github.com/sigmavirus24/requests-toolbelt/pull/21
sigmavirus24/requests-toolbelt#19: "IPv6 Transport Adapter"
	https://github.com/sigmavirus24/requests-toolbelt/issues/19

In [ ]: