This is an automated email from the ASF dual-hosted git repository. sebb 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 6ae6237c Simplify 6ae6237c is described below commit 6ae6237c9f044e1d7b28f14315e48cee2a91f1f1 Author: Sebb <s...@apache.org> AuthorDate: Tue Mar 12 23:38:10 2024 +0000 Simplify --- www/secretary/workbench/views/actions/memapp.json.rb | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/www/secretary/workbench/views/actions/memapp.json.rb b/www/secretary/workbench/views/actions/memapp.json.rb index 803a6b98..7600906f 100644 --- a/www/secretary/workbench/views/actions/memapp.json.rb +++ b/www/secretary/workbench/views/actions/memapp.json.rb @@ -163,16 +163,10 @@ end # TODO combine with other SVN updates task "svn commit memapp-received.text" do - meetings = ASF::SVN['Meetings'] - file = Dir["#{meetings}/2*/memapp-received.txt"].max + file = ASF::MeetingUtil.get_latest_file('memapp-received.txt') received = File.read(file) - if received =~ /^no\s+\w+\s+\w+\s+\w+\s+#{@availid}\s/ - received[/^(no )\s+\w+\s+\w+\s+\w+\s+#{@availid}\s/,1] = 'yes' - end - received[/(no )\s+\w+\s+\w+\s+#{@availid}\s/,1] = 'yes' - received[/(no )\s+\w+\s+#{@availid}\s/,1] = 'yes' - received[/(no )\s+#{@availid}\s/,1] = 'yes' - @line = received[/.*\s#{@availid}\s.*/] + original = received[/.*\s#{@availid}\s.*/] + @line = original.gsub('no ','yes') form do _input value: @line, name: 'line' @@ -182,7 +176,7 @@ task "svn commit memapp-received.text" do meeting = file.split('/')[-2] path = ASF::SVN.svnpath!('Meetings', meeting,'memapp-received.txt') rc = ASF::SVN.update(path, @document, env, _, {diff: true}) do |_tmpdir, input| - input[/.*\s#{@availid}\s.*/] = @line + input.sub!(original, @line) input end raise RuntimeError.new("exit code: #{rc}") if rc != 0