whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@apache.org
Subject [whimsy] branch master updated: allow pending comments to be reverted
Date Sun, 04 Aug 2019 16:15:49 GMT
This is an automated email from the ASF dual-hosted git repository.

rubys pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new ae120fc  allow pending comments to be reverted
ae120fc is described below

commit ae120fcee1828853e1d638b5542e4fafff62eae1
Author: Sam Ruby <rubys@intertwingly.net>
AuthorDate: Sun Aug 4 12:15:34 2019 -0400

    allow pending comments to be reverted
---
 www/board/agenda/views/actions/status.json.rb | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/www/board/agenda/views/actions/status.json.rb b/www/board/agenda/views/actions/status.json.rb
index 6ab9f72..15d93a5 100644
--- a/www/board/agenda/views/actions/status.json.rb
+++ b/www/board/agenda/views/actions/status.json.rb
@@ -31,4 +31,10 @@ Pending.update(env.user, @agenda) do |pending|
     @status.strip.gsub(/\s+/, ' ').
       gsub(/(.{1,62})(\s+|\Z)/, '\\1' + "\n".ljust(15)).strip
 
+  # if change is reverted, remove item from the pending queue
+  if match
+    parsed = Agenda.parse(@agenda, :quick)
+    actions = parsed.find {|item| item['title'] == 'Action Items'}
+    pending['status'].delete match if actions['actions'].include? match
+  end
 end


Mime
View raw message