Skip to content

Commit

Permalink
[FIXED JENKINS-18807] Ignore SCM triggers which ask to suppress post-…
Browse files Browse the repository at this point in the history
…commit hooks.

Requires 1.493+, so just update to 1.509.x already.
  • Loading branch information
jglick committed Jul 18, 2013
1 parent 2485378 commit 8ea4d76
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>1.480.3</version>
<version>1.509.2</version>
</parent>

<artifactId>mercurial</artifactId>
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/hudson/plugins/mercurial/MercurialStatus.java
Expand Up @@ -110,7 +110,7 @@ private HttpResponse handleNotifyCommit(URI url) throws ServletException, IOExce
LOGGER.log(Level.INFO, "url == " + url + " repository == " + repository);
if (looselyMatches(url, repository)) urlFound = true; else continue;
SCMTrigger trigger = project.getTrigger(SCMTrigger.class);
if (trigger!=null) triggerFound = true; else continue;
if (trigger!=null && !trigger.isIgnorePostCommitHooks()) triggerFound = true; else continue;

LOGGER.log(Level.INFO, "Triggering the polling of {0}", project.getFullDisplayName());
trigger.run();
Expand All @@ -120,7 +120,7 @@ private HttpResponse handleNotifyCommit(URI url) throws ServletException, IOExce
final String msg;
if (!scmFound) msg = "No mercurial jobs found";
else if (!urlFound) msg = "No mercurial jobs using repository: " + url;
else if (!triggerFound) msg = "Jobs found but they aren't configured for polling";
else if (!triggerFound) msg = "Jobs found but they are not configured for polling or are ignoring post-commit hooks";
else msg = null;

return new HttpResponse() {
Expand Down

0 comments on commit 8ea4d76

Please sign in to comment.