From da0c3147ce889db5f41675eb930bd8c144cac5f3 Mon Sep 17 00:00:00 2001
From: James Moger <james.moger@gitblit.com>
Date: Wed, 09 Nov 2011 17:02:28 -0500
Subject: [PATCH] Documentation.
---
src/com/gitblit/SyndicationServlet.java | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/com/gitblit/SyndicationServlet.java b/src/com/gitblit/SyndicationServlet.java
index 39e37ca..1de3d79 100644
--- a/src/com/gitblit/SyndicationServlet.java
+++ b/src/com/gitblit/SyndicationServlet.java
@@ -28,9 +28,9 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import com.gitblit.models.FeedEntryModel;
import com.gitblit.models.RefModel;
import com.gitblit.models.RepositoryModel;
-import com.gitblit.models.SyndicatedEntryModel;
import com.gitblit.utils.HttpUtils;
import com.gitblit.utils.JGitUtils;
import com.gitblit.utils.StringUtils;
@@ -169,7 +169,7 @@
offset, length);
}
Map<ObjectId, List<RefModel>> allRefs = JGitUtils.getAllRefs(repository);
- List<SyndicatedEntryModel> entries = new ArrayList<SyndicatedEntryModel>();
+ List<FeedEntryModel> entries = new ArrayList<FeedEntryModel>();
boolean mountParameters = GitBlit.getBoolean(Keys.web.mountParameters, true);
String urlPattern;
@@ -183,14 +183,15 @@
String gitblitUrl = HttpUtils.getGitblitURL(request);
// convert RevCommit to SyndicatedEntryModel
for (RevCommit commit : commits) {
- SyndicatedEntryModel entry = new SyndicatedEntryModel();
+ FeedEntryModel entry = new FeedEntryModel();
entry.title = commit.getShortMessage();
entry.author = commit.getAuthorIdent().getName();
entry.link = MessageFormat.format(urlPattern, gitblitUrl,
StringUtils.encodeURL(model.name), commit.getName());
entry.published = commit.getCommitterIdent().getWhen();
- entry.contentType = "text/plain";
- entry.content = commit.getFullMessage();
+ entry.contentType = "text/html";
+ String message = GitBlit.self().processCommitMessage(model.name, commit.getFullMessage());
+ entry.content = message;
entry.repository = model.name;
entry.branch = objectId;
List<RefModel> refs = allRefs.get(commit.getId());
--
Gitblit v1.9.1