File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
tests/test_utils/python_scripts Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 66Usage: GH_TOKEN=ghp_... SLACK_TOKEN=xoxb-... SLACK_WEBHOOK_URL=https://... REPO=NVIDIA/Megatron-LM python github_pr_reminder.py
77"""
88
9+ import html
910import logging
1011import os
1112import sys
@@ -231,10 +232,11 @@ def create_reminder(self, pr):
231232 stage_days = self .days_since (self .get_label_date (pr , stage ))
232233 author_email = self .get_user_email (pr .user .login )
233234 reviewer_emails , action_message = self .get_reviewers (pr )
235+ escaped_title = html .escape (pr .title , quote = False )
234236
235237 return Reminder (
236238 id = pr .number ,
237- pr = f"<{ pr .html_url } |#{ pr .number } - { pr . title } >" ,
239+ pr = f"<{ pr .html_url } |#{ pr .number } - { escaped_title } >" ,
238240 milestone = pr .milestone .title if pr .milestone else "No Milestone" ,
239241 author = self .get_slack_user_id (author_email ),
240242 priority = "P0" if stage_days > 3 else "P1" if stage_days >= 1 else "P2" ,
You can’t perform that action at this time.
0 commit comments