zimdel 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/zimdel.rb +5 -5
- data/lib/zimdel/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd7ca3c9d963914f97097ee7f0ce12257a5e0053
|
4
|
+
data.tar.gz: ba1911efd2d30fe28753461ef363d757dba8d955
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 745dfad3fe728deb8aea47705b55575d546f29c9b7735f559c12c015a0b04019ced5fa99f127cfb4f5afc4e744542c370e4d4fb9fa7abb685e5d1c6f728c3b13
|
7
|
+
data.tar.gz: aee5565e2fcdd28ba6e7a7b654f3fa7fa27fa7817cf21eb622f3248e15d5336910182ff12c7e1aa3c5697ab45a535d81fddf44ed1b60977f9253b8ace0dca56c
|
data/lib/zimdel.rb
CHANGED
@@ -4,15 +4,15 @@ require 'octokit'
|
|
4
4
|
module Zimdel
|
5
5
|
class << self
|
6
6
|
def new(username, password, message)
|
7
|
-
|
7
|
+
client = Octokit::Client.new(login: username, password: password)
|
8
8
|
|
9
|
-
|
9
|
+
client.notifications.each do |notification|
|
10
10
|
next unless notification[:reason] == 'mention'
|
11
|
-
|
12
|
-
|
11
|
+
client.add_comment(notification[:repository][:full_name], notification[:subject][:url][/[0-9]+$/], message)
|
12
|
+
client.update_thread_subscription(notification[:id], :ignored => true)
|
13
13
|
end
|
14
14
|
|
15
|
-
|
15
|
+
client.mark_notifications_as_read
|
16
16
|
end
|
17
17
|
end
|
18
18
|
end
|
data/lib/zimdel/version.rb
CHANGED