Allow multiple assignees in NewIssue and EditIssue#336
Allow multiple assignees in NewIssue and EditIssue#336phadej merged 5 commits intohaskell-github:masterfrom
Conversation
src/GitHub/Data/Issues.hs
Outdated
| { newIssueTitle :: !Text | ||
| , newIssueBody :: !(Maybe Text) | ||
| , newIssueAssignee :: !(Maybe Text) | ||
| , newIssueAssignees :: !(Maybe (Vector (Name User))) |
There was a problem hiding this comment.
is there difference between null/non-existing field (Nothing) and [] (empty Vector)?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
|
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. |
|
Ok, I've tested this out and it appears to work. |
Fixes #335
I'm not super familiar with
githubso don't know if there's obvious things I've missed, but these changes appear to work for our usage.