Skip to content

Commit 094ea5e

Browse files
made changes: removed unnecessary mentions and also ashish from it
1 parent 99a72f4 commit 094ea5e

File tree

1 file changed

+4
-52
lines changed

1 file changed

+4
-52
lines changed

sde_collections/utils/slack_utils.py

Lines changed: 4 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -3,96 +3,48 @@
33

44
from ..models.collection_choice_fields import WorkflowStatusChoices
55

6-
SLACK_ID_MAPPING = {
7-
"Carson Davis": "@UESJLQXH6",
8-
"Bishwas Praveen": "@U05QZUF182J",
9-
"Xiang Li": "@U03PPLNDZA7",
10-
"Shravan Vishwanathan": "@U056B4HMGEP",
11-
"Advait Yogaonkar": "@U06L5SKQ5QA",
12-
"Emily Foshee": "@UPKDARB9P",
13-
"Ashish Acharya": "@UC97PNAF6",
14-
"channel": "!here",
15-
}
16-
17-
186
STATUS_CHANGE_NOTIFICATIONS = {
197
(WorkflowStatusChoices.RESEARCH_IN_PROGRESS, WorkflowStatusChoices.READY_FOR_ENGINEERING): {
208
"message": "Research on {name} is complete. Ready for engineering! :rocket:",
21-
"tags": [
22-
SLACK_ID_MAPPING["Xiang Li"],
23-
SLACK_ID_MAPPING["Shravan Vishwanathan"],
24-
SLACK_ID_MAPPING["Advait Yogaonkar"],
25-
],
269
},
2710
(WorkflowStatusChoices.ENGINEERING_IN_PROGRESS, WorkflowStatusChoices.READY_FOR_CURATION): {
2811
"message": "Engineering on {name} is complete. Ready for curation! :mag:",
29-
"tags": [SLACK_ID_MAPPING["Emily Foshee"]],
3012
},
3113
(WorkflowStatusChoices.CURATION_IN_PROGRESS, WorkflowStatusChoices.CURATED): {
3214
"message": "Curation on {name} is complete. It's now curated! :checkered_flag:",
33-
"tags": [
34-
SLACK_ID_MAPPING["Carson Davis"],
35-
SLACK_ID_MAPPING["Bishwas Praveen"],
36-
SLACK_ID_MAPPING["Ashish Acharya"],
37-
],
3815
},
3916
(WorkflowStatusChoices.SECRET_DEPLOYMENT_STARTED, WorkflowStatusChoices.SECRET_DEPLOYMENT_FAILED): {
4017
"message": "Alert: Secret deployment of {name} has failed! :warning:",
41-
"tags": [
42-
SLACK_ID_MAPPING["Carson Davis"],
43-
SLACK_ID_MAPPING["Bishwas Praveen"],
44-
SLACK_ID_MAPPING["Ashish Acharya"],
45-
],
4618
},
4719
(WorkflowStatusChoices.SECRET_DEPLOYMENT_STARTED, WorkflowStatusChoices.READY_FOR_LRM_QUALITY_CHECK): {
4820
"message": "Indexing of {name} on Secret Prod completed successfully. Ready for LRM QC! :clipboard:",
49-
"tags": [SLACK_ID_MAPPING["Shravan Vishwanathan"], SLACK_ID_MAPPING["Advait Yogaonkar"]],
5021
},
5122
(WorkflowStatusChoices.READY_FOR_LRM_QUALITY_CHECK, WorkflowStatusChoices.READY_FOR_FINAL_QUALITY_CHECK): {
5223
"message": "LRM QC passed for {name}. Ready for final quality check! :white_check_mark:",
53-
"tags": [SLACK_ID_MAPPING["Emily Foshee"]],
5424
},
5525
(WorkflowStatusChoices.READY_FOR_FINAL_QUALITY_CHECK, WorkflowStatusChoices.QUALITY_CHECK_FAILED): {
56-
"message": "Quality check on {name} has failed. Changes needed! :x:",
57-
"tags": [
58-
SLACK_ID_MAPPING["Xiang Li"],
59-
SLACK_ID_MAPPING["Shravan Vishwanathan"],
60-
SLACK_ID_MAPPING["Advait Yogaonkar"],
61-
],
26+
"message": "<!here> <@U056B4HMGEP> <@U06L5SKQ5QA> Quality check on {name} has failed. Changes needed! :x:",
6227
},
6328
(WorkflowStatusChoices.READY_FOR_FINAL_QUALITY_CHECK, WorkflowStatusChoices.QUALITY_CHECK_PERFECT): {
6429
"message": "{name} has passed all quality checks and is ready for public production! :white_check_mark:",
65-
"tags": [
66-
SLACK_ID_MAPPING["Carson Davis"],
67-
SLACK_ID_MAPPING["Bishwas Praveen"],
68-
SLACK_ID_MAPPING["Ashish Acharya"],
69-
],
7030
},
7131
(WorkflowStatusChoices.READY_FOR_FINAL_QUALITY_CHECK, WorkflowStatusChoices.QUALITY_CHECK_MINOR): {
7232
"message": "{name} has passed all quality checks and is ready for public production! :white_check_mark:",
73-
"tags": [
74-
SLACK_ID_MAPPING["Carson Davis"],
75-
SLACK_ID_MAPPING["Bishwas Praveen"],
76-
SLACK_ID_MAPPING["Ashish Acharya"],
77-
],
7833
},
7934
(WorkflowStatusChoices.QUALITY_CHECK_PERFECT, WorkflowStatusChoices.PROD_PERFECT): {
80-
"message": "{name} is now live on Public Prod! Congrats team! :sparkles:",
81-
"tags": [SLACK_ID_MAPPING["channel"]],
35+
"message": "<!here> {name} is now live on Public Prod! Congrats team! :sparkles:",
8236
},
8337
(WorkflowStatusChoices.QUALITY_CHECK_MINOR, WorkflowStatusChoices.PROD_MINOR): {
84-
"message": "{name} is now live on Public Prod! Congrats team! :sparkles:",
85-
"tags": [SLACK_ID_MAPPING["channel"]],
38+
"message": "<!here> {name} is now live on Public Prod! Congrats team! :sparkles:",
8639
},
8740
}
8841

8942

9043
def format_slack_message(name, details, collection_id):
9144
message_template = details["message"]
92-
tags = " ".join([f"<{user}>" for user in details["tags"]])
9345
link = f"https://sde-indexing-helper.nasa-impact.net/{collection_id}/" # noqa: E231
9446
linked_name = f"<{link}|{name}>"
95-
return tags + " " + message_template.format(name=linked_name)
47+
return message_template.format(name=linked_name)
9648

9749

9850
def send_slack_message(message):

0 commit comments

Comments
 (0)