@@ -446,7 +446,7 @@ def test_comment_workflow_updates_comment(self, mock_metrics, mock_issues):
446
446
@patch (
447
447
"sentry.integrations.github.integration.GitHubPRCommentWorkflow.get_top_5_issues_by_count"
448
448
)
449
- @patch ("sentry.integrations.source_code_management.commit_context .metrics" )
449
+ @patch ("sentry.integrations.source_code_management.tasks .metrics" )
450
450
@patch ("sentry.integrations.github.integration.metrics" )
451
451
@responses .activate
452
452
def test_comment_workflow_api_error (self , mock_integration_metrics , mock_metrics , mock_issues ):
@@ -514,7 +514,7 @@ def test_comment_workflow_api_error(self, mock_integration_metrics, mock_metrics
514
514
@patch (
515
515
"sentry.integrations.github.integration.GitHubPRCommentWorkflow.get_top_5_issues_by_count"
516
516
)
517
- @patch ("sentry.integrations.source_code_management.commit_context .metrics" )
517
+ @patch ("sentry.integrations.source_code_management.tasks .metrics" )
518
518
@patch ("sentry.models.Organization.objects" )
519
519
def test_comment_workflow_missing_org (
520
520
self , mock_repository , mock_metrics , mock_issues , mock_issue_query
@@ -529,7 +529,7 @@ def test_comment_workflow_missing_org(
529
529
assert not mock_issues .called
530
530
assert cache .get (self .cache_key ) is None
531
531
mock_metrics .incr .assert_called_with (
532
- "github .pr_comment.error" , tags = {"type" : "missing_org" }
532
+ "source_code_management .pr_comment.error" , tags = {"type" : "missing_org" }
533
533
)
534
534
535
535
@patch (
@@ -547,7 +547,7 @@ def test_comment_workflow_missing_org_option(self, mock_issues):
547
547
"sentry.integrations.github.integration.GitHubPRCommentWorkflow.get_top_5_issues_by_count"
548
548
)
549
549
@patch ("sentry.models.Project.objects.get_from_cache" )
550
- @patch ("sentry.integrations.source_code_management.commit_context .metrics" )
550
+ @patch ("sentry.integrations.source_code_management.tasks .metrics" )
551
551
def test_comment_workflow_missing_project (self , mock_metrics , mock_project , mock_issues ):
552
552
# Project.DoesNotExist should trigger the cache to release the key
553
553
cache .set (self .cache_key , True , timedelta (minutes = 5 ).total_seconds ())
@@ -567,7 +567,7 @@ def test_comment_workflow_missing_project(self, mock_metrics, mock_project, mock
567
567
)
568
568
@patch ("sentry.models.Repository.objects" )
569
569
@patch ("sentry.integrations.github.integration.GitHubPRCommentWorkflow.get_comment_body" )
570
- @patch ("sentry.integrations.source_code_management.commit_context .metrics" )
570
+ @patch ("sentry.integrations.source_code_management.tasks .metrics" )
571
571
def test_comment_workflow_missing_repo (
572
572
self , mock_metrics , mock_get_comment_body , mock_repository , mock_issues
573
573
):
@@ -585,14 +585,14 @@ def test_comment_workflow_missing_repo(
585
585
assert not mock_get_comment_body .called
586
586
assert cache .get (self .cache_key ) is None
587
587
mock_metrics .incr .assert_called_with (
588
- "github .pr_comment.error" , tags = {"type" : "missing_repo" }
588
+ "source_code_management .pr_comment.error" , tags = {"type" : "missing_repo" }
589
589
)
590
590
591
591
@patch (
592
592
"sentry.integrations.github.integration.GitHubPRCommentWorkflow.get_top_5_issues_by_count"
593
593
)
594
594
@patch ("sentry.integrations.github.integration.GitHubPRCommentWorkflow.get_comment_body" )
595
- @patch ("sentry.integrations.source_code_management.commit_context .metrics" )
595
+ @patch ("sentry.integrations.source_code_management.tasks .metrics" )
596
596
def test_comment_workflow_missing_integration (
597
597
self , mock_metrics , mock_get_comment_body , mock_issues
598
598
):
@@ -613,7 +613,7 @@ def test_comment_workflow_missing_integration(
613
613
assert not mock_get_comment_body .called
614
614
assert cache .get (self .cache_key ) is None
615
615
mock_metrics .incr .assert_called_with (
616
- "github .pr_comment.error" , tags = {"type" : "missing_integration" }
616
+ "source_code_management .pr_comment.error" , tags = {"type" : "missing_integration" }
617
617
)
618
618
619
619
@patch (
0 commit comments