Skip to content

Commit

Permalink
Merge branch 'main' into resciencec
Browse files Browse the repository at this point in the history
  • Loading branch information
xuanxu committed Aug 17, 2023
2 parents 4f03e8b + 66fd7dd commit dc4847f
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 35 deletions.
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ if ENV["CUSTOM_RUBY_VERSION"]
end

gem 'octokit'
gem 'sinatra', '3.0.5'
gem 'sinatra-contrib', '3.0.5'
gem 'sinatra', '3.1.0'
gem 'sinatra-contrib', '3.1.0'
gem 'openssl'
gem 'puma'
gem 'sidekiq'
Expand Down
58 changes: 29 additions & 29 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
GEM
remote: https://rubygems.org/
specs:
addressable (2.8.4)
addressable (2.8.5)
public_suffix (>= 2.0.2, < 6.0)
bibtex-ruby (6.0.0)
latex-decode (~> 0.0)
cgi (0.3.6)
charlock_holmes (0.7.7)
chronic (0.10.2)
concurrent-ruby (1.2.2)
connection_pool (2.4.0)
connection_pool (2.4.1)
crack (0.4.5)
rexml
diff-lcs (1.5.0)
dotenv (2.8.1)
faraday (2.7.4)
faraday (2.7.10)
faraday-net_http (>= 2.0, < 3.1)
ruby2_keywords (>= 0.0.4)
faraday-follow_redirects (0.1.0)
faraday (>= 2, < 3)
faraday-net_http (3.0.2)
faraday-retry (2.1.0)
faraday-retry (2.2.0)
faraday (~> 2.0)
github-linguist (7.25.0)
github-linguist (7.26.0)
cgi
charlock_holmes (~> 0.7.7)
mini_mime (~> 1.0)
Expand All @@ -38,33 +38,33 @@ GEM
reverse_markdown (>= 1, < 3)
rugged (>= 0.24, < 2.0)
thor (>= 0.19, < 2.0)
mini_mime (1.1.2)
mini_portile2 (2.8.2)
mini_mime (1.1.5)
mini_portile2 (2.8.4)
multi_json (1.15.0)
mustermann (3.0.0)
ruby2_keywords (~> 0.0.1)
nio4r (2.5.9)
nokogiri (1.14.3)
mini_portile2 (~> 2.8.0)
nokogiri (1.15.3)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
octokit (6.1.1)
faraday (>= 1, < 3)
sawyer (~> 0.9)
openssl (3.1.0)
public_suffix (5.0.1)
puma (6.2.2)
public_suffix (5.0.3)
puma (6.3.0)
nio4r (~> 2.0)
racc (1.6.2)
rack (2.2.7)
rack-protection (3.0.5)
rack
racc (1.7.1)
rack (2.2.8)
rack-protection (3.1.0)
rack (~> 2.2, >= 2.2.4)
rack-test (2.1.0)
rack (>= 1.3)
redis-client (0.14.1)
redis-client (0.15.0)
connection_pool
reverse_markdown (2.1.1)
nokogiri
rexml (3.2.5)
rexml (3.2.6)
rspec (3.12.0)
rspec-core (~> 3.12.0)
rspec-expectations (~> 3.12.0)
Expand All @@ -74,10 +74,10 @@ GEM
rspec-expectations (3.12.3)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-mocks (3.12.5)
rspec-mocks (3.12.6)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-support (3.12.0)
rspec-support (3.12.1)
ruby2_keywords (0.0.5)
rugged (1.6.3)
sawyer (0.9.2)
Expand All @@ -89,24 +89,24 @@ GEM
multi_json (~> 1.15)
rexml (~> 3.2, >= 3.2.5)
thor (~> 1.2, >= 1.2.1)
sidekiq (7.1.0)
sidekiq (7.1.2)
concurrent-ruby (< 2)
connection_pool (>= 2.3.0)
rack (>= 2.2.4)
redis-client (>= 0.14.0)
sinatra (3.0.5)
sinatra (3.1.0)
mustermann (~> 3.0)
rack (~> 2.2, >= 2.2.4)
rack-protection (= 3.0.5)
rack-protection (= 3.1.0)
tilt (~> 2.0)
sinatra-contrib (3.0.5)
sinatra-contrib (3.1.0)
multi_json
mustermann (~> 3.0)
rack-protection (= 3.0.5)
sinatra (= 3.0.5)
rack-protection (= 3.1.0)
sinatra (= 3.1.0)
tilt (~> 2.0)
thor (1.2.1)
tilt (2.1.0)
thor (1.2.2)
tilt (2.2.0)
webmock (3.18.1)
addressable (>= 2.8.0)
crack (>= 0.3.2)
Expand All @@ -131,8 +131,8 @@ DEPENDENCIES
rspec
serrano
sidekiq
sinatra (= 3.0.5)
sinatra-contrib (= 3.0.5)
sinatra (= 3.1.0)
sinatra-contrib (= 3.1.0)
webmock

