ROpenSci :: Reviewers & due date

This responder can be used to add/remove a user to/from the reviewers list in the body of the issue. It also sets a due date for the review and updates that info in the body of the issue and in the reply comment. This responder will also update Airtable adding entries to the reviewers and reviews tables, and creating if still not present entries in the packages and authors tables. Allows labeling, that will take effect when the second reviewer is assigned.

Listens to

@botname add @username to reviewers
@botname remove @username from reviewers

Requirements

The body of the issue should have a couple of placeholders marked with HTML comments: the reviewers-list and the due-dates-list

<!--reviewers-list-->  <!--end-reviewers-list-->
<!--due-dates-list-->  <!--end-due-dates-list-->

Settings key

ropensci_reviewers

Params

due_date_days:

<Integer> Optional. The number of days from the moment a reviewer is assigned to the due date for the review. Default value is 21 (three weeks).

sample_value:

Optional. A sample value string for the username field. It is used for documentation purposes when the Help responder lists all available responders. Default value is xxxxx.

no_reviewer_text:

Optional. The text that will go in the removed reviewer place to state there’s no one assigned. Default value is TBD.

add_as_assignee:

<Boolean> Optional. If true, the new reviewer will be added as assignee to the issue. Default value is false.

add_as_collaborator:

<Boolean> Optional. If true, the new reviewer it will be added as collaborator to the repo. Default value is false.

reminder:

Used to configure automatic reminders. See next.

Automatic reminders: To configure an automatic reminder for the reviewers the reminder param can be used with two nested options under it:

days_before_deadline:

<Integer> Optional. Configure when the reminder will be posted (how many days before the dealine for the review). Default value: 4

template_file:

The template file to use for the reminder (will receive variables: reviewer, days_before_deadline and due_date).

For the Airtable connection to work two parameters must be present in the env section of the settings file, configured using environment variable:

...
  env:
    airtable_api_key: <%= ENV['AIRTABLE_API_KEY'] %>
    airtable_base_id: <%= ENV['AIRTABLE_BASE_ID'] %>
...

Examples

Simplest case:

...
  responders:
    ropensci_reviewers:
...

With labeling, changing no_reviewer_text, setting a reminder, limiting access and only if there’s an editor already assigned:

...
  responders:
    ropensci_reviewers:
      only:
        - editors
      if:
        role_assigned: editor
      no_reviewer_text: "Pending"
      add_labels:
        - 3/reviewer(s)-assigned
      remove_labels:
        - 2/seeking-reviewer(s)
      reminder:
        days_before_deadline: 4
        template_file: reminder.md
...

In action

  • Initial state:

Issue’s body with placeholders ROpenSci :: Reviewers & due date: Initial state

  • Invocation:

Assigns first reviewer ROpenSci :: Reviewers & due date: first assignment

  • Assigning second reviewer applies labeling: ROpenSci :: Reviewers & due date: second reviewer and labeling

  • Final state:

Issue’s body with reviewers and due dates info ROpenSci :: Reviewers & due date: Final state