8000 Add "assignees" option to create_issue by beccasjames · Pull Request #691 · sigmavirus24/github3.py · GitHub
[go: up one dir, main page]

Skip to content

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

Merged
merged 3 commits into from
Dec 19, 2017

Conversation

beccasjames
Copy link
Contributor

This commit attempts to add support for multiple assignees issue creation and extends some of the work form #626.

@omgjlk omgjlk mentioned this pull request Dec 13, 2017
omgjlk
omgjlk previously requested changes Dec 13, 2017
@@ -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,
Copy link
Collaborator

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.

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.
Copy link
Collaborator

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.

@@ -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)
Copy link
Collaborator

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.

@@ -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
Copy link
Collaborator

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?

@sigmavirus24
Copy link
Owner

@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. 👍

@omgjlk
Copy link
Collaborator
omgjlk commented Dec 19, 2017

Taking on pushing this forward.

beccasjames and others added 3 commits December 19, 2017 11:33
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>
@omgjlk
Copy link
Collaborator
omgjlk commented Dec 19, 2017

Fixed up the tests, added a new test. This is all related to #626

@omgjlk omgjlk dismissed their stale review December 19, 2017 20:26

I fixed the issues myself.

@omgjlk omgjlk requested a review from sigmavirus24 December 19, 2017 20:26
@omgjlk
Copy link
Collaborator
omgjlk commented Dec 19, 2017

Please review this @sigmavirus24 , since I've now added code I shouldn't be the one to approve it.

@omgjlk omgjlk added the ready label Dec 19, 2017
@sigmavirus24 sigmavirus24 merged commit f77ae4f into sigmavirus24:develop Dec 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0