Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Wolf2018-11-09 13:29:51 -0500
committerThomas Wolf2018-11-09 13:35:33 -0500
commit6eb9134df7cf1d507e90928adfb1e828593b5d98 (patch)
tree45df7ad13eb7262d17156c2fd16807ad7b2dca63
parent4334462bf7a0fb27ade3a06bcf6c82898921c043 (diff)
downloadegit-github-6eb9134df7cf1d507e90928adfb1e828593b5d98.tar.gz
egit-github-6eb9134df7cf1d507e90928adfb1e828593b5d98.tar.xz
egit-github-6eb9134df7cf1d507e90928adfb1e828593b5d98.zip
Fix editing issues: correct milestone attribute type
According to [1] and [2], the milestone attribute has type integer when creating or editing issues, not string. [1] https://developer.github.com/v3/issues/#create-an-issue [2] https://developer.github.com/v3/issues/#edit-an-issue Bug: 540754 Change-Id: I28553a42b6d86fd5ca1dca227ac16b23680d1ef3 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
-rw-r--r--org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/service/IssueService.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/service/IssueService.java b/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/service/IssueService.java
index cb59ce7b..280d86f3 100644
--- a/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/service/IssueService.java
+++ b/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/service/IssueService.java
@@ -605,11 +605,10 @@ public class IssueService extends GitHubService {
Milestone milestone = issue.getMilestone();
if (milestone != null) {
int number = milestone.getNumber();
- if (number > 0)
- params.put(FILTER_MILESTONE, Integer.toString(number));
- else {
- if (!newIssue)
- params.put(FILTER_MILESTONE, ""); //$NON-NLS-1$
+ if (number > 0) {
+ params.put(FILTER_MILESTONE, Integer.valueOf(number));
+ } else if (!newIssue) {
+ params.put(FILTER_MILESTONE, null);
}
}
List<Label> labels = issue.getLabels();

Back to the top