Java Code Examples for org.eclipse.egit.github.core.Repository#getGitUrl()
The following examples show how to use
org.eclipse.egit.github.core.Repository#getGitUrl() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RepositoryInfo.java From jbpm-work-items with Apache License 2.0 | 5 votes |
public RepositoryInfo(Repository repository) { if (repository != null) { this.id = repository.getId(); this.name = repository.getName(); this.gitURL = repository.getGitUrl(); this.htmlURL = repository.getHtmlUrl(); this.description = repository.getDescription(); this.masterBranch = repository.getMasterBranch(); this.openIssues = repository.getOpenIssues(); this.sshURL = repository.getSshUrl(); this.watchers = repository.getWatchers(); } }
Example 2
Source File: AddTask.java From Bitocle with Apache License 2.0 | 4 votes |
@Override protected Boolean doInBackground(Void... params) { String[] arr = query.split("/"); if (arr.length < 2) { return false; } String owner = arr[0].toLowerCase(); String name = arr[1].toLowerCase(); Repository r; try { r = service.getRepository(owner, name); } catch (IOException i) { return false; } if (isCancelled()) { return false; } RAction action = new RAction(context); try { action.openDatabase(true); } catch (SQLException s) { action.closeDatabase(); return false; } SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); if (!action.checkRepo(r.getGitUrl())) { Repo repo = new Repo(); repo.setName(r.getName()); repo.setDate(format.format(r.getCreatedAt())); repo.setDescription(r.getDescription()); repo.setLang(r.getLanguage()); repo.setStar(r.getWatchers()); repo.setFork(r.getForks()); repo.setOwner(r.getOwner().getLogin()); repo.setGit(r.getGitUrl()); git = r.getGitUrl(); action.addRepo(repo); } action.closeDatabase(); if (isCancelled()) { return false; } return true; }
Example 3
Source File: AddTask.java From Bitocle with Apache License 2.0 | 4 votes |
@Override protected Boolean doInBackground(Void... params) { String[] arr = query.split("/"); if (arr.length < 2) { return false; } String owner = arr[0].toLowerCase(); String name = arr[1].toLowerCase(); Repository r; try { r = service.getRepository(owner, name); } catch (IOException i) { return false; } if (isCancelled()) { return false; } RAction action = new RAction(context); try { action.openDatabase(true); } catch (SQLException s) { action.closeDatabase(); return false; } SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); if (!action.checkRepo(r.getGitUrl())) { Repo repo = new Repo(); repo.setName(r.getName()); repo.setDate(format.format(r.getCreatedAt())); repo.setDescription(r.getDescription()); repo.setLang(r.getLanguage()); repo.setStar(r.getWatchers()); repo.setFork(r.getForks()); repo.setOwner(r.getOwner().getLogin()); repo.setGit(r.getGitUrl()); git = r.getGitUrl(); action.addRepo(repo); } action.closeDatabase(); if (isCancelled()) { return false; } return true; }