Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #3748 - Temporary disable outreach comment #3750

Merged
merged 1 commit into from
Feb 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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