Module: Zimdel
- Defined in:
- lib/zimdel.rb,
lib/zimdel/version.rb
Constant Summary collapse
- VERSION =
'0.2.1'.freeze
Class Method Summary collapse
Class Method Details
.new(username, password, message) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/zimdel.rb', line 6 def new(username, password, ) client = Octokit::Client.new(login: username, password: password) client.notifications.each do |notification| next unless notification[:reason] == 'mention' client.add_comment(notification[:repository][:full_name], notification[:subject][:url][/[0-9]+$/], ) client.update_thread_subscription(notification[:id], :ignored => true) end client.mark_notifications_as_read end |