Skip to content

Commit

Permalink
Merge pull request #339 from KostyaSha/rm-icon-shim
Browse files Browse the repository at this point in the history
Remove icon-shim plugin
  • Loading branch information
KostyaSha authored Apr 22, 2021
2 parents afbb8ca + 9f51a9b commit 16223a8
Show file tree
Hide file tree
Showing 109 changed files with 426 additions and 445 deletions.
12 changes: 1 addition & 11 deletions github-pullrequest-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -137,16 +137,6 @@
<artifactId>mailer</artifactId>
<version>1.18</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.icon-shim</groupId>
<artifactId>icon-shim</artifactId>
<version>2.0.3</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.icon-shim</groupId>
<artifactId>icon-set</artifactId>
<version>2.0.3</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.ui</groupId>
<artifactId>jquery-detached</artifactId>
Expand Down Expand Up @@ -311,7 +301,7 @@
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy</artifactId>
<version>2.3.1</version>
<version>2.4.12</version>
<scope>test</scope>
</dependency>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import com.github.kostyasha.github.integration.generic.GitHubCause;

import javax.annotation.CheckForNull;
import edu.umd.cs.findbugs.annotations.CheckForNull;

/**
* @author Kanstantsin Shautsou
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.annotation.Nonnull;
import edu.umd.cs.findbugs.annotations.NonNull;
import java.io.IOException;
import java.util.List;

Expand All @@ -24,22 +24,22 @@ public class GitHubBranchCause extends AbstractGitHubBranchCause<GitHubBranchCau

private final String branchName;

public GitHubBranchCause(@Nonnull GitHubBranch localBranch, @Nonnull GitHubBranchRepository localRepo, String reason, boolean skip) {
public GitHubBranchCause(@NonNull GitHubBranch localBranch, @NonNull GitHubBranchRepository localRepo, String reason, boolean skip) {
this(localBranch.getName(), localBranch.getCommitSha());
withReason(reason);
withSkip(skip);
withLocalRepo(localRepo);
}

public GitHubBranchCause(@Nonnull GHBranch remoteBranch, @Nonnull GitHubBranchRepository localRepo, String reason, boolean skip) {
public GitHubBranchCause(@NonNull GHBranch remoteBranch, @NonNull GitHubBranchRepository localRepo, String reason, boolean skip) {
this(remoteBranch.getName(), remoteBranch.getSHA1());
withReason(reason);
withSkip(skip);
withLocalRepo(localRepo);
withRemoteData(remoteBranch);
}

public GitHubBranchCause(@Nonnull String branchName, String commitSha) {
public GitHubBranchCause(@NonNull String branchName, String commitSha) {
super(commitSha, "refs/heads/" + branchName);
this.branchName = branchName;
}
Expand All @@ -66,7 +66,7 @@ public GitHubSCMHead<GitHubBranchCause> createSCMHead(String sourceId) {
return new GitHubBranchSCMHead(branchName, sourceId);
}

@Nonnull
@NonNull
@Override
public String getShortDescription() {
if (getHtmlUrl() != null) {
Expand All @@ -77,7 +77,7 @@ public String getShortDescription() {
}

@Override
public void onAddedTo(@Nonnull Run run) {
public void onAddedTo(@NonNull Run run) {
if (run.getParent().getParent() instanceof SCMSourceOwner) {
// skip multibranch
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.annotation.Nonnull;
import edu.umd.cs.findbugs.annotations.NonNull;
import java.io.IOException;
import java.net.URL;
import java.util.ArrayList;
Expand Down Expand Up @@ -57,14 +57,14 @@ public GitHubBranchRepository(String repoFullName, URL url) {
super(repoFullName, url);
}

@Nonnull
@NonNull
public Map<String, GitHubBranch> getBranches() {
if (isNull(branches)) branches = new ConcurrentHashMap<>();
return branches;
}

@Override
public void actualiseOnChange(@Nonnull GHRepository ghRepository, @Nonnull TaskListener listener) {
public void actualiseOnChange(@NonNull GHRepository ghRepository, @NonNull TaskListener listener) {
if (changed) {
listener.getLogger().println("Local settings changed, removing branches in repository!");
getBranches().clear();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.annotation.Nonnull;
import edu.umd.cs.findbugs.annotations.NonNull;
import java.io.File;
import java.io.IOException;
import java.net.URL;
Expand All @@ -35,9 +35,9 @@ public class GitHubBranchRepositoryFactory
extends GitHubRepositoryFactory<GitHubBranchRepositoryFactory, GitHubBranchTrigger> {
private static final Logger LOGGER = LoggerFactory.getLogger(GitHubBranchRepositoryFactory.class);

@Nonnull
@NonNull
@Override
public Collection<? extends Action> createFor(@Nonnull Job job) {
public Collection<? extends Action> createFor(@NonNull Job job) {
try {
if (nonNull(ghBranchTriggerFromJob(job))) {
return Collections.singleton(forProject(job));
Expand All @@ -49,8 +49,8 @@ public Collection<? extends Action> createFor(@Nonnull Job job) {
return Collections.emptyList();
}

@Nonnull
private static GitHubBranchRepository forProject(@Nonnull Job<?, ?> job) throws IOException {
@NonNull
private static GitHubBranchRepository forProject(@NonNull Job<?, ?> job) throws IOException {
XmlFile configFile = new XmlFile(new File(job.getRootDir(), GitHubBranchRepository.FILE));

GitHubBranchTrigger trigger = ghBranchTriggerFromJob(job);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.annotation.CheckForNull;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import edu.umd.cs.findbugs.annotations.CheckForNull;
import edu.umd.cs.findbugs.annotations.NonNull;
import edu.umd.cs.findbugs.annotations.Nullable;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.ArrayList;
Expand Down Expand Up @@ -103,7 +103,7 @@ public boolean isPreStatus() {
return preStatus;
}

@Nonnull
@NonNull
public List<GitHubBranchEvent> getEvents() {
return nonNull(events) ? events : emptyList();
}
Expand Down Expand Up @@ -274,7 +274,7 @@ private List<GitHubBranchCause> readyToBuildCauses(GitHubBranchRepository localR
/**
* Remote branch for future analysing. null - all remote branches.
*/
private Set<GHBranch> branchesToCheck(@CheckForNull String branch, @Nonnull GHRepository remoteRepo,
private Set<GHBranch> branchesToCheck(@CheckForNull String branch, @NonNull GHRepository remoteRepo,
GitHubBranchRepository localRepository)
throws IOException {
final LinkedHashSet<GHBranch> ghBranches = new LinkedHashSet<>();
Expand Down Expand Up @@ -352,7 +352,7 @@ public DescriptorImpl() {
load();
}

@Nonnull
@NonNull
@Override
public String getDisplayName() {
return "GitHub Branches";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
import hudson.model.TaskListener;
import org.kohsuke.github.GHEventPayload;

import javax.annotation.CheckForNull;
import javax.annotation.Nonnull;
import edu.umd.cs.findbugs.annotations.CheckForNull;
import edu.umd.cs.findbugs.annotations.NonNull;
import java.io.IOException;

/**
Expand All @@ -28,7 +28,7 @@ public abstract class GitHubBranchEvent extends AbstractDescribableImpl<GitHubBr
* If cause.isSkip() == false, indicates that branch build should be run.
*/
@CheckForNull
public GitHubBranchCause check(@Nonnull GitHubBranchDecisionContext context) throws IOException {
public GitHubBranchCause check(@NonNull GitHubBranchDecisionContext context) throws IOException {
return null;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.annotation.Nonnull;
import edu.umd.cs.findbugs.annotations.NonNull;
import java.io.IOException;
import java.io.PrintStream;
import java.util.ArrayList;
Expand Down Expand Up @@ -64,7 +64,7 @@ public GitHubBranchCommitEvent(List<GitHubBranchCommitCheck> checks) {
}

@Override
public GitHubBranchCause check(@Nonnull GitHubBranchDecisionContext context) throws IOException {
public GitHubBranchCause check(@NonNull GitHubBranchDecisionContext context) throws IOException {
GHBranch remoteBranch = context.getRemoteBranch();
GitHubBranch localBranch = context.getLocalBranch();
GitHubBranchRepository localRepo = context.getLocalRepo();
Expand Down Expand Up @@ -99,7 +99,7 @@ GHCommit getLastCommit(GHBranch remoteBranch) throws IOException {
return remoteBranch.getOwner().getCommit(remoteBranch.getSHA1());
}

@Nonnull
@NonNull
public List<GitHubBranchCommitCheck> getChecks() {
if (isNull(checks)) {
checks = new ArrayList<>();
Expand Down Expand Up @@ -142,7 +142,7 @@ public boolean configure(StaplerRequest req, JSONObject formData) throws FormExc
return super.configure(req, formData);
}

@Nonnull
@NonNull
@Override
public final String getDisplayName() {
return DISPLAY_NAME;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import org.kohsuke.stapler.DataBoundConstructor;
import org.slf4j.Logger;

import javax.annotation.Nonnull;
import edu.umd.cs.findbugs.annotations.NonNull;
import java.io.IOException;
import java.io.PrintStream;

Expand All @@ -33,7 +33,7 @@ public GitHubBranchCreatedEvent() {
}

@Override
public GitHubBranchCause check(@Nonnull GitHubBranchDecisionContext context) throws IOException {
public GitHubBranchCause check(@NonNull GitHubBranchDecisionContext context) throws IOException {
GHBranch remoteBranch = context.getRemoteBranch();
GitHubBranch localBranch = context.getLocalBranch();
TaskListener listener = context.getListener();
Expand Down Expand Up @@ -61,7 +61,7 @@ public GitHubBranchCause check(@Nonnull GitHubBranchDecisionContext context) thr
@Symbol("branchCreated")
@Extension
public static class DescriptorImpl extends GitHubBranchEventDescriptor {
@Nonnull
@NonNull
@Override
public final String getDisplayName() {
return DISPLAY_NAME;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.annotation.Nonnull;
import edu.umd.cs.findbugs.annotations.NonNull;
import java.io.IOException;
import java.io.PrintStream;

Expand All @@ -32,7 +32,7 @@ public GitHubBranchDeletedEvent() {
}

@Override
public GitHubBranchCause check(@Nonnull GitHubBranchDecisionContext context) throws IOException {
public GitHubBranchCause check(@NonNull GitHubBranchDecisionContext context) throws IOException {
TaskListener listener = context.getListener();
GitHubBranch localBranch = context.getLocalBranch();
GHBranch remoteBranch = context.getRemoteBranch();
Expand All @@ -52,7 +52,7 @@ public GitHubBranchCause check(@Nonnull GitHubBranchDecisionContext context) thr
@Symbol("deleted")
@Extension
public static class DescriptorImpl extends GitHubBranchEventDescriptor {
@Nonnull
@NonNull
@Override
public final String getDisplayName() {
return DISPLAY_NAME;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.annotation.Nonnull;
import edu.umd.cs.findbugs.annotations.NonNull;
import java.io.IOException;
import java.io.PrintStream;

Expand All @@ -33,7 +33,7 @@ public GitHubBranchHashChangedEvent() {
}

@Override
public GitHubBranchCause check(@Nonnull GitHubBranchDecisionContext context) throws IOException {
public GitHubBranchCause check(@NonNull GitHubBranchDecisionContext context) throws IOException {
GHBranch remoteBranch = context.getRemoteBranch();
GitHubBranch localBranch = context.getLocalBranch();
TaskListener listener = context.getListener();
Expand All @@ -57,7 +57,7 @@ public GitHubBranchCause check(@Nonnull GitHubBranchDecisionContext context) thr
@Symbol("hashChanged")
@Extension
public static class DescriptorImpl extends GitHubBranchEventDescriptor {
@Nonnull
@NonNull
@Override
public final String getDisplayName() {
return DISPLAY_NAME;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.annotation.Nonnull;
import edu.umd.cs.findbugs.annotations.NonNull;
import java.io.IOException;
import java.util.Set;
import java.util.regex.Pattern;
Expand Down Expand Up @@ -72,7 +72,7 @@ public Set<String> getMatchCriteria() {
}

@Override
public GitHubBranchCause check(@Nonnull GitHubBranchDecisionContext context) throws IOException {
public GitHubBranchCause check(@NonNull GitHubBranchDecisionContext context) throws IOException {
GHBranch remoteBranch = context.getRemoteBranch();
GitHubBranchRepository localRepo = context.getLocalRepo();

Expand Down Expand Up @@ -119,15 +119,15 @@ private boolean matches(String name, String pattern) {
}
}

private GitHubBranchCause toCause(@Nonnull GitHubBranchDecisionContext context, boolean skip,
private GitHubBranchCause toCause(@NonNull GitHubBranchDecisionContext context, boolean skip,
String message, Object... args) {
return context.newCause(String.format(message, args), skip);
}

@Symbol("restriction")
@Extension
public static class Descriptor extends GitHubBranchEventDescriptor {
@Nonnull
@NonNull
@Override
public String getDisplayName() {
return DISPLAY_NAME;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.annotation.Nonnull;
import edu.umd.cs.findbugs.annotations.NonNull;
import java.io.IOException;
import java.util.Arrays;
import java.util.Collections;
Expand Down Expand Up @@ -136,7 +136,7 @@ private GitHubBranchCause toCause(GHBranch remoteBranch, GitHubBranchRepository
@Symbol("commitMessagePattern")
@Extension
public static class DescriptorImpl extends GitHubBranchCommitCheckDescriptor {
@Nonnull
@NonNull
@Override
public final String getDisplayName() {
return DISPLAY_NAME;
Expand Down
Loading

0 comments on commit 16223a8

Please sign in to comment.