Permalink
Browse files

Synchronize ignored

  • Loading branch information...
1 parent a3c21a9 commit f7daeae1e525212591532c026315dec8bff41345 @beberlei committed Apr 7, 2012
Showing with 9 additions and 3 deletions.
  1. +1 −1 Makefile
  2. +7 −1 app/app.php
  3. +1 −1 packaging_config.php
View
@@ -2,7 +2,7 @@
# modify it manually. If you want to modify the Makefile model, modify the
# packaging/Makefile.in file
NAME=beberlei-github2jira
-VERSION=1.0.10
+VERSION=1.0.11
MAINTAINER=Benjamin Eberlei <kontakt@beberlei.de>
PACKAGENAME=beberlei-github2jira
PACKAGETYPE=deb
View
@@ -84,6 +84,12 @@ function synchronizePullRequest($pullRequestEvent, JiraProject $project)
if ( ! isset($pullRequestEvent->action)) {
throw new \RuntimeException("Missing action in Pull Request");
}
+
+ if ( $pullRequestEvent->action == "synchronize") {
+ // this is triggered way to often by Github
+ return false;
+ }
+
$pullRequest = $pullRequestEvent->pull_request;
if (!isset($pullRequest->html_url)) {
throw new \RuntimeException("Missing html url in Pull Request");
@@ -109,7 +115,7 @@ function synchronizePullRequest($pullRequestEvent, JiraProject $project)
}
$issues = searchJiraIssues($client, $token, $issueSearchTerms);
- if (count($issues) == 0 && in_array($pullRequestEvent->action, array('opened', 'synchronized'))) {
+ if (count($issues) == 0 && in_array($pullRequestEvent->action, array('opened'))) {
$body = str_replace(
array("{user}", "{url}", "{body}"),
array($pullRequest->user->login, $issueUrl, $pullRequest->body),
View
@@ -1,6 +1,6 @@
$configure = array(
'packagename' => 'beberlei-github2jira',
- 'version' => '1.0.10',
+ 'version' => '1.0.11',
'maintainer' => 'Benjamin Eberlei <kontakt@beberlei.de>',
'description' => 'Turns Github PRs into Jira Tickets',
'url' => 'http://www.beberlei.de',

0 comments on commit f7daeae

Please sign in to comment.