Skip to content

Commit

Permalink
Merge pull request #329 from StampyAI/add_unlisted_status
Browse files Browse the repository at this point in the history
Add the "Unlisted" status to bot commands
  • Loading branch information
LeMurphant authored Jan 5, 2025
2 parents da980a1 + 1b754f9 commit a85e947
Showing 1 changed file with 8 additions and 1 deletion.
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 @@ -70,7 +71,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 @@ -189,6 +190,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 @@ -663,6 +666,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

0 comments on commit a85e947

Please sign in to comment.