Skip to content

Commit d66a30b

Browse files
committed
Fix hostname for URL info
1 parent 6833482 commit d66a30b

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>com.junichi11</groupId>
55
<artifactId>netbeans-github-issues</artifactId>
6-
<version>0.3.1</version>
6+
<version>0.3.2-SNAPSHOT</version>
77
<packaging>nbm</packaging>
88
<build>
99
<plugins>

src/main/java/com/junichi11/netbeans/modules/github/issues/repository/GitHubRepository.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343

4444
import com.junichi11.netbeans.modules.github.issues.GitHubCache;
4545
import com.junichi11.netbeans.modules.github.issues.GitHubIcons;
46+
import com.junichi11.netbeans.modules.github.issues.GitHubIssues;
4647
import com.junichi11.netbeans.modules.github.issues.GitHubIssuesConfig;
4748
import com.junichi11.netbeans.modules.github.issues.GitHubIssuesConnector;
4849
import com.junichi11.netbeans.modules.github.issues.egit.SearchIssuesParams;
@@ -83,6 +84,7 @@
8384
import org.eclipse.egit.github.core.RepositoryCommitCompare;
8485
import org.eclipse.egit.github.core.User;
8586
import org.eclipse.egit.github.core.client.GitHubClient;
87+
import org.eclipse.egit.github.core.client.IGitHubConstants;
8688
import org.eclipse.egit.github.core.service.CollaboratorService;
8789
import org.eclipse.egit.github.core.service.CommitService;
8890
import org.eclipse.egit.github.core.service.IssueService;
@@ -1005,7 +1007,11 @@ public Repository getRepository() {
10051007
}
10061008

10071009
public void setRepositoryInfo(GitHubRepositoryInfo githubRepositoryInfo) {
1008-
String url = String.format("https://%s/%s/%s/issues/", githubRepositoryInfo.getHostname(), githubRepositoryInfo.getRepositoryAuthor(), githubRepositoryInfo.getRepositoryName()); // NOI18N
1010+
String hostname = githubRepositoryInfo.getHostname();
1011+
if (hostname.equals(GitHubIssues.DEFAULT_HOSTNAME)) {
1012+
hostname = IGitHubConstants.HOST_DEFAULT;
1013+
}
1014+
String url = String.format("https://%s/%s/%s/issues/", hostname, githubRepositoryInfo.getRepositoryAuthor(), githubRepositoryInfo.getRepositoryName()); // NOI18N
10091015
repositoryInfo = createRepositoryInfo(githubRepositoryInfo, url, githubRepositoryInfo.getUserName(), null, null, null);
10101016
setProperties(githubRepositoryInfo);
10111017
}

0 commit comments

Comments
 (0)