Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the "Unlisted" status to bot commands #329

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion modules/question_setter.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
On Rob Miles's Discord server, an `@editor` can ask other `@editor`s and `@reviewer`s to give them feedback or review their changes to AI Safety Info questions. You just put one or more links to appropriate GDocs and mention one of: `@reviewer`, `@feedback`, or `@feedback-sketch`. Stampy will spot this and update their statuses in the coda table with answers appropriately.
`@reviewer <gdoc-link(s)>` - change status to `In review`
`@feedback <gdoc-link(s)>` - change status to `In progress`
`@unlisted <gdoc-link(s)>` - change status to `Unlisted`
`@feedback-sketch <gdoc-link(s)>` - change status to `Bulletpoint sketch`

Review acceptance, accepted, approved, lgtm
Expand Down Expand Up @@ -73,7 +74,7 @@

GDocLinks = list[str]
MsgRefId = str
ReviewStatus = Literal["In review", "Bulletpoint sketch", "In progress"]
ReviewStatus = Literal["In review", "Bulletpoint sketch", "In progress", "Unlisted"]
MarkingStatus = Literal["Marked for deletion", "Duplicate"]
EditAction = Literal["add", "remove", "clear"]

Expand Down Expand Up @@ -203,6 +204,8 @@ def parse_review_request(self, message: ServiceMessage) -> Optional[Response]:
status = "Bulletpoint sketch"
elif "@feedback" in text:
status = "In progress"
elif "@unlisted" in text:
status = "Unlisted"
else: # if neither of these three roles is mentioned, this is not a review request
return

Expand Down Expand Up @@ -760,6 +763,10 @@ def test_cases(self) -> list[IntegrationTest]:
test_message="dup https://docs.google.com/document/d/1vg2kUNaMcQA2lB9zvJTn9npqVS-pkquLeODG7eVOyWE/edit https://docs.google.com/document/d/1KOHkRf1TCwB3x1OSUPOVKvUMvUDZPlOII4Ycrc0Aynk/edit",
expected_regex="Changed status of 2 questions to `Duplicate`",
),
self.create_integration_test(
test_message="@unlisted https://docs.google.com/document/d/1vg2kUNaMcQA2lB9zvJTn9npqVS-pkquLeODG7eVOyWE/edit https://docs.google.com/document/d/1KOHkRf1TCwB3x1OSUPOVKvUMvUDZPlOII4Ycrc0Aynk/edit",
expected_regex="Changed status of 2 questions to `Unlisted`",
),
self.create_integration_test(
test_message="lgtm https://docs.google.com/document/d/1vg2kUNaMcQA2lB9zvJTn9npqVS-pkquLeODG7eVOyWE/edit https://docs.google.com/document/d/1KOHkRf1TCwB3x1OSUPOVKvUMvUDZPlOII4Ycrc0Aynk/edit",
expected_regex="2 more questions `Live on site`!",
Expand Down
Loading