Skip to content

Commit

Permalink
Fixes #3748 - Temporary disable outreach comment
Browse files Browse the repository at this point in the history
  • Loading branch information
ksy36 committed Feb 1, 2023
1 parent 0f879b7 commit 6b86653
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
4 changes: 3 additions & 1 deletion tests/unit/test_webhook_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ def test_prepare_public_comment():
expected_payload).get('body')


@pytest.mark.skip(reason="Outreach comment temporary disabled")
def test_prepare_outreach_comment():
"""Test we prepare the right comment body."""
expected_payload = '{"body": "[Generate outreach template](https://webcompat.com/outreach/2598)"}' # noqa
Expand All @@ -209,6 +210,7 @@ def test_prepare_outreach_comment():
expected_payload).get('body')


@pytest.mark.skip(reason="Outreach comment temporary disabled")
def test_prepare_outreach_comment_for_auth_report():
"""Test we prepare the right comment body."""
expected_payload = '{"body": "[Generate outreach template](https://webcompat.com/outreach/2598)"}' # noqa
Expand Down Expand Up @@ -332,7 +334,7 @@ def test_process_issue_action_scenarios(mock_mr, mock_classification):
('private_milestone_accepted_incomplete.json', incomplete),
('private_milestone_accepted_invalid.json', invalid),
('private_issue_opened.json', comment_added),
('public_milestone_needscontact.json', outreach_comment_added),
# ('public_milestone_needscontact.json', outreach_comment_added),
('private_milestone_ml_autoclosed.json', autoclosed),
]
mock_classification.return_value = (
Expand Down
11 changes: 0 additions & 11 deletions webcompat/webhooks/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,17 +337,6 @@ def process_issue_action(self):
return oops()
else:
return make_response('gracias, amigo.', 200)
elif (self.action == 'milestoned' and scope == 'public' and
self.milestoned_with == 'needscontact'):
# add a comment with a link to outreach template generator
# when issue is moved to needscontact
try:
self.comment_outreach_generator_uri()
except HTTPError as e:
msg_log(f'comment failed ({e})', self.number)
return oops()
else:
return make_response('outreach generator url added', 200)
elif (self.action == 'milestoned' and scope == 'public' and
self.milestoned_with in ('needsdiagnosis', 'moved')):
try:
Expand Down

0 comments on commit 6b86653

Please sign in to comment.