summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAlex Legler <alex@a3li.li>2016-06-01 16:53:09 +0200
committerAlex Legler <alex@a3li.li>2016-06-01 16:53:09 +0200
commit4d17512ae8329a209bed8c642c70744bcda45ae0 (patch)
tree899a034fb005ad62a997702a51053161356ab3db /lib
parentSet approval/rejection delta requirement to 1 (diff)
downloadglsamaker-4d17512ae8329a209bed8c642c70744bcda45ae0.tar.gz
glsamaker-4d17512ae8329a209bed8c642c70744bcda45ae0.tar.bz2
glsamaker-4d17512ae8329a209bed8c642c70744bcda45ae0.zip
Add GLSAMAKER_BUGZIE_SKIP to skip bugzilla operations
Diffstat (limited to 'lib')
-rw-r--r--lib/bugzilla.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/bugzilla.rb b/lib/bugzilla.rb
index b35c5a8..d9b8c44 100644
--- a/lib/bugzilla.rb
+++ b/lib/bugzilla.rb
@@ -23,6 +23,11 @@ module Bugzilla
module_function
# Adds a comment to a bug. Returns the comment id on success, raises an exception on failure.
def add_comment(bug, comment)
+ if GLSAMAKER_BUGZIE_SKIP
+ Rails.logger.info 'Skipped Bugzilla.add_comment'
+ return
+ end
+
Rails.logger.debug 'Called Bugzilla.add_comment'
did_retry = false
@@ -55,6 +60,11 @@ module Bugzilla
# Updates a bug. Returns an array of changes that were done on the bug.
def update_bug(bug, changes = {})
+ if GLSAMAKER_BUGZIE_SKIP
+ Rails.logger.info 'Skipped Bugzilla.update_bug'
+ return
+ end
+
Rails.logger.debug 'Called Bugzilla.update_bug'
did_retry = false
@@ -100,6 +110,11 @@ module Bugzilla
# Files a bug, and returns the id of the filed bug
def file_bug(data)
+ if GLSAMAKER_BUGZIE_SKIP
+ Rails.logger.info 'Skipped Bugzilla.file_bug'
+ return
+ end
+
Rails.logger.debug 'Called Bugzilla.file_bug'
did_retry = false