From 2d6c869ac2fd916df3ac0d8c87e0c24e4f40f94d Mon Sep 17 00:00:00 2001 From: Olivier Coutu Date: Thu, 19 Sep 2024 17:56:30 -0400 Subject: [PATCH 1/2] Add the "Unlisted" status to bot commands --- modules/question_setter.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/question_setter.py b/modules/question_setter.py index 05c414b..5563945 100644 --- a/modules/question_setter.py +++ b/modules/question_setter.py @@ -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 ` - change status to `In review` `@feedback ` - change status to `In progress` +`@unlisted ` - change status to `Unlisted` `@feedback-sketch ` - change status to `Bulletpoint sketch` Review acceptance, accepted, approved, lgtm @@ -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"] @@ -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 From 1b754f91f66bf0223f79c56afe2fe5d48970e9f7 Mon Sep 17 00:00:00 2001 From: Olivier Coutu Date: Thu, 19 Sep 2024 21:36:13 -0400 Subject: [PATCH 2/2] Added test for Unlisted --- modules/question_setter.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/question_setter.py b/modules/question_setter.py index 5563945..70b2452 100644 --- a/modules/question_setter.py +++ b/modules/question_setter.py @@ -763,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`!",