From d2fb59ff3efcaec067a6eed15ccc0b08c71c6384 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Thu, 30 Mar 2023 13:02:37 +0200 Subject: [PATCH 1/7] Update settings-production.yml --- config/settings-production.yml | 292 ++++----------------------------- 1 file changed, 36 insertions(+), 256 deletions(-) diff --git a/config/settings-production.yml b/config/settings-production.yml index 9972da19..d7dfe735 100644 --- a/config/settings-production.yml +++ b/config/settings-production.yml @@ -6,8 +6,8 @@ buffy: reviewers_host_url: <%= ENV['REVIEWERS_HOST_URL'] %> reviewers_api_token: <%= ENV['REVIEWERS_API_TOKEN'] %> teams: - editors: openjournals/joss-editors - eics: openjournals/joss-eics + editors: 1474888 + eics: 1415509 responders: help: - commands: @@ -18,262 +18,42 @@ buffy: whedon: thanks: hidden: true - openjournals_reviewers_start_review: - if: - title: "^\\[REVIEW\\]:" - openjournals_reviewers_end_review: - if: - title: "^\\[REVIEW\\]:" - openjournals_reviewers_list: - only: editors - if: - role_assigned: editor - reject_msg: "Can't add reviewers: There is no editor assigned yet" - add_as_assignee: true - list_team_members: - command: list editors - team_id: openjournals/joss-editors - heading: List of JOSS editors - description: "Get a list of all editors's GitHub handles" + reviewers_list: + only: + - editors + - eics assign_editor: - only: editors - external_call: - url: "https://joss.theoj.org/papers/api_assign_editor" - method: post - query_params: - secret: <%= ENV['JOSS_SECRET'] %> - mapping: - id: issue_id - editor: editor - silent: true + only: + - editors + - eics remove_editor: - only: editors - reminders: - only: editors - check_references: - description: "Check the references of the paper for missing DOIs" - example_invocation: "@editorialbot check references" - repo_checks: - description: "Perform checks on the repository" - example_invocation: "@editorialbot check repository" - reviewer_checklist_comment: - if: - title: "^\\[REVIEW\\]:" - reject_msg: Checklists can only be created once the review has started in the review issue - template_file: reviewer_checklist.md - data_from_issue: - - target-repository - - author-handle + only: + - editors + - eics + no_editor_text: "TBD" + add_remove_assignee: + only: + - editors + - eics + list_team_members: + command: list editors + team_id: 1474888 + heading: Current ReScience C editors set_value: - version: - only: editors + only: + - editors + - eics sample_value: "v1.0.0" - - branch: - sample_value: "joss-paper" - - target-repository: - only: editors - sample_value: "https://github.com/organization/repo" - aliased_as: repository - external_call: - url: "https://joss.theoj.org/papers/api_update_paper_info" - method: post - query_params: - secret: <%= ENV['JOSS_SECRET'] %> - mapping: - id: issue_id - repository_url: new_value - silent: true - openjournals_set_archive: - only: editors - ping_track_eics: - only: editors - external_service: - - reject: - only: eics - command: reject - description: "Reject paper" - url: "https://joss.theoj.org/papers/api_reject" - query_params: - secret: <%= ENV['JOSS_SECRET'] %> - mapping: - id: issue_id - add_labels: - - rejected - success_msg: "Paper rejected." - error_msg: "There was a problem rejecting the paper." - close: true - - withdraw: - only: eics - command: withdraw - description: "Withdraw paper" - url: "https://joss.theoj.org/papers/api_withdraw" - query_params: - secret: <%= ENV['JOSS_SECRET'] %> - mapping: - id: issue_id - add_labels: - - withdrawn - success_msg: "Paper withdrawn." - error_msg: "There was a problem withdrawing the paper." - close: true - - invite_editor: - only: eics - command: "invite @(.*) as editor" - description: "Invite an editor to edit a submission (sending them an email)" - url: "https://joss.theoj.org/papers/api_editor_invite" - query_params: - secret: <%= ENV['JOSS_SECRET'] %> - mapping: - id: issue_id - editor: match_data_1 - success_msg: Invitation to edit this submission sent! - error_msg: "There was a problem inviting the user to edit this submission." - github_action: - - draft_paper: - command: generate pdf - workflow_repo: openjournals/joss-papers - workflow_name: draft-paper.yml - workflow_ref: master - description: Generates the pdf paper - data_from_issue: - - branch - - target-repository - - issue_id - mapping: - repository_url: target-repository - - recommend_acceptance: - if: - value_matches: - archive: "^((?!Pending).)*$" - reject_msg: "Paper is not ready for acceptance yet, the archive is missing" - only: editors - command: recommend-accept - workflow_repo: openjournals/joss-papers - workflow_name: recommend-acceptance.yml - workflow_ref: master - description: Recommends the submission for acceptance - message: "```\nAttempting dry run of processing paper acceptance...\n```" - inputs: - add_labels: recommend-accept - data_from_issue: - - branch - - target-repository - - issue_id - mapping: - repository_url: target-repository - run_responder: - responder_key: check_references - - accept: - if: - value_matches: - archive: "^((?!Pending).)*$" - reject_msg: "Paper is not ready for acceptance yet, the archive is missing" - only: eics - command: accept - workflow_repo: openjournals/joss-papers - workflow_name: accept.yml - workflow_ref: master - description: Accept and publish the paper - message: "```\nDoing it live! Attempting automated processing of paper acceptance...\n```" - inputs: - add_labels: "accepted,published" - data_from_issue: - - branch - - target-repository - - issue_id - mapping: - repository_url: target-repository - - reaccept: - if: - value_matches: - archive: "^((?!Pending).)*$" - reject_msg: "Can't rebuild paper, there's no value for archive" - only: eics - command: reaccept - workflow_repo: openjournals/joss-papers - workflow_name: reaccept.yml - workflow_ref: master - description: Update data on an accepted/published paper - message: "```\nRebuilding paper!\n```" - data_from_issue: - - branch - - target-repository - - issue_id - mapping: - repository_url: target-repository - - preprint: - command: generate preprint - workflow_repo: openjournals/joss-papers - workflow_name: preprint.yml - workflow_ref: master - description: Generates a LaTeX preprint file - data_from_issue: - - branch - - target-repository - - issue_id - mapping: - repository_url: target-repository - basic_command: - - query_scope: - only: editors - command: query scope - description: Flag submission with questionable scope - add_labels: - - query-scope - message: "Submission flagged for editorial review." - - list_reviewers: - command: list reviewers - description: Get a link to the complete list of reviewers - template_file: reviewers_list.md - update_comment: - - editor_post-review_checklist: - only: editors - if: - title: "^\\[REVIEW\\]:" - reject_msg: "This is not a review issue" - command: create post-review checklist - description: Creates a post-review checklist with editor and authors tasks - template_file: post-review_checklist.md - welcome: - - pre_review_issue: - if: - title: "^\\[PRE REVIEW\\]:" - template_file: pre-review_welcome.md - check_references: true - repo_checks: true - run_responder: - responder_key: github_action - responder_name: draft_paper - - review_issue: - if: - title: "^\\[REVIEW\\]:" - template_file: review_welcome.md - check_references: true - repo_checks: true - run_responder: - responder_key: github_action - responder_name: draft_paper - - close_other_issues: - if: - title: "^(?!\\[REVIEW\\]:|\\[PRE REVIEW\\]:)" - template_file: close.md - close: true - goodbye: - if: - labels: accepted - template_file: goodbye.md - external_start_review: - only: editors - external_call: - url: "https://joss.theoj.org/papers/api_start_review" - query_params: - secret: <%= ENV['JOSS_SECRET'] %> - data_from_issue: - - branch - mapping: - id: issue_id - editor: editor_login - reviewers: reviewers_logins - silent: true - template_file: "review_started.md" - close: true + - archive: + only: + - editors + - eics + sample_value: "10.21105/joss.12345" + close_issue_command: + only: + - editors + - eics + command: reject + add_labels: + - rejected From fe2a54e549ff82659f28b2a0ccc2ad96e817f400 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Thu, 30 Mar 2023 13:26:53 +0200 Subject: [PATCH 2/7] Update settings-production.yml --- config/settings-production.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/config/settings-production.yml b/config/settings-production.yml index d7dfe735..221018e2 100644 --- a/config/settings-production.yml +++ b/config/settings-production.yml @@ -37,6 +37,7 @@ buffy: - eics list_team_members: command: list editors + description: "List all ReScience C Associate Editors" team_id: 1474888 heading: Current ReScience C editors set_value: From a17852618a423f560a2250d5de5dfdb1b1aa9c01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Wed, 13 Sep 2023 13:23:04 +0200 Subject: [PATCH 3/7] Update settings-production.yml --- config/settings-production.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/config/settings-production.yml b/config/settings-production.yml index 221018e2..0b2719f1 100644 --- a/config/settings-production.yml +++ b/config/settings-production.yml @@ -3,11 +3,9 @@ buffy: bot_github_user: <%= ENV['BUFFY_BOT_GH_USER'] %> gh_access_token: <%= ENV['BUFFY_GH_ACCESS_TOKEN'] %> gh_secret_token: <%= ENV['BUFFY_GH_SECRET_TOKEN'] %> - reviewers_host_url: <%= ENV['REVIEWERS_HOST_URL'] %> - reviewers_api_token: <%= ENV['REVIEWERS_API_TOKEN'] %> teams: - editors: 1474888 - eics: 1415509 + editors: ReScience/editors + eics: ReScience/associate-editors responders: help: - commands: @@ -50,7 +48,7 @@ buffy: only: - editors - eics - sample_value: "10.21105/joss.12345" + sample_value: "10.21105/ReScienceC.12345" close_issue_command: only: - editors From 0bf3f00124e7c2cfc6703b70b903ccc148a48408 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Wed, 13 Sep 2023 16:29:06 +0200 Subject: [PATCH 4/7] Update production settings --- config/settings-production.yml | 259 ++++++++++++++++++++++++++++++--- 1 file changed, 240 insertions(+), 19 deletions(-) diff --git a/config/settings-production.yml b/config/settings-production.yml index 0b2719f1..cb7cdd67 100644 --- a/config/settings-production.yml +++ b/config/settings-production.yml @@ -4,8 +4,10 @@ buffy: gh_access_token: <%= ENV['BUFFY_GH_ACCESS_TOKEN'] %> gh_secret_token: <%= ENV['BUFFY_GH_SECRET_TOKEN'] %> teams: - editors: ReScience/editors - eics: ReScience/associate-editors + editors: 1415509 + eics: 1474888 + #editors: ReScience/editors + #eics: ReScience/associate-editors responders: help: - commands: @@ -13,46 +15,265 @@ buffy: - help: help_command: help hidden: true - whedon: thanks: hidden: true reviewers_list: only: - editors - eics + if: + role_assigned: editor + reject_msg: "Can't add reviewers: There is no editor assigned yet" + add_as_assignee: true + list_team_members: + command: list editors + description: "List all ReScience C Editors" + team_id: 1415509 + heading: Current ReScience C editors assign_editor: only: - editors - eics + external_call: + url: "https://resciencec.theoj.org/papers/api_assign_editor" + method: post + query_params: + secret: <%= ENV['RESCIENCEC_SECRET'] %> + mapping: + id: issue_id + editor: editor + silent: true remove_editor: only: - editors - eics - no_editor_text: "TBD" - add_remove_assignee: - only: - - editors - - eics - list_team_members: - command: list editors - description: "List all ReScience C Associate Editors" - team_id: 1474888 - heading: Current ReScience C editors + reminders: + only: editors + check_references: + description: "Check the references of the paper for missing DOIs" + example_invocation: "@editorialbot check references" + repo_checks: + description: "Perform checks on the repository" + example_invocation: "@editorialbot check repository" + reviewer_checklist_comment: + if: + title: "^\\[REVIEW\\]:" + reject_msg: Checklists can only be created once the review has started in the review issue + template_file: reviewer_checklist.md + data_from_issue: + - target-repository + - author-handle set_value: - version: only: - editors - eics sample_value: "v1.0.0" - - archive: + - branch: + sample_value: "rescience-paper" + - target-repository: only: - editors - eics - sample_value: "10.21105/ReScienceC.12345" - close_issue_command: + sample_value: "https://github.com/organization/repo" + aliased_as: repository + external_call: + url: "https://rescience.theoj.org/papers/api_update_paper_info" + method: post + query_params: + secret: <%= ENV['RESCIENCEC_SECRET'] %> + mapping: + id: issue_id + repository_url: new_value + silent: true + openjournals_set_archive: only: - editors - eics - command: reject - add_labels: - - rejected + ping_track_eics: + only: editors + external_service: + - reject: + only: eics + command: reject + description: "Reject paper" + url: "https://resciencec.theoj.org/papers/api_reject" + query_params: + secret: <%= ENV['RESCIENCEC_SECRET'] %> + mapping: + id: issue_id + add_labels: + - rejected + success_msg: "Paper rejected." + error_msg: "There was a problem rejecting the paper." + close: true + - withdraw: + only: eics + command: withdraw + description: "Withdraw paper" + url: "https://resciencec.theoj.org/papers/api_withdraw" + query_params: + secret: <%= ENV['RESCIENCEC_SECRET'] %> + mapping: + id: issue_id + add_labels: + - withdrawn + success_msg: "Paper withdrawn." + error_msg: "There was a problem withdrawing the paper." + close: true + - invite_editor: + only: eics + command: "invite @(.*) as editor" + description: "Invite an editor to edit a submission (sending them an email)" + url: "https://resciencec.theoj.org/papers/api_editor_invite" + query_params: + secret: <%= ENV['RESCIENCEC_SECRET'] %> + mapping: + id: issue_id + editor: match_data_1 + success_msg: Invitation to edit this submission sent! + error_msg: "There was a problem inviting the user to edit this submission." + github_action: + - draft_paper: + command: generate pdf + workflow_repo: ReScience/ReScienceC-papers + workflow_name: draft-paper.yml + description: Generates the pdf paper + data_from_issue: + - branch + - target-repository + - issue_id + mapping: + repository_url: target-repository + - recommend_acceptance: + if: + value_matches: + archive: "^((?!Pending).)*$" + reject_msg: "Paper is not ready for acceptance yet, the archive is missing" + only: editors + command: recommend-accept + workflow_repo: ReScience/ReScienceC-papers + workflow_name: recommend-acceptance.yml + description: Recommends the submission for acceptance + message: "```\nAttempting dry run of processing paper acceptance...\n```" + inputs: + add_labels: recommend-accept + data_from_issue: + - branch + - target-repository + - issue_id + mapping: + repository_url: target-repository + run_responder: + responder_key: check_references + - accept: + if: + value_matches: + archive: "^((?!Pending).)*$" + reject_msg: "Paper is not ready for acceptance yet, the archive is missing" + only: eics + command: accept + workflow_repo: ReScience/ReScienceC-papers + workflow_name: accept.yml + description: Accept and publish the paper + message: "```\nDoing it live! Attempting automated processing of paper acceptance...\n```" + inputs: + add_labels: "accepted,published" + data_from_issue: + - branch + - target-repository + - issue_id + mapping: + repository_url: target-repository + - reaccept: + if: + value_matches: + archive: "^((?!Pending).)*$" + reject_msg: "Can't rebuild paper, there's no value for archive" + only: eics + command: reaccept + workflow_repo: ReScience/ReScienceC-papers + workflow_name: reaccept.yml + description: Update data on an accepted/published paper + message: "```\nRebuilding paper!\n```" + data_from_issue: + - branch + - target-repository + - issue_id + mapping: + repository_url: target-repository + - preprint: + command: generate preprint + workflow_repo: ReScience/ReScienceC-papers + workflow_name: preprint.yml + description: Generates a LaTeX preprint file + data_from_issue: + - branch + - target-repository + - issue_id + mapping: + repository_url: target-repository + basic_command: + - query_scope: + only: editors + command: query scope + description: Flag submission with questionable scope + add_labels: + - query-scope + message: "Submission flagged for editorial review." + - list_reviewers: + command: list reviewers + description: Get a link to the complete list of reviewers + template_file: reviewers_list. + update_comment: + - editor_post-review_checklist: + only: editors + if: + title: "^\\[REVIEW\\]:" + reject_msg: "This is not a review issue" + command: create post-review checklist + description: Creates a post-review checklist with editor and authors tasks + template_file: post-review_checklist.md + welcome: + - pre_review_issue: + if: + title: "^\\[PRE REVIEW\\]:" + template_file: pre-review_welcome.md + check_references: true + repo_checks: true + run_responder: + responder_key: github_action + responder_name: draft_paper + - review_issue: + if: + title: "^\\[REVIEW\\]:" + template_file: review_welcome.md + check_references: true + repo_checks: true + run_responder: + responder_key: github_action + responder_name: draft_paper + - close_other_issues: + if: + title: "^(?!\\[REVIEW\\]:|\\[PRE REVIEW\\]:)" + template_file: close.md + close: true + goodbye: + if: + labels: accepted + template_file: goodbye.md + external_start_review: + only: editors + external_call: + url: "https://resciencec.theoj.org/papers/api_start_review" + query_params: + secret: <%= ENV['RESCIENCEC_SECRET'] %> + data_from_issue: + - branch + mapping: + id: issue_id + editor: editor_login + reviewers: reviewers_logins + silent: true + template_file: "review_started.md" + close: true From 02f8b84e5dbfa4f12897d59b0d9297c6b951345e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 29 Sep 2023 11:43:32 +0200 Subject: [PATCH 5/7] Remove unused param --- config/settings-production.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/config/settings-production.yml b/config/settings-production.yml index 36600845..cb7cdd67 100644 --- a/config/settings-production.yml +++ b/config/settings-production.yml @@ -143,7 +143,6 @@ buffy: - branch - target-repository - issue_id - - issue_title mapping: repository_url: target-repository - recommend_acceptance: From 584bc7c1a15b03baaa2abcc1e28c170f1ac9e78c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 29 Sep 2023 11:46:38 +0200 Subject: [PATCH 6/7] Remove command to update version --- config/settings-production.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/config/settings-production.yml b/config/settings-production.yml index cb7cdd67..fea756ad 100644 --- a/config/settings-production.yml +++ b/config/settings-production.yml @@ -64,11 +64,6 @@ buffy: - target-repository - author-handle set_value: - - version: - only: - - editors - - eics - sample_value: "v1.0.0" - branch: sample_value: "rescience-paper" - target-repository: From 548f3b3e0f7f2892f69c4d292f4cfa8186bc6a0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Sat, 30 Sep 2023 21:14:25 +0200 Subject: [PATCH 7/7] Select checks --- config/settings-production.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config/settings-production.yml b/config/settings-production.yml index fea756ad..c76a9610 100644 --- a/config/settings-production.yml +++ b/config/settings-production.yml @@ -53,6 +53,10 @@ buffy: description: "Check the references of the paper for missing DOIs" example_invocation: "@editorialbot check references" repo_checks: + checks: + - repo summary + - wordcount + - license description: "Perform checks on the repository" example_invocation: "@editorialbot check repository" reviewer_checklist_comment: