Skip to content
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

Allow multiple assignees in NewIssue and EditIssue #336

Merged
merged 5 commits into from
Feb 4, 2019

Conversation

axman6
Copy link
Contributor

@axman6 axman6 commented Oct 25, 2018

Fixes #335

I'm not super familiar with github so don't know if there's obvious things I've missed, but these changes appear to work for our usage.

@@ -43,7 +43,7 @@ instance Binary Issue
data NewIssue = NewIssue
{ newIssueTitle :: !Text
, newIssueBody :: !(Maybe Text)
, newIssueAssignee :: !(Maybe Text)
, newIssueAssignees :: !(Maybe (Vector (Name User)))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there difference between null/non-existing field (Nothing) and [] (empty Vector)?

Copy link
Contributor Author

@axman6 axman6 Oct 25, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe sending [] causes all assignees to to be removed, and sending null causes errors from the server. See the notes for assignees on https://developer.github.com/v3/issues/#edit-an-issue

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... in NewIssue ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've confirmed that both an empty vector and having the keys missing are accepted by GitHub, so really it's a design question if you would prefer to send "assignees": [] or not.

@axman6
Copy link
Contributor Author

axman6 commented Oct 25, 2018

Oh sorry, answering on my phone and missed the context - it looks as though sending [] would be fine, I'll fix that up tomorrow and test it.

@axman6 axman6 changed the title All multiple assignees in NewIssue and EditIssue Allow multiple assignees in NewIssue and EditIssue Oct 25, 2018
@axman6
Copy link
Contributor Author

axman6 commented Oct 26, 2018

Ok, I've tested this out and it appears to work.

@phadej phadej merged commit d6f4ea6 into haskell-github:master Feb 4, 2019
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.

None yet

2 participants