Java Code Examples for hudson.scm.EditType#EDIT

The following examples show how to use hudson.scm.EditType#EDIT . 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 5 votes vote down vote up
@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 2
Source File: GiteaBrowser.java    From gitea-plugin with MIT License 5 votes vote down vote up
/**
 * {@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 3
Source File: FakeChangeLogSCM.java    From jenkins-test-harness with MIT License 5 votes vote down vote up
@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);
}