summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorEdyta Przymus2012-08-21 04:21:32 (EDT)
committer Szymon Brandys2012-08-22 06:10:56 (EDT)
commitf37f32586d23a915ef2e5ff1807f44e9a4899ca8 (patch)
treee37b065a877e74b814af1701f0ff4a8d9dcdf84b
parenta01d74c075f9e674873a5859a60bb5bcadcdaa3f (diff)
downloadorg.eclipse.orion.server-f37f32586d23a915ef2e5ff1807f44e9a4899ca8.zip
org.eclipse.orion.server-f37f32586d23a915ef2e5ff1807f44e9a4899ca8.tar.gz
org.eclipse.orion.server-f37f32586d23a915ef2e5ff1807f44e9a4899ca8.tar.bz2
Bug 386845 - 'Pull Request' page should have better descriptions and header titlev20120822-1010
-rw-r--r--bundles/org.eclipse.orion.server.git/emails/EmailReviewRequestNotification.txt (renamed from bundles/org.eclipse.orion.server.git/emails/EmailPullRequestNotification.txt)2
-rw-r--r--bundles/org.eclipse.orion.server.git/src/org/eclipse/orion/server/git/GitConstants.java10
-rw-r--r--bundles/org.eclipse.orion.server.git/src/org/eclipse/orion/server/git/servlets/GitCommitHandlerV1.java24
3 files changed, 18 insertions, 18 deletions
diff --git a/bundles/org.eclipse.orion.server.git/emails/EmailPullRequestNotification.txt b/bundles/org.eclipse.orion.server.git/emails/EmailReviewRequestNotification.txt
index 191fc4f..7b29da8 100644
--- a/bundles/org.eclipse.orion.server.git/emails/EmailPullRequestNotification.txt
+++ b/bundles/org.eclipse.orion.server.git/emails/EmailReviewRequestNotification.txt
@@ -1,4 +1,4 @@
-Pull Request from Orion
+Review Request from Orion
NOTE: This is a machine generated memo. Please do not respond to this note.
<COMMITER_NAME> has asked you to review his/her commit <COMMIT_MESSAGE>
diff --git a/bundles/org.eclipse.orion.server.git/src/org/eclipse/orion/server/git/GitConstants.java b/bundles/org.eclipse.orion.server.git/src/org/eclipse/orion/server/git/GitConstants.java
index 4f5f015..015c9eb 100644
--- a/bundles/org.eclipse.orion.server.git/src/org/eclipse/orion/server/git/GitConstants.java
+++ b/bundles/org.eclipse.orion.server.git/src/org/eclipse/orion/server/git/GitConstants.java
@@ -175,13 +175,13 @@ public class GitConstants {
public static final String KEY_TAG_TYPE = "TagType"; //$NON-NLS-1$
- public static final String KEY_PULL_REQ_URL = "PullReqUrl"; //$NON-NLS-1$
+ public static final String KEY_REVIEW_REQ_URL = "ReviewReqUrl"; //$NON-NLS-1$
- public static final String KEY_PULL_REQ_NOTIFY_LOGIN = "PullReqNotifyLogin"; //$NON-NLS-1$
+ public static final String KEY_REVIEW_REQ_NOTIFY_LOGIN = "ReviewReqNotifyLogin"; //$NON-NLS-1$
- public static final String KEY_PULL_REQ_COMMIT = "PullReqCommit"; //$NON-NLS-1$
+ public static final String KEY_REVIEW_REQ_COMMIT = "ReviewReqCommit"; //$NON-NLS-1$
- public static final String KEY_PULL_REQ_AUTHOR_NAME = "PullReqAuthorName"; //$NON-NLS-1$
+ public static final String KEY_REVIEW_REQ_AUTHOR_NAME = "ReviewReqAuthorName"; //$NON-NLS-1$
- public static final String KEY_PULL_REQ_MESSAGE = "PullReqMessage"; //$NON-NLS-1$
+ public static final String KEY_REVIEW_REQ_MESSAGE = "ReviewMessage"; //$NON-NLS-1$
}
diff --git a/bundles/org.eclipse.orion.server.git/src/org/eclipse/orion/server/git/servlets/GitCommitHandlerV1.java b/bundles/org.eclipse.orion.server.git/src/org/eclipse/orion/server/git/servlets/GitCommitHandlerV1.java
index e14d292..6ddcd78 100644
--- a/bundles/org.eclipse.orion.server.git/src/org/eclipse/orion/server/git/servlets/GitCommitHandlerV1.java
+++ b/bundles/org.eclipse.orion.server.git/src/org/eclipse/orion/server/git/servlets/GitCommitHandlerV1.java
@@ -48,14 +48,14 @@ import org.json.JSONObject;
*/
public class GitCommitHandlerV1 extends AbstractGitHandler {
- private final static String EMAIL_PULL_REQUEST_FILE = "/emails/EmailPullRequestNotification.txt"; //$NON-NLS-1$
+ private final static String EMAIL_REVIEW_REQUEST_FILE = "/emails/EmailReviewRequestNotification.txt"; //$NON-NLS-1$
private final static String EMAIL_COMMITER_NAME = "<COMMITER_NAME>";
private final static String EMAIL_COMMIT_MESSAGE = "<COMMIT_MESSAGE>";
private static final String EMAIL_URL_LINK = "<URL>"; //$NON-NLS-1$
private final static int PAGE_SIZE = 50;
- private EmailContent pullRequestEmail;
+ private EmailContent reviewRequestEmail;
public class EmailContent {
private String title;
@@ -278,13 +278,13 @@ public class GitCommitHandlerV1 extends AbstractGitHandler {
if (newCommit != null)
return identifyNewCommitResource(request, response, db, newCommit);
- String pullReqLogin = requestObject.optString(GitConstants.KEY_PULL_REQ_NOTIFY_LOGIN);
- if (pullReqLogin != null && pullReqLogin.length() != 0) {
- String pullReqUrl = requestObject.optString(GitConstants.KEY_PULL_REQ_URL);
- String pullReqCommit = requestObject.optString(GitConstants.KEY_PULL_REQ_COMMIT);
- String pullReqAuthorName = requestObject.optString(GitConstants.KEY_PULL_REQ_AUTHOR_NAME);
- String pullReqMessage = requestObject.optString(GitConstants.KEY_PULL_REQ_MESSAGE);
- return sendNotification(request, response, db, pullReqLogin, pullReqCommit, pullReqUrl, pullReqAuthorName, pullReqMessage);
+ String reviewReqLogin = requestObject.optString(GitConstants.KEY_REVIEW_REQ_NOTIFY_LOGIN);
+ if (reviewReqLogin != null && reviewReqLogin.length() != 0) {
+ String reviewReqUrl = requestObject.optString(GitConstants.KEY_REVIEW_REQ_URL);
+ String ReviewReqCommit = requestObject.optString(GitConstants.KEY_REVIEW_REQ_COMMIT);
+ String ReviewReqAuthorName = requestObject.optString(GitConstants.KEY_REVIEW_REQ_AUTHOR_NAME);
+ String ReviewMessage = requestObject.optString(GitConstants.KEY_REVIEW_REQ_MESSAGE);
+ return sendNotification(request, response, db, reviewReqLogin, ReviewReqCommit, reviewReqUrl, ReviewReqAuthorName, ReviewMessage);
}
ObjectId refId = db.resolve(gitSegment);
@@ -465,13 +465,13 @@ public class GitCommitHandlerV1 extends AbstractGitHandler {
IOrionCredentialsService userAdmin = UserServiceHelper.getDefault().getUserStore();
User user = (User) userAdmin.getUser(UserConstants.KEY_LOGIN, login);
try {
- if (pullRequestEmail == null) {
- pullRequestEmail = new EmailContent(EMAIL_PULL_REQUEST_FILE);
+ if (reviewRequestEmail == null) {
+ reviewRequestEmail = new EmailContent(EMAIL_REVIEW_REQUEST_FILE);
}
String emailAdress = user.getEmail();
- util.sendEmail(pullRequestEmail.getTitle(), pullRequestEmail.getContent().replaceAll(EMAIL_COMMITER_NAME, authorName).replaceAll(EMAIL_URL_LINK, url).replaceAll(EMAIL_COMMIT_MESSAGE, message), emailAdress);
+ util.sendEmail(reviewRequestEmail.getTitle(), reviewRequestEmail.getContent().replaceAll(EMAIL_COMMITER_NAME, authorName).replaceAll(EMAIL_URL_LINK, url).replaceAll(EMAIL_COMMIT_MESSAGE, message), emailAdress);
JSONObject result = new JSONObject();
result.put(GitConstants.KEY_RESULT, "Email sent");