-
Notifications
You must be signed in to change notification settings - Fork 406
Add "assignees" option to create_issue #691
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
github3/github.py
Outdated
@@ -251,12 +251,12 @@ def create_gist(self, description, files, public=True): | |||
return self._instance_or_null(Gist, json) | |||
|
|||
@requires_auth | |||
def create_issue(self, owner, repository, title, body=None, assignee=None, | |||
def create_issue(self, owner, repository, title, body=None, assignee=None, assignees=None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line is too long per flake8. You'll need to wrap it over to a new line.
github3/github.py
Outdated
milestone=None, labels=[]): | ||
"""Create an issue on the project 'repository' owned by 'owner' | ||
with title 'title'. | ||
|
||
``body``, ``assignee``, ``milestone``, ``labels`` are all optional. | ||
``body``, ``assignee``, ``assignees``, ``milestone``, ``labels`` are all optional. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line is too long per flake8. You'll need to wrap it over to a new line.
github3/github.py
Outdated
@@ -285,7 +287,7 @@ def create_issue(self, owner, repository, title, body=None, assignee=None, | |||
repo = self.repository(owner, repository) | |||
|
|||
if repo is not None: | |||
return repo.create_issue(title, body, assignee, milestone, labels) | |||
return repo.create_issue(title, body, assignee, assignees, milestone, labels) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line is too long per flake8. You'll need to wrap it over to a new line.
github3/github.py
Outdated
@@ -273,6 +273,8 @@ def create_issue(self, owner, repository, title, body=None, assignee=None, | |||
formatted | |||
:param str assignee: (optional), Login of person to assign | |||
the issue to | |||
:param assignees: (optional), login of the users to assign the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small English tweak/question. Would it be 'logins of the users' or is 'login of the users' the "correct" English here?
@omgjlk when I've let something like this go unreviewed for so long, I tend to make the changes myself to the change. Luckily, GitHub will allow us to push to @beccasjames's branch and keep it in this PR. I can polish this up later this weekend or next week or you're welcome to do it. 👍 |
Taking on pushing this forward. |
This commit attempts to add support for multiple assignees issue creation.
This cassette was causing failures. Signed-off-by: Jesse Keating <jkeating@j2solutions.net>
There was not an integration test for this code path. Testing this path uncovered a bug in ShortUser when attempting to repr such objects. The name attribute is not available in the short object, so that object should print differently. The argument order for create_issue in github.py needed to match that of create_issue in repo.py, since it just passes through to that function. Signed-off-by: Jesse Keating <jkeating@j2solutions.net>
Fixed up the tests, added a new test. This is all related to #626 |
Please review this @sigmavirus24 , since I've now added code I shouldn't be the one to approve it. |
This commit attempts to add support for multiple assignees issue creation and extends some of the work form #626.