Skip to content

Commit

Permalink
New reviewer responder docs (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
xuanxu committed Feb 24, 2021
1 parent 0f668a2 commit 24d4db3
Show file tree
Hide file tree
Showing 6 changed files with 91 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/available_responders.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,5 @@ Buffy includes a list of Responders that can be used by configuring them in the
:caption: Custom responders
:maxdepth: 1
responders/ropensci/reviewers_due_date
```
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
90 changes: 90 additions & 0 deletions docs/responders/ropensci/reviewers_due_date.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
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.
Allows [labeling](../../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 the a couple of placeholders marked with HTML comments: the _reviewers-list_ and the _due-dates-list_

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

## Settings key

`ropensci_reviewers`

## Params
```eval_rst
: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 :doc:`Help responder <../help>` 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**.
```

## Examples

**Simplest case:**
```yaml
...
responders:
ropensci_reviewers:
...
```

**With labeling, changing no_reviewer_text, limiting access and only if there's an editor already assigned:**
```yaml
...
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)
...
```

## In action

* **`Initial state:`**

Issue's body with placeholders
![](../../images/responders/ropensci/ropensci_reviewers_due_date_1.png "ROpenSci :: Reviewers & due date: Initial state")


* **`Invocation:`**

Assigns first reviewer
![](../../images/responders/ropensci/ropensci_reviewers_due_date_2.png "ROpenSci :: Reviewers & due date: first assignment")

* **`Assigning second reviewer applies labeling:`**
![](../../images/responders/ropensci/ropensci_reviewers_due_date_3.png "ROpenSci :: Reviewers & due date: second reviewer and labeling")


* **`Final state:`**

Issue's body with reviewers and due dates info
![](../../images/responders/ropensci/ropensci_reviewers_due_date_4.png "ROpenSci :: Reviewers & due date: Final state")

0 comments on commit 24d4db3

Please sign in to comment.