zz-export-pull-requests 0.3.12 → 0.3.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/epr +5 -3
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ad7da2494c7c8ad182157844df4558d731231afc7c3c8453b4cd0cf128e56be5
4
- data.tar.gz: 9b990c531f0a9beb4c93c8d188459c15381c6f36762a373a34e00d305e7e3cb1
3
+ metadata.gz: 9f0b0218f985b34ef2679b26aa3c8dfacecfafc2748837be00f74570107b55f4
4
+ data.tar.gz: 07d50bd0c52e1691fdb155189b985e1efab51722a909a34798369351e3767ab7
5
5
  SHA512:
6
- metadata.gz: 644f2764fe9702db374e77e78f382fc8da73a246a5762702ea6586a4353585db6d1e56a8c474b970e7be2594d8f556fd6dceff66793fa20803b8bac5f82427dd
7
- data.tar.gz: 0bd92c548197b23b1298a7c9b09755efc8656228104970b94d8237425dcddc88ffedea58e6e5007e030e3d80e1312617eb03657efb7a1831c713331fdcaef714
6
+ metadata.gz: c14ec59d6658917b7abe596b79f8bb065f62100da14810072a8e850cef7b3397843e4a76b97e8b3edd7d8e189fa823c8cd0cefa959e30257854727dc39ce8da9
7
+ data.tar.gz: fa142a59ad0af9c14ed3af2a7257ee0e0de395bbd54f654391d363238d9cf0d41996aadcc54779477ee6be4f1eef4966a0416a838172462ec79e12cc15f9ec07
data/bin/epr CHANGED
@@ -10,7 +10,7 @@ require "github_api"
10
10
  require "gitlab"
11
11
  require "bitbucket_rest_api"
12
12
 
13
- VERSION = "0.3.12"
13
+ VERSION = "0.3.13"
14
14
  SERVICES = %w[github gitlab bitbucket]
15
15
  GIT_CONFIGS = %w[epr.token github.oauth-token]
16
16
 
@@ -93,7 +93,7 @@ end
93
93
 
94
94
  def sleep_if_limit_reached
95
95
  executions = $redis.get("bb-executed").to_i
96
- $redisLogger.info("We have called the API for #{executions} times")
96
+ $redisLogger.info("We have called the API for #{executions} times") if ENV['SHOW_LOGS']
97
97
 
98
98
  if executions >= BITBUCKET_RATE_LIMIT
99
99
  now = Time.now
@@ -101,7 +101,9 @@ def sleep_if_limit_reached
101
101
  one_hour = 1*60*60
102
102
  later = now + one_hour
103
103
  later_formatted = later.strftime("%I:%M:%S")
104
- $redisLogger.info("#{now_formatted} - Rate limit reached. Will pause for an hour and will resume at #{later_formatted}.")
104
+ if ENV['SHOW_LOGS']
105
+ $redisLogger.info("#{now_formatted} - Rate limit reached. Will pause for an hour and will resume at #{later_formatted}.")
106
+ end
105
107
  sleep one_hour
106
108
  $redis.set("bb-executed", 0)
107
109
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zz-export-pull-requests
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.12
4
+ version: 0.3.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zulhilmi Zainudin