Skip to content

ref: abstract on_create_or_update_comment_error method #89683

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

Merged

Conversation

jianyuan
Copy link
Contributor

@jianyuan jianyuan commented Apr 15, 2025

Make on_create_or_update_comment_error handler generic. They are used in both PR and Open PR workflows. The ultimate goal is to make the PR and Open PR workflows generic.

@jianyuan jianyuan requested review from a team as code owners April 15, 2025 21:18
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Apr 15, 2025
@@ -526,8 +527,8 @@ def test_comment_workflow_api_error(self, mock_metrics, mock_issues):

with pytest.raises(ApiError):
github_comment_workflow(self.pr.id, self.project.id)
assert cache.get(self.cache_key) is None
mock_metrics.incr.assert_called_with("github.pr_comment.api_error")
assert cache.get(self.cache_key) is None
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These were not previously run because the assertions occur after the exception is raised, which is then absorbed by the pytest.raises context manager.

@cathteng cathteng added the Trigger: getsentry tests Once code is reviewed: apply label to PR to trigger getsentry tests label Apr 17, 2025
@iamrajjoshi iamrajjoshi merged commit 197e20d into getsentry:master Apr 21, 2025
64 of 66 checks passed
Copy link

sentry-io bot commented Apr 24, 2025

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

  • ‼️ NotImplementedError sentry.integrations.github.tasks.open_pr_commen... View Issue

Did you find this useful? React with a 👍 or 👎

@github-actions github-actions bot locked and limited conversation to collaborators May 10, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Backend Automatically applied to PRs that change backend components Trigger: getsentry tests Once code is reviewed: apply label to PR to trigger getsentry tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants