diff --git a/src/sentry/tasks/integrations/github/pr_comment.py b/src/sentry/tasks/integrations/github/pr_comment.py index 2e11566bd0f7e3..92ab8e9a19940b 100644 --- a/src/sentry/tasks/integrations/github/pr_comment.py +++ b/src/sentry/tasks/integrations/github/pr_comment.py @@ -38,6 +38,8 @@ class PullRequestIssue: {issue_list} +Have questions? Reach out to us in the #proj-github-pr-comments channel. + Did you find this useful? React with a 👍 or 👎""" SINGLE_ISSUE_TEMPLATE = "- ‼️ **{title}** `{subtitle}` [View Issue]({url})" diff --git a/tests/sentry/tasks/integrations/github/test_pr_comment.py b/tests/sentry/tasks/integrations/github/test_pr_comment.py index c298b3ac193f6e..f463c302ddfe9f 100644 --- a/tests/sentry/tasks/integrations/github/test_pr_comment.py +++ b/tests/sentry/tasks/integrations/github/test_pr_comment.py @@ -287,7 +287,7 @@ def test_format_comment(self): ] formatted_comment = format_comment(issues) - expected_comment = "## Suspect Issues\nThis pull request has been deployed and Sentry has observed the following issues:\n\n- ‼️ **TypeError** `sentry.tasks.derive_code_mappings.derive_code_m...` [View Issue](https://sentry.sentry.io/issues/)\n- ‼️ **KafkaException** `query_subscription_consumer_process_message` [View Issue](https://sentry.sentry.io/stats/)\n\nDid you find this useful? React with a 👍 or 👎" + expected_comment = "## Suspect Issues\nThis pull request has been deployed and Sentry has observed the following issues:\n\n- ‼️ **TypeError** `sentry.tasks.derive_code_mappings.derive_code_m...` [View Issue](https://sentry.sentry.io/issues/)\n- ‼️ **KafkaException** `query_subscription_consumer_process_message` [View Issue](https://sentry.sentry.io/stats/)\n\nHave questions? Reach out to us in the #proj-github-pr-comments channel.\n\nDid you find this useful? React with a 👍 or 👎" assert formatted_comment == expected_comment @@ -335,7 +335,7 @@ def test_comment_workflow(self, get_jwt, mock_issues): assert ( responses.calls[1].request.body - == f'{{"body": "## Suspect Issues\\nThis pull request has been deployed and Sentry has observed the following issues:\\n\\n- \\u203c\\ufe0f **issue1** `issue1` [View Issue](http://testserver/organizations/foo/issues/{groups[0]}/)\\n- \\u203c\\ufe0f **issue2** `issue2` [View Issue](http://testserver/organizations/foobar/issues/{groups[1]}/)\\n\\nDid you find this useful? React with a \\ud83d\\udc4d or \\ud83d\\udc4e"}}'.encode() + == f'{{"body": "## Suspect Issues\\nThis pull request has been deployed and Sentry has observed the following issues:\\n\\n- \\u203c\\ufe0f **issue1** `issue1` [View Issue](http://testserver/organizations/foo/issues/{groups[0]}/)\\n- \\u203c\\ufe0f **issue2** `issue2` [View Issue](http://testserver/organizations/foobar/issues/{groups[1]}/)\\n\\nHave questions? Reach out to us in the #proj-github-pr-comments channel.\\n\\nDid you find this useful? React with a \\ud83d\\udc4d or \\ud83d\\udc4e"}}'.encode() ) pull_request_comment_query = PullRequestComment.objects.all() assert len(pull_request_comment_query) == 1 @@ -372,7 +372,7 @@ def test_comment_workflow_updates_comment(self, get_jwt, mock_issues): assert ( responses.calls[1].request.body - == f'{{"body": "## Suspect Issues\\nThis pull request has been deployed and Sentry has observed the following issues:\\n\\n- \\u203c\\ufe0f **issue1** `issue1` [View Issue](http://testserver/organizations/foo/issues/{groups[0]}/)\\n- \\u203c\\ufe0f **issue2** `issue2` [View Issue](http://testserver/organizations/foobar/issues/{groups[1]}/)\\n\\nDid you find this useful? React with a \\ud83d\\udc4d or \\ud83d\\udc4e"}}'.encode() + == f'{{"body": "## Suspect Issues\\nThis pull request has been deployed and Sentry has observed the following issues:\\n\\n- \\u203c\\ufe0f **issue1** `issue1` [View Issue](http://testserver/organizations/foo/issues/{groups[0]}/)\\n- \\u203c\\ufe0f **issue2** `issue2` [View Issue](http://testserver/organizations/foobar/issues/{groups[1]}/)\\n\\nHave questions? Reach out to us in the #proj-github-pr-comments channel.\\n\\nDid you find this useful? React with a \\ud83d\\udc4d or \\ud83d\\udc4e"}}'.encode() ) pull_request_comment.refresh_from_db() assert pull_request_comment.group_ids == [g.id for g in Group.objects.all()]