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

actually fix regression with updating issue labels #718

Merged
merged 8 commits into from
Feb 24, 2015

Conversation

shiftkey
Copy link
Member

Fixes #715

When you update an issue, the value in Labels is important. From the docs:

Labels to associate with this issue. Pass one or more Labels to replace the set of Labels on this Issue. Send an empty array ([ ]) to clear all Labels from the Issue.

There's three scenarios we need to support here, and I think this is the best compromise:

  • you start with .ToUpdate() to setup your update request - this gives you a null collection of branches, which means you're not changing anything server-side.
  • calling AddLabel manages the internal state of the list - and give you a collection which will replace whatever is currently there
  • calling ClearLabels should give you an empty collection - if this is used, it'll drop whatever labels you have defined on the server.
  • write some docs

How does that feel @thedillonb @haacked?

@thedillonb
Copy link
Contributor

@shiftkey, sounds good to me!

@shiftkey shiftkey changed the title [WIP] actuall fix regression with updating issue labels actually fix regression with updating issue labels Feb 24, 2015
@shiftkey
Copy link
Member Author

Ready for review

haacked added a commit that referenced this pull request Feb 24, 2015
actually fix regression with updating issue labels
@haacked haacked merged commit 8f631bf into master Feb 24, 2015
@haacked haacked deleted the null-issue-update-its-a-thing branch February 24, 2015 06:40
@haacked
Copy link
Contributor

haacked commented Feb 24, 2015

Nice!

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.

IssueUpdate should allow null to be sent
3 participants