BUNDLED WITH
Expand Down
2 changes: 1 addition & 1 deletion app/responders/repo_checks_responder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class RepoChecksResponder < Responder

def define_listening
@event_action = "issue_comment.created"
@event_regex = /\A@#{bot_name} check repository(?: from branch ([\/\w-]+))?\.?\s*$/i
@event_regex = /\A@#{bot_name} check repository(?: from branch ([\/\.\w-]+))?\.?\s*$/i
end

def process_message(message)
Expand Down
2 changes: 1 addition & 1 deletion app/responders/reviewers_list_responder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class ReviewersListResponder < Responder

def define_listening
@event_action = "issue_comment.created"
@event_regex = /\A@#{bot_name} (add|remove) (\S+) (to reviewers|from reviewers|as reviewer)\.?\s*$/i
@event_regex = /\A@#{bot_name} (add|remove) +(\S+) +(to reviewers|from reviewers|as reviewer)\.?\s*$/i
end

def process_message(message)
Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Buffy
=====
Buffy is an editorial bots generator, a service to provide a bot helping scientific journals manage submission reviews.

Buffy is a configurable Ruby application that –once deployed as a web service listening to incoming GitHub webhooks– provides a bot that interacts during the peer-review process with editors, reviewers and authors to help them perform actions on the review, the software being reviewed and its corresponding paper, automating common editorial tasks like those needed by the `Journal of Open Source Software <http://joss.theoj.org/>`_, `rOpenSci <https://ropensci.org/>`_ or `Scipy <https://github.com/scipy-conference/scipy_proceedings>`_.
Buffy is a configurable Ruby application that –once deployed as a web service listening to incoming GitHub webhooks– provides a bot that interacts during the peer-review process with editors, reviewers and authors to help them perform actions on the review, the software being reviewed and its corresponding paper, automating common editorial tasks like those needed by the `Journal of Open Source Software <http://joss.theoj.org/>`_, `rOpenSci <https://ropensci.org/>`_, the `Journal of Open Source Education <http://jose.theoj.org/>`_ or `Scipy <https://github.com/scipy-conference/scipy_proceedings>`_.

Buffy is an Open Source project, `the code <https://github.com/openjournals/buffy>`_ is hosted at GitHub and released under a MIT license.

Expand Down
2 changes: 1 addition & 1 deletion spec/responders/repo_checks_responder_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
expect(@responder.event_regex).to match("@botsci check repository")
expect(@responder.event_regex).to match("@botsci check repository \r\n")
expect(@responder.event_regex).to match("@botsci check repository\r\nmore")
expect(@responder.event_regex).to match("@botsci check repository from branch custom-branch")
expect(@responder.event_regex).to match("@botsci check repository from branch custom-branch_6.0")
expect(@responder.event_regex).to match("@botsci check repository from branch custom/branch")
expect(@responder.event_regex).to match("@botsci check repository from branch development \r\n")
expect(@responder.event_regex).to_not match("@botsci check repository from branch ")
Expand Down
5 changes: 5 additions & 0 deletions spec/responders/reviewers_list_responder_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,18 @@

it "should define regex" do
expect(@responder.event_regex).to match("@botsci add @arfon to reviewers")
expect(@responder.event_regex).to match("@botsci add @arfon to reviewers")
expect(@responder.event_regex).to match("@botsci add @arfon to reviewers")
expect(@responder.event_regex).to match("@botsci add @arfon to reviewers")
expect(@responder.event_regex).to match("@botsci add @arfon as reviewer")
expect(@responder.event_regex).to match("@botsci add me as reviewer")
expect(@responder.event_regex).to match("@botsci remove me from reviewers")
expect(@responder.event_regex).to match("@botsci remove @arfon from reviewers ")
expect(@responder.event_regex).to match("@botsci remove @arfon from reviewers \r\n")
expect(@responder.event_regex).to match("@botsci remove @arfon from reviewers \r\n more ")
expect(@responder.event_regex).to_not match("@botsci add to reviewers")
expect(@responder.event_regex).to_not match("@botsci add@arfon to reviewers")
expect(@responder.event_regex).to_not match("@botsci add @arfonto reviewers")
expect(@responder.event_regex).to_not match("@botsci remove from reviewers")
end
end
Expand Down

0 comments on commit dc4847f

Please sign in to comment.