Commit c8c6e725 authored by test's avatar test

GitHubRepository: Implement create_issue function

Closes #29
parent 80443b86
......@@ -255,3 +255,16 @@ class GitHubRepository(Repository):
from IGitt.GitHub.GitHubMergeRequest import GitHubMergeRequest
return {GitHubMergeRequest(self._token, self.full_name, res['number'])
for res in get(self._token, self._url + '/pulls')}
def create_issue(self, title: str, body: str) -> GitHubIssue:
Create a new issue in the repository.
>>> from os import environ
>>> repo = GitHubRepository(environ['GITHUB_TEST_TOKEN'],
... 'gitmate-test-user/test')
>>> iss = repo.create_issue('test issue title', 'test body title')
>>> isinstance(iss, GitHubIssue)
return GitHubIssue.create(self._token,, title, body)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment