Commit ead94bff authored by Meet Mangukiya's avatar Meet Mangukiya

Allow creating issues without body

Closes #48
parent 0181c82a
Pipeline #8902368 passed with stage
in 3 minutes and 27 seconds
......@@ -297,7 +297,7 @@ class GitHubIssue(Issue):
@staticmethod
def create(token: str, repository: str,
title: str, body: str):
title: str, body: str=''):
"""
Create a new issue with given title and body.
......
......@@ -256,7 +256,7 @@ class GitHubRepository(Repository):
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:
def create_issue(self, title: str, body: str='') -> GitHubIssue:
"""
Create a new issue in the repository.
......
......@@ -307,7 +307,7 @@ class GitLabIssue(Issue):
return self._data['state']
@staticmethod
def create(token: str, repository: str, title: str, body: str):
def create(token: str, repository: str, title: str, body: str=''):
"""
Create a new issue with given title and body.
......
......@@ -233,7 +233,7 @@ class GitLabRepository(Repository):
if hook['url'] == url:
delete(self._token, hook_url + '/' + str(hook['id']))
def create_issue(self, title: str, body: str) -> GitLabIssue:
def create_issue(self, title: str, body: str='') -> GitLabIssue:
"""
Create a new issue in the repository.
"""
......
......@@ -156,7 +156,7 @@ class Issue:
raise NotImplementedError
@staticmethod
def create(token, repository, title, body):
def create(token, repository, title, body=''):
"""
Create a new issue in repository.
"""
......
......@@ -156,7 +156,7 @@ class Repository:
"""
raise NotImplementedError
def create_issue(self, title, body):
def create_issue(self, title, body=''):
"""
Create a new issue.
"""
......
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