Skip to content
Permalink
Browse files

Make releasable before JENKINS-39533

  • Loading branch information
stephenc committed Dec 7, 2016
1 parent 036bea5 commit ef13b2f678b2da8f4901ed757d2dceaa4aacdcdd
@@ -35,7 +35,7 @@
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>scm-api</artifactId>
<version>2.0-SNAPSHOT</version>
<version>2.0</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
@@ -62,7 +62,7 @@
<dependency>
<groupId>com.coravy.hudson.plugins.github</groupId>
<artifactId>github</artifactId>
<version>1.22.5-SNAPSHOT</version>
<version>1.24.0</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
@@ -27,6 +27,7 @@
import edu.umd.cs.findbugs.annotations.NonNull;
import hudson.Extension;
import hudson.model.Item;
import hudson.model.Job;
import java.io.IOException;
import java.io.StringReader;
import java.util.Set;
@@ -62,7 +63,7 @@
private static final Pattern REPOSITORY_NAME_PATTERN = Pattern.compile("https?://([^/]+)/([^/]+)/([^/]+)");


@Override
// TODO Post JENKINS-39533 @Override
protected boolean isApplicable(@Nullable Item item) {
if (item instanceof SCMNavigatorOwner) {
for (SCMNavigator navigator : ((SCMNavigatorOwner) item).getSCMNavigators()) {
@@ -74,6 +75,12 @@ protected boolean isApplicable(@Nullable Item item) {
return false;
}

// TODO Post JENKINS-39533 delete
@Override
protected boolean isApplicable(@Nullable Job<?, ?> job) {
return isApplicable((Item)job);
}

/**
* @return set with only REPOSITORY event
*/
@@ -478,7 +478,7 @@ private void add(TaskListener listener, SCMSourceObserver observer, GHRepository
*/
@Override
public void afterSave(@NonNull SCMNavigatorOwner owner) {
GitHubWebHook.get().registerHookFor(owner);
// TODO Post JENKINS-39533 GitHubWebHook.get().registerHookFor(owner);
try {
// FIXME MINOR HACK ALERT
StandardCredentials credentials =
@@ -370,10 +370,6 @@ protected final void retrieve(@CheckForNull SCMSourceCriteria criteria,
@NonNull SCMHeadObserver observer,
@CheckForNull SCMHeadEvent<?> event,
@NonNull final TaskListener listener) throws IOException, InterruptedException {
if (event != null) {
// we rely on Observer#getIncludes() for filtering the retrieve to an event
observer = event.filter(this, observer);
}
StandardCredentials credentials = Connector.lookupScanCredentials(getOwner(), apiUri, scanCredentialsId);
// Github client and validation
GitHub github = Connector.connect(apiUri, credentials);
@@ -976,7 +972,7 @@ protected boolean isCategoryEnabled(@NonNull SCMHeadCategory category) {
public void afterSave() {
SCMSourceOwner owner = getOwner();
if (owner != null) {
GitHubWebHook.get().registerHookFor(owner);
// TODO Post JENKINS-39533 GitHubWebHook.get().registerHookFor(owner);
}
}

@@ -28,6 +28,7 @@
import edu.umd.cs.findbugs.annotations.NonNull;
import hudson.Extension;
import hudson.model.Item;
import hudson.model.Job;
import hudson.scm.SCM;
import java.io.IOException;
import java.io.StringReader;
@@ -70,7 +71,7 @@
private static final Logger LOGGER = Logger.getLogger(PullRequestGHEventSubscriber.class.getName());
private static final Pattern REPOSITORY_NAME_PATTERN = Pattern.compile("https?://([^/]+)/([^/]+)/([^/]+)");

@Override
// TODO Post JENKINS-39533 @Override
protected boolean isApplicable(@Nullable Item project) {
if (project != null) {
if (project instanceof SCMSourceOwner) {
@@ -93,6 +94,12 @@ protected boolean isApplicable(@Nullable Item project) {
return false;
}

// TODO Post JENKINS-39533 delete
@Override
protected boolean isApplicable(@Nullable Job<?, ?> job) {
return isApplicable((Item)job);
}

/**
* @return set with only PULL_REQUEST event
*/
@@ -28,6 +28,7 @@
import edu.umd.cs.findbugs.annotations.NonNull;
import hudson.Extension;
import hudson.model.Item;
import hudson.model.Job;
import hudson.scm.SCM;
import java.io.StringReader;
import java.util.Collections;
@@ -67,7 +68,7 @@
private static final Logger LOGGER = Logger.getLogger(PushGHEventSubscriber.class.getName());
private static final Pattern REPOSITORY_NAME_PATTERN = Pattern.compile("https?://([^/]+)/([^/]+)/([^/]+)");

@Override
//TODO Post JENKINS-39533 @Override
protected boolean isApplicable(@Nullable Item project) {
if (project != null) {
if (project instanceof SCMSourceOwner) {
@@ -90,6 +91,12 @@ protected boolean isApplicable(@Nullable Item project) {
return false;
}

// TODO Post JENKINS-39533 delete
@Override
protected boolean isApplicable(@Nullable Job<?, ?> job) {
return isApplicable((Item)job);
}

/**
* @return set with only PULL_REQUEST event
*/

1 comment on commit ef13b2f

@uhafner

This comment has been minimized.

Copy link
Member

@uhafner uhafner commented on ef13b2f Dec 8, 2016

There is a typo in all issue references: it is JENKINS-39355 and not JENKINS-39533.

Please sign in to comment.
You can’t perform that action at this time.