hudson.scm.EditType Java Examples
The following examples show how to use
hudson.scm.EditType.
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: GitLabBrowser.java From gitlab-branch-source-plugin with MIT License | 6 votes |
@Override public URL getFileLink(GitChangeSet.Path path) throws IOException { if (path.getEditType().equals(EditType.DELETE)) { return diffLink(path); } else { return new URL( getUriTemplateFromServer(getProjectUrl()) .literal("/blob") .path(UriTemplateBuilder.var("changeSet")) .path(UriTemplateBuilder.var("path", true)) .build() .set("changeSet", path.getChangeSet().getId()) .set("path", splitPath(path.getPath())) .expand() ); } }
Example #2
Source File: GiteaBrowser.java From gitea-plugin with MIT License | 6 votes |
/** * {@inheritDoc} */ @Override public URL getFileLink(Path path) throws IOException { if (path.getEditType().equals(EditType.DELETE)) { return diffLink(path); } else { return new URL( UriTemplate.buildFromTemplate(getRepoUrl()) .literal("/src") .path(UriTemplateBuilder.var("changeSet")) .path(UriTemplateBuilder.var("path", true)) .build() .set("changeSet", path.getChangeSet().getId()) .set("path", StringUtils.split(path.getPath(), '/')) .expand() ); } }
Example #3
Source File: GitLabBrowser.java From gitlab-branch-source-plugin with MIT License | 5 votes |
@Override public URL getDiffLink(GitChangeSet.Path path) throws IOException { if (path.getEditType() != EditType.EDIT || path.getSrc() == null || path.getDst() == null || path.getChangeSet().getParentCommit() == null) { return null; } return diffLink(path); }
Example #4
Source File: GiteaBrowser.java From gitea-plugin with MIT License | 5 votes |
/** * {@inheritDoc} */ @Override public URL getDiffLink(Path path) throws IOException { if (path.getEditType() != EditType.EDIT || path.getSrc() == null || path.getDst() == null || path.getChangeSet().getParentCommit() == null) { return null; } return diffLink(path); }
Example #5
Source File: FakeChangeLogSCM.java From jenkins-test-harness with MIT License | 5 votes |
@Override public Collection<ChangeLogSet.AffectedFile> getAffectedFiles() { ChangeLogSet.AffectedFile affectedFile = new ChangeLogSet.AffectedFile() { @Override public String getPath() { return path; } @Override public EditType getEditType() { return EditType.EDIT; } }; return Collections.singleton(affectedFile); }
Example #6
Source File: AffectedFileBuilder.java From office-365-connector-plugin with Apache License 2.0 | 4 votes |
@Override public EditType getEditType() { return null; }
Example #7
Source File: GithubAffectedFile.java From DotCi with MIT License | 4 votes |
public GithubAffectedFile(EditType editType, String path) { this.editType = editType; this.path = path; }
Example #8
Source File: GithubAffectedFile.java From DotCi with MIT License | 4 votes |
@Override public EditType getEditType() { return this.editType; }