hiiro 0.1.163 → 0.1.164

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2c3b8a7ef37a2274bf4b52e02065157b4b8594acfc46247515567a70a72d4358
4
- data.tar.gz: f82e3af631f319bcfaf44ad0fee394af8e06047efa9c90643e3566a299e2ba7a
3
+ metadata.gz: e89761d8f30de0b6390c89cdeafbffe4d4716fb43f8861e151d09bbcc430e780
4
+ data.tar.gz: beff3a90ab9a6179b5f9df045bc9f12252d7d410b169d219a6b393a7a7452c3e
5
5
  SHA512:
6
- metadata.gz: f19c0547afbd4b7daed0b32e53698eb03ec7e561608a4da56dc7f988afed623048e8085868190917e5f08f640fd7c41b42119465dad98922f44a5ba67c32b83e
7
- data.tar.gz: 6ea2b1d2cfa23b14e78684647f373452682a2996dd957f17f641f018c4434df54950f902fb9c5b03425dc134de38368eaa35107aca98f8d0852e2ee3f78f969e
6
+ metadata.gz: 9e6b19fb2afec1f01a48f2c22056de7450557aff5cb286f731a0a75525a3622a40f38aae074b06a992b63ac32bac7287bfc42c8b4073a79fdb285a2567da1424
7
+ data.tar.gz: f3bbde7db8dcee139486be7ccb061897e64663dcbea09c6c92e04889444c9d430c0f6fea7c7ea4f750b19ebab891d50ff00981819002eebadafc9d29e1b77b00
data/bin/h-pr CHANGED
@@ -400,6 +400,8 @@ class PinnedPRManager
400
400
  pr
401
401
  end
402
402
 
403
+ FAILED_CONCLUSIONS = %w[FAILURE ERROR TIMED_OUT STALE STARTUP_FAILURE ACTION_REQUIRED].freeze
404
+
403
405
  def summarize_checks(rollup)
404
406
  return nil unless rollup
405
407
 
@@ -407,9 +409,17 @@ class PinnedPRManager
407
409
  return nil if contexts.empty?
408
410
 
409
411
  total = contexts.length
410
- success = contexts.count { |c| c['conclusion'] == 'SUCCESS' }
411
- pending = contexts.count { |c| c['status'] == 'PENDING' || c['status'] == 'IN_PROGRESS' }
412
- failed = contexts.count { |c| c['conclusion'] == 'FAILURE' || c['conclusion'] == 'ERROR' }
412
+ success = contexts.count do |c|
413
+ c['conclusion'] == 'SUCCESS' || c['state'] == 'SUCCESS'
414
+ end
415
+ pending = contexts.count do |c|
416
+ %w[QUEUED IN_PROGRESS PENDING REQUESTED WAITING].include?(c['status']) ||
417
+ c['state'] == 'PENDING'
418
+ end
419
+ failed = contexts.count do |c|
420
+ FAILED_CONCLUSIONS.include?(c['conclusion']) ||
421
+ %w[FAILURE ERROR].include?(c['state'])
422
+ end
413
423
 
414
424
  { 'total' => total, 'success' => success, 'pending' => pending, 'failed' => failed }
415
425
  end
data/lib/hiiro/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  class Hiiro
2
- VERSION = "0.1.163"
2
+ VERSION = "0.1.164"
3
3
  end
data/script/publish CHANGED
@@ -99,4 +99,4 @@ else
99
99
  system 'git', 'checkout', 'main'
100
100
  end
101
101
 
102
- system('./scripts/update')
102
+ system('./script/update')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hiiro
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.163
4
+ version: 0.1.164
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Toyota