aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Sawicki2011-04-22 16:29:18 (EDT)
committerKevin Sawicki2011-04-22 16:29:18 (EDT)
commitaacaec6f8f24aef71553699bc1bd45f9de7b9b72 (patch)
tree211fb2be2fcff7b89db71b2df7e8da8131d09267
parent20277374252c0a6d9e4dbc5f544e4eec26ceb1df (diff)
downloadegit-github-aacaec6f8f24aef71553699bc1bd45f9de7b9b72.zip
egit-github-aacaec6f8f24aef71553699bc1bd45f9de7b9b72.tar.gz
egit-github-aacaec6f8f24aef71553699bc1bd45f9de7b9b72.tar.bz2
Add html url field to Gist class.refs/changes/23/3223/3
This field is now present in the JSON returned via the Gist API. Change-Id: I549c99e556eed872a5d6b1ee242782462b29e775 Signed-off-by: Kevin Sawicki <kevin@github.com>
-rw-r--r--org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/Gist.java9
-rw-r--r--org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/gist/GistTaskDataHandler.java2
2 files changed, 10 insertions, 1 deletions
diff --git a/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/Gist.java b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/Gist.java
index db1804e..8cabb81 100644
--- a/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/Gist.java
+++ b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/Gist.java
@@ -38,6 +38,8 @@ public class Gist {
private String gitPushUrl;
+ private String htmlUrl;
+
private String id;
private String repo;
@@ -130,6 +132,13 @@ public class Gist {
}
/**
+ * @return htmlUrl
+ */
+ public String getHtmlUrl() {
+ return this.htmlUrl;
+ }
+
+ /**
* @return id
*/
public String getId() {
diff --git a/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/gist/GistTaskDataHandler.java b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/gist/GistTaskDataHandler.java
index c77efdc..9fe386a 100644
--- a/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/gist/GistTaskDataHandler.java
+++ b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/gist/GistTaskDataHandler.java
@@ -118,7 +118,7 @@ public class GistTaskDataHandler extends AbstractTaskDataHandler {
mapper.setDateValue(created, gist.getCreatedAt());
TaskAttribute url = GistAttribute.URL.create(data);
- url.setValue(getGistUrl(data.getRepositoryUrl(), gist));
+ url.setValue(gist.getHtmlUrl());
IRepositoryPerson reporterPerson = null;
User user = gist.getUser();