Skip to content
Permalink
Browse files

Merge pull request #371 from jglick/GitStatus-multibranch-JENKINS-31884

[JENKINS-31884] Deliver webhooks to all listeners
  • Loading branch information
MarkEWaite committed Dec 11, 2015
2 parents f00f379 + 9d1d316 commit a09fcd613e5056e85ca8fea44ea614b62aa9052b
@@ -219,25 +219,31 @@ public void writeBody(PrintWriter w) {
public static abstract class Listener implements ExtensionPoint {

/**
* Called when there is a change notification on a specific repository url.
*
* @param uri the repository uri.
* @param branches the (optional) branch information.
* @return any response contributors for the response to the push request.
* @since 1.4.1
* @deprecated implement #onNotifyCommit(org.eclipse.jgit.transport.URIish, String, String...)
* @deprecated implement {@link #onNotifyCommit(org.eclipse.jgit.transport.URIish, String, List, String...)}
*/
public List<ResponseContributor> onNotifyCommit(URIish uri, String[] branches) {
return onNotifyCommit(uri, null, branches);
throw new AbstractMethodError();
}

/**
* @deprecated implement {@link #onNotifyCommit(org.eclipse.jgit.transport.URIish, String, List, String...)}
*/
public List<ResponseContributor> onNotifyCommit(URIish uri, @Nullable String sha1, String... branches) {
List<ParameterValue> buildParameters = Collections.EMPTY_LIST;
return onNotifyCommit(uri, sha1, buildParameters, branches);
return onNotifyCommit(uri, branches);
}

/**
* Called when there is a change notification on a specific repository url.
*
* @param uri the repository uri.
* @param sha1 ?
* @param buildParameters ?
* @param branches the (optional) branch information.
* @return any response contributors for the response to the push request.
* @since 2.4.0
*/
public List<ResponseContributor> onNotifyCommit(URIish uri, @Nullable String sha1, List<ParameterValue> buildParameters, String... branches) {
return Collections.EMPTY_LIST;
return onNotifyCommit(uri, sha1, branches);
}


@@ -29,6 +29,7 @@
import com.cloudbees.plugins.credentials.domains.URIRequirementBuilder;
import hudson.Extension;
import hudson.model.Item;
import hudson.model.ParameterValue;
import hudson.plugins.git.GitStatus;
import hudson.security.ACL;
import hudson.util.ListBoxModel;
@@ -146,7 +147,7 @@ public ListBoxModel doFillCredentialsIdItems(@AncestorInPath SCMSourceOwner cont
public static class ListenerImpl extends GitStatus.Listener {

@Override
public List<GitStatus.ResponseContributor> onNotifyCommit(URIish uri, String sha1, String... branches) {
public List<GitStatus.ResponseContributor> onNotifyCommit(URIish uri, String sha1, List<ParameterValue> buildParameters, String... branches) {
List<GitStatus.ResponseContributor> result = new ArrayList<GitStatus.ResponseContributor>();
boolean notified = false;
// run in high privilege to see all the projects anonymous users don't see.

0 comments on commit a09fcd6

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