code_review_notifier 0.2.3 → 0.2.4
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 +4 -4
- data/bin/code_review_notifier +1 -1
- data/lib/code_review_notifier.rb +2 -4
- data/lib/models/code_change.rb +1 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fe98a79405c30d5a0ab08d8b8c3f0693cd1605fc81c413ddcfac136e52c54105
|
4
|
+
data.tar.gz: 0a31a14ea309f530e8927962f109e8660c6d63a1bad7da504ca46091b01fba92
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 89a05dabf9bb56d0e43cd6295ee64cfd01b114416b420b84cb8147876d047f66533d490820fecda9dea2858877a56ca61b1cc66f053e9b96f07aea952e257c71
|
7
|
+
data.tar.gz: 9a2af8b575e1a47781820937fd47b8ee6bc7b2c4dbe5356a470aeb721a60eaa762961ab7b9d36bf53e7cd3c2063661bbca7bb4fc4f2c8088de0b7b11ecb424b2
|
data/bin/code_review_notifier
CHANGED
data/lib/code_review_notifier.rb
CHANGED
@@ -27,10 +27,8 @@ class CodeReviewNotifier < Rubiclifier::BaseApplication
|
|
27
27
|
puts("Checking for notifications to display...")
|
28
28
|
all_activity = []
|
29
29
|
all_code_changes.each do |cc|
|
30
|
-
|
31
|
-
|
32
|
-
cc.activity_from_self_at = activity_for_code_change.find { |a| a.is_self }&.created_at
|
33
|
-
all_activity.concat(activity_for_code_change)
|
30
|
+
cc.code_change_activity.sort! { |a, b| a.created_at <=> b.created_at }
|
31
|
+
all_activity.concat(cc.code_change_activity)
|
34
32
|
end
|
35
33
|
all_activity.select(&:should_notify?).each do |code_change_activity|
|
36
34
|
code_change_activity.notified
|
data/lib/models/code_change.rb
CHANGED
@@ -3,7 +3,6 @@ require "date"
|
|
3
3
|
class CodeChange
|
4
4
|
attr_accessor :code_change_activity
|
5
5
|
attr_reader :id, :owner, :project, :subject, :updated_at
|
6
|
-
attr_writer :activity_from_self_at
|
7
6
|
|
8
7
|
def initialize(id, owner, project, subject, updated_at)
|
9
8
|
@id = id
|
@@ -14,7 +13,6 @@ class CodeChange
|
|
14
13
|
end
|
15
14
|
|
16
15
|
def activity_from_self_at
|
17
|
-
|
18
|
-
@activity_from_self_at
|
16
|
+
@activity_from_self_at ||= code_change_activity.find { |a| a.is_self }&.created_at
|
19
17
|
end
|
20
18
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: code_review_notifier
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kyle Grinstead
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-07-
|
11
|
+
date: 2020-07-10 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email: kyleag@hey.com
|