diff options
| author | Kevin Sawicki | 2011-04-12 15:45:04 +0000 |
|---|---|---|
| committer | Chris Aniszczyk | 2011-04-12 18:15:06 +0000 |
| commit | dd2d9f5f086ccdf96138f357e70e7cdac8303156 (patch) | |
| tree | d972d82a2db4d65da8917aa8b366f25f1a61e47d | |
| parent | ffacd2c4a10a0afcb280f3ed0d249fdb28aa686a (diff) | |
| download | egit-github-dd2d9f5f086ccdf96138f357e70e7cdac8303156.tar.gz egit-github-dd2d9f5f086ccdf96138f357e70e7cdac8303156.tar.xz egit-github-dd2d9f5f086ccdf96138f357e70e7cdac8303156.zip | |
Add gravatar url for assignee and reporter as task attributes
Change-Id: Ic546adcd0d6a762fdee615f17fec4234d85ebd43
Signed-off-by: Kevin Sawicki <kevin@github.com>
Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
2 files changed, 17 insertions, 4 deletions
diff --git a/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/GitHubTaskDataHandler.java b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/GitHubTaskDataHandler.java index f9690520..9e478ab6 100644 --- a/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/GitHubTaskDataHandler.java +++ b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/GitHubTaskDataHandler.java @@ -75,10 +75,23 @@ public class GitHubTaskDataHandler extends AbstractTaskDataHandler { issue.getUpdatedAt()); createAttribute(data, GitHubTaskAttributes.CLOSED_DATE, issue.getClosedAt()); - createAttribute(data, GitHubTaskAttributes.REPORTER, issue.getUser(), + + User reporter = issue.getUser(); + createAttribute(data, GitHubTaskAttributes.REPORTER, reporter, + repository); + String reporterGravatar = reporter != null ? reporter.getGravatarUrl() + : null; + createAttribute(data, GitHubTaskAttributes.REPORTER_GRAVATAR, + reporterGravatar); + + User assignee = issue.getAssignee(); + createAttribute(data, GitHubTaskAttributes.ASSIGNEE, assignee, repository); - createAttribute(data, GitHubTaskAttributes.ASSIGNEE, - issue.getAssignee(), repository); + String assigneeGravatar = assignee != null ? assignee.getGravatarUrl() + : null; + createAttribute(data, GitHubTaskAttributes.ASSIGNEE_GRAVATAR, + assigneeGravatar); + createAttribute(data, GitHubTaskAttributes.COMMENT_NEW, ""); createAttribute(data, GitHubTaskAttributes.LABELS, issue.getLabels()); diff --git a/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/IssueSummaryPart.java b/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/IssueSummaryPart.java index f3bfa532..9a0ca9d8 100644 --- a/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/IssueSummaryPart.java +++ b/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/github/ui/internal/IssueSummaryPart.java @@ -127,7 +127,7 @@ public class IssueSummaryPart extends AbstractTaskEditorPart { private boolean addAvatarPart(Composite parent, FormToolkit toolkit, TaskAttribute avatarAttribute, IRepositoryPerson person) { - if (avatarAttribute == null) + if (avatarAttribute == null || avatarAttribute.getValue().length() == 0) return false; AvatarLabel label = new AvatarLabel(GitHubUi.getDefault().getStore(), |
