Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Sohn2016-05-25 07:27:35 -0400
committerMatthias Sohn2016-05-25 07:27:55 -0400
commit2bfcc7d293316f7572ec6015d506be4884616d25 (patch)
tree352ebf4f8ecc5188a110b6622503d2f60c6f993e
parentf60993d8949c5c910c1b13b1f0d0ca7a7916c0a8 (diff)
parentf698a681d509059a0bdbd66b708235d685bdc91a (diff)
downloadegit-github-2bfcc7d293316f7572ec6015d506be4884616d25.tar.gz
egit-github-2bfcc7d293316f7572ec6015d506be4884616d25.tar.xz
egit-github-2bfcc7d293316f7572ec6015d506be4884616d25.zip
Merge branch 'master' into stable-4.4
* master: Add missing attributes to CommitComment Fix auto-filled issue task URL Change-Id: I70776c197d1d3059c5b93700efb860c45c526ffd Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
-rw-r--r--org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/CommitComment.java54
-rw-r--r--org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/issue/IssueConnector.java6
-rw-r--r--org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/issue/IssueConnectorUi.java2
3 files changed, 58 insertions, 4 deletions
diff --git a/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/CommitComment.java b/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/CommitComment.java
index bf9cc067..90e7c994 100644
--- a/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/CommitComment.java
+++ b/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/CommitComment.java
@@ -22,10 +22,16 @@ public class CommitComment extends Comment {
private int position;
+ private int originalPosition;
+
private String commitId;
+ private String originalCommitId;
+
private String path;
+ private String diffHunk;
+
/**
* @return line
*/
@@ -59,6 +65,22 @@ public class CommitComment extends Comment {
}
/**
+ * @return originalPosition
+ */
+ public int getOriginalPosition() {
+ return originalPosition;
+ }
+
+ /**
+ * @param originalPosition
+ * @return this commit comment
+ */
+ public CommitComment setOriginalPosition(int originalPosition) {
+ this.originalPosition = originalPosition;
+ return this;
+ }
+
+ /**
* @return commitId
*/
public String getCommitId() {
@@ -75,6 +97,22 @@ public class CommitComment extends Comment {
}
/**
+ * @return originalCommitId
+ */
+ public String getOriginalCommitId() {
+ return originalCommitId;
+ }
+
+ /**
+ * @param originalCommitId
+ * @return this commit comment
+ */
+ public CommitComment setOriginalCommitId(String originalCommitId) {
+ this.originalCommitId = originalCommitId;
+ return this;
+ }
+
+ /**
* @return path
*/
public String getPath() {
@@ -89,4 +127,20 @@ public class CommitComment extends Comment {
this.path = path;
return this;
}
+
+ /**
+ * @return diffHunk
+ */
+ public String getDiffHunk() {
+ return diffHunk;
+ }
+
+ /**
+ * @param diffHunk
+ * @return this commit comment
+ */
+ public CommitComment setDiffHunk(String diffHunk) {
+ this.diffHunk = diffHunk;
+ return this;
+ }
}
diff --git a/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/issue/IssueConnector.java b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/issue/IssueConnector.java
index 696846a8..f93a3604 100644
--- a/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/issue/IssueConnector.java
+++ b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/issue/IssueConnector.java
@@ -377,7 +377,7 @@ public class IssueConnector extends RepositoryConnector {
public String getRepositoryUrlFromTaskUrl(String taskFullUrl) {
if (taskFullUrl != null) {
Matcher matcher = Pattern.compile(
- "(http://.+?)/issues/issue/([^/]+)").matcher(taskFullUrl); //$NON-NLS-1$
+ "(http://.+?)/issues/([^/]+)").matcher(taskFullUrl); //$NON-NLS-1$
if (matcher.matches())
return matcher.group(1);
}
@@ -388,7 +388,7 @@ public class IssueConnector extends RepositoryConnector {
public String getTaskIdFromTaskUrl(String taskFullUrl) {
if (taskFullUrl != null) {
Matcher matcher = Pattern
- .compile(".+?/issues/issue/([^/]+)").matcher(taskFullUrl); //$NON-NLS-1$
+ .compile(".+?/issues/([^/]+)").matcher(taskFullUrl); //$NON-NLS-1$
if (matcher.matches())
return matcher.group(1);
}
@@ -397,7 +397,7 @@ public class IssueConnector extends RepositoryConnector {
@Override
public String getTaskUrl(String repositoryUrl, String taskId) {
- return repositoryUrl + "/issues/issue/" + taskId; //$NON-NLS-1$
+ return repositoryUrl + "/issues/" + taskId; //$NON-NLS-1$
}
@Override
diff --git a/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/issue/IssueConnectorUi.java b/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/issue/IssueConnectorUi.java
index 5785df3c..d8c27613 100644
--- a/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/issue/IssueConnectorUi.java
+++ b/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/issue/IssueConnectorUi.java
@@ -160,7 +160,7 @@ public class IssueConnectorUi extends AbstractRepositoryConnectorUi {
} else if (user != null && project != null) {
Region region = createRegion(textOffset, matcher);
String url = GitHub.createGitHubUrl(user, project)
- + "/issues/issue/" + taskId;
+ + "/issues/" + taskId;
hyperlinks.add(new URLHyperlink(region, url));
}
}

Back to the